Author
|
medelec35
|
Version
|
2.0
|
Category
|
Storage
|
Map Function component
The map function is intended to change one range of values into another range of values. For example. Output from a temperature sensor is in centigrade. you can map it to give the result in Fahrenheit. To do that set: InMin to 0, InMax 100, OutMin to 32 & OutMax to 212
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Downloadable macro reference
|
MapUlong
|
Map function for unsigned long type variables
|
- ULONG
|
Value
|
Main variable used for map function
|
- ULONG
|
InMin
|
Lowest input value
|
- ULONG
|
InMax
|
Highest value input
|
- ULONG
|
OutMin
|
Lowest value after conversion
|
- ULONG
|
OutMax
|
highest value after conversion
|
[[File:]] -
|
ClampMinMax
|
Clamp min & max so result does not go above or below set values. 0=No, 1=Yes
|
- ULONG
|
Return
|
|
MapInt
|
Map function for signed int type variables
|
[[File:]] -
|
Value
|
Main variable used for map function
|
[[File:]] -
|
InMin
|
Lowest input value
|
[[File:]] -
|
InMax
|
Highest value input
|
[[File:]] -
|
OutMin
|
Lowest value after conversion
|
[[File:]] -
|
OutMax
|
highest value after conversion
|
[[File:]] -
|
ClampMinMax
|
Clamp min & max so result does not go above or below set values. 0=No, 1=Yes
|
[[File:]] -
|
Return
|
|
MapFloat
|
Map function for floating point type variables
|
[[File:]] -
|
Value
|
Main variable used for map function
|
[[File:]] -
|
InMin
|
Lowest input value
|
[[File:]] -
|
InMax
|
Highest value input
|
[[File:]] -
|
OutMin
|
Lowest value after conversion
|
[[File:]] -
|
OutMax
|
highest value after conversion
|
[[File:]] -
|
ClampMinMax
|
Clamp min & max so result does not go above or below set values. 0=No, 1=Yes
|
[[File:]] -
|
Return
|
|
MapLong
|
Map function for signed long type variables
|
[[File:]] -
|
Value
|
Main variable used for map function
|
[[File:]] -
|
InMin
|
Lowest input value
|
[[File:]] -
|
InMax
|
Highest value input
|
[[File:]] -
|
OutMin
|
Lowest value after conversion
|
[[File:]] -
|
OutMax
|
highest value after conversion
|
[[File:]] -
|
ClampMinMax
|
Clamp min & max so result does not go above or below set values. 0=No, 1=Yes
|
[[File:]] -
|
Return
|
|
MapUInt
|
Map function for unsigned int type variables
|
- UINT
|
Value
|
Main variable used for map function
|
- UINT
|
InMin
|
Lowest input value
|
- UINT
|
InMax
|
Highest value input
|
- UINT
|
OutMin
|
Lowest value after conversion
|
- UINT
|
OutMax
|
highest value after conversion
|
[[File:]] -
|
ClampMinMax
|
Clamp min & max so result does not go above or below set values. 0=No, 1=Yes
|
- UINT
|
Return
|
|
MapByte
|
Map function for byte type variables
|
- BYTE
|
Value
|
Main variable used for map function
|
- BYTE
|
InMin
|
Lowest input value
|
- BYTE
|
InMax
|
Highest value input
|
- BYTE
|
OutMin
|
Lowest value after conversion
|
- BYTE
|
OutMax
|
highest value after conversion
|
[[File:]] -
|
ClampMinMax
|
Clamp min & max so result does not go above or below set values. 0=No, 1=Yes
|
- BYTE
|
Return
|
|
SendPolyPressure
|
Sends a note press with an associated polyphonic pressure value.
|
- BYTE
|
Channel
|
|
- BYTE
|
Note
|
|
- BYTE
|
Pressure
|
|
- VOID
|
Return
|
|
ReadData
|
|
- BYTE
|
Idx
|
|
- BYTE
|
Return
|
|
SendPatch
|
|
- BYTE
|
Channel
|
|
- BYTE
|
Instrument
|
|
- VOID
|
Return
|
|
SendChannelPressure
|
|
- BYTE
|
Channel
|
|
- BYTE
|
Pressure
|
|
- VOID
|
Return
|
|
Initialise
|
Initialises the MIDI component and sets up the UART.
|
- VOID
|
Return
|
|
CommsBaud
|
Sets the Baud rate of the alt communications channel
|
- BYTE
|
Baud
|
Range: 0-7 : 0=1200 / 7=115200
|
- VOID
|
Return
|
|
LCDOptions
|
Controls some of the LCD options
|
- BYTE
|
Foreground
|
Range: 0-1
|
- BYTE
|
Background
|
Range: 0-1
|
- BYTE
|
Transparent
|
Range: 0-1
|
- VOID
|
Return
|
|
LCDVerbose
|
Controls the Verbose mode. When enabled the LCD automatically displays an account of the incoming API commands and parameters. When switched off the LCD is free for the user to control as required.
|
- BYTE
|
Mode
|
Range: 0-1 : 0=Off or User Mode / 1=API Verbose Mode
|
- VOID
|
Return
|
|
ReadDigitalInput
|
Reads a single digital input.
|
- BYTE
|
Channel
|
|
- BYTE
|
Return
|
|
PWMConfig
|
Sets the PWM configuration. Channel = 0 - 1 : 0 = EN_AB, A, B / 1 = EN_CD, C, D Period = 0 - 65535 Scaler = 0 - 3 : 0=1:1 1=1:8 2=1:64 3=1:256
|
- BYTE
|
Channel
|
Range 0-1
|
- UINT
|
Period
|
Range: 0-65535
|
- BYTE
|
Scaler
|
Range: 0-3
|
- VOID
|
Return
|
|
PWMEnable
|
Allows pulse width modulated transistor outputs to be switched on or off. Bit 0 = Enable AB Bit 1 = A / Bit 2 = B Bit 3 = C / Bit 4 = D Bit 5 = Enable CD
|
- BYTE
|
EnableMask
|
Range 0-63 or 0b00000 to 0b111111
|
- VOID
|
Return
|
|
PWMDuty
|
Sets a single PWM channel duty. Channel = 0 - 5 : 0=EN_AB, 1=A, 2=B, 3=C, 4=D, 5=EN_CD Duty = 0 - 65535
|
- BYTE
|
Channel
|
Range 0-5
|
- UINT
|
Duty
|
|
- VOID
|
Return
|
|
LCDCursor
|
Sets the cursor position for the MIAC display
|
- BYTE
|
X
|
Range: 0-21
|
- BYTE
|
Y
|
Range: 0-4
|
- VOID
|
Return
|
|
WriteTran
|
Allows a single transistor output to be switched on or off.
|
- BYTE
|
Channel
|
Range 1-4
|
- BYTE
|
Value
|
0 = Off, 1 = On
|
- VOID
|
Return
|
|
Initialise
|
|
- VOID
|
Return
|
|
LCDClear
|
Clears the MIAC display
|
- VOID
|
Return
|
|
LCDClear
|
Clears the LCD
|
- VOID
|
Return
|
Property reference
|
Properties
|
|
Connections
|
|
Simulations
|