|
|
| (12 intermediate revisions by 3 users not shown) |
| Line 15: |
Line 15: |
| 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 | | 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 |
|
| |
|
| ==Component Source Code== | | ==Detailed description== |
| | |
| Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_Map-Function.fcfx FC_Comp_Source_Map-Function.fcfx]
| |
|
| |
|
| Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_Map-Function.fcfx FC_Comp_Source_Map-Function.fcfx]
| |
|
| |
|
| ==Detailed description==
| |
|
| |
|
|
| |
|
| Line 35: |
Line 31: |
| ==Examples== | | ==Examples== |
|
| |
|
| | A simple example showing how to take a value from an adc input with the range 0-255 and mapping this to a predetermined range of 50-150 to drive a PWM output. |
|
| |
|
| | | {{Fcfile|MappingADCtoPWM.fcfx|Mapping ADC to PWM}} |
| | |
| | |
| | |
| | |
| | |
| | |
| ''<span style="color:red;">No additional examples</span>''
| |
|
| |
|
| ==Macro reference== | | ==Macro reference== |
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| | ===MapByte=== |
| |-
| | {| class="mtx-class-macrotable wikitable" |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MapUlong'''
| |
| |-
| |
| | colspan="2" | Map function for unsigned long type variables
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
| |
| | width="90%" | Value
| |
| |-
| |
| | colspan="2" | Main variable used for map function
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
| |
| | width="90%" | InMin
| |
| |-
| |
| | colspan="2" | Lowest input value
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
| |
| | width="90%" | InMax
| |
| |-
| |
| | colspan="2" | Highest value input
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
| |
| | width="90%" | OutMin
| |
| |-
| |
| | colspan="2" | Lowest value after conversion
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
| |
| | width="90%" | OutMax
| |
| |-
| |
| | colspan="2" | highest value after conversion
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| |
| | width="90%" | ClampMinMax
| |
| |-
| |
| | colspan="2" | Clamp min & max so result does not go above or below set values. 0=No, 1=Yes
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u32-icon.png]] - ULONG
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MapInt'''
| |
| |-
| |
| | colspan="2" | Map function for signed int type variables
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
| |
| | width="90%" | Value
| |
| |-
| |
| | colspan="2" | Main variable used for map function
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
| |
| | width="90%" | InMin
| |
| |-
| |
| | colspan="2" | Lowest input value
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
| |
| | width="90%" | InMax
| |
| |-
| |
| | colspan="2" | Highest value input
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
| |
| | width="90%" | OutMin
| |
| |-
| |
| | colspan="2" | Lowest value after conversion
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
| |
| | width="90%" | OutMax
| |
| |-
| |
| | colspan="2" | highest value after conversion
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| |
| | width="90%" | ClampMinMax
| |
| |-
| |
| | colspan="2" | Clamp min & max so result does not go above or below set values. 0=No, 1=Yes
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-s16-icon.png]] - INT
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MapFloat'''
| |
| |-
| |
| | colspan="2" | Map function for floating point type variables
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| |
| | width="90%" | Value
| |
| |-
| |
| | colspan="2" | Main variable used for map function
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| |
| | width="90%" | InMin
| |
| |-
| |
| | colspan="2" | Lowest input value
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| |
| | width="90%" | InMax
| |
| |-
| |
| | colspan="2" | Highest value input
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| |
| | width="90%" | OutMin
| |
| |-
| |
| | colspan="2" | Lowest value after conversion
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| |
| | width="90%" | OutMax
| |
| |-
| |
| | colspan="2" | highest value after conversion
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| |
| | width="90%" | ClampMinMax
| |
| |-
| |
| | colspan="2" | Clamp min & max so result does not go above or below set values. 0=No, 1=Yes
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MapLong'''
| |
| |-
| |
| | colspan="2" | Map function for signed long type variables
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-s32-icon.png]] - LONG
| |
| | width="90%" | Value
| |
| |- | | |- |
| | colspan="2" | Main variable used for map function
| | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| |-
| | | width="90%" class="mtx-class-macrohead" | '''MapByte''' |
| | width="10%" align="center" | [[File:Fc9-s32-icon.png]] - LONG | |
| | width="90%" | InMin
| |
| |-
| |
| | colspan="2" | Lowest input value
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-s32-icon.png]] - LONG
| |
| | width="90%" | InMax
| |
| |-
| |
| | colspan="2" | Highest value input
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-s32-icon.png]] - LONG
| |
| | width="90%" | OutMin
| |
| |-
| |
| | colspan="2" | Lowest value after conversion
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-s32-icon.png]] - LONG
| |
| | width="90%" | OutMax
| |
| |-
| |
| | colspan="2" | highest value after conversion
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| |
| | width="90%" | ClampMinMax
| |
| |-
| |
| | colspan="2" | Clamp min & max so result does not go above or below set values. 0=No, 1=Yes
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-s32-icon.png]] - LONG
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MapUInt''' | |
| |-
| |
| | colspan="2" | Map function for unsigned int type variables
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | Value
| |
| |-
| |
| | colspan="2" | Main variable used for map function
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | InMin
| |
| |-
| |
| | colspan="2" | Lowest input value
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | InMax
| |
| |-
| |
| | colspan="2" | Highest value input
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | OutMin
| |
| |-
| |
| | colspan="2" | Lowest value after conversion
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | OutMax
| |
| |-
| |
| | colspan="2" | highest value after conversion
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| |
| | width="90%" | ClampMinMax
| |
| |-
| |
| | colspan="2" | Clamp min & max so result does not go above or below set values. 0=No, 1=Yes
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MapByte'''
| |
| |- | | |- |
| | colspan="2" | Map function for byte type variables | | | colspan="2" | Map function for byte type variables |
| Line 305: |
Line 81: |
|
| |
|
|
| |
|
| | | ===MapFloat=== |
| | | {| class="mtx-class-macrotable wikitable" |
| ==Property reference==
| |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''
| |
| |-
| |
| |}==Macro reference==
| |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MapUlong'''
| |
| |-
| |
| | colspan="2" | Map function for unsigned long type variables
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
| |
| | width="90%" | Value
| |
| |-
| |
| | colspan="2" | Main variable used for map function
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
| |
| | width="90%" | InMin
| |
| |-
| |
| | colspan="2" | Lowest input value
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
| |
| | width="90%" | InMax
| |
| |- | | |- |
| | colspan="2" | Highest value input
| | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| |-
| | | width="90%" class="mtx-class-macrohead" | '''MapFloat''' |
| | width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG | |
| | width="90%" | OutMin
| |
| |-
| |
| | colspan="2" | Lowest value after conversion
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
| |
| | width="90%" | OutMax
| |
| |-
| |
| | colspan="2" | highest value after conversion
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| |
| | width="90%" | ClampMinMax
| |
| |-
| |
| | colspan="2" | Clamp min & max so result does not go above or below set values. 0=No, 1=Yes
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u32-icon.png]] - ULONG
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MapInt''' | |
| |-
| |
| | colspan="2" | Map function for signed int type variables
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
| |
| | width="90%" | Value
| |
| |-
| |
| | colspan="2" | Main variable used for map function
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
| |
| | width="90%" | InMin
| |
| |-
| |
| | colspan="2" | Lowest input value
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
| |
| | width="90%" | InMax
| |
| |-
| |
| | colspan="2" | Highest value input
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
| |
| | width="90%" | OutMin
| |
| |-
| |
| | colspan="2" | Lowest value after conversion
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
| |
| | width="90%" | OutMax
| |
| |-
| |
| | colspan="2" | highest value after conversion
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| |
| | width="90%" | ClampMinMax
| |
| |-
| |
| | colspan="2" | Clamp min & max so result does not go above or below set values. 0=No, 1=Yes
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-s16-icon.png]] - INT
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MapFloat'''
| |
| |- | | |- |
| | colspan="2" | Map function for floating point type variables | | | colspan="2" | Map function for floating point type variables |
| Line 445: |
Line 125: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| | ===MapInt=== |
| |-
| | {| class="mtx-class-macrotable wikitable" |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MapLong'''
| |
| |-
| |
| | colspan="2" | Map function for signed long type variables
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-s32-icon.png]] - LONG
| |
| | width="90%" | Value
| |
| |-
| |
| | colspan="2" | Main variable used for map function
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-s32-icon.png]] - LONG
| |
| | width="90%" | InMin
| |
| |-
| |
| | colspan="2" | Lowest input value
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-s32-icon.png]] - LONG
| |
| | width="90%" | InMax
| |
| |-
| |
| | colspan="2" | Highest value input
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-s32-icon.png]] - LONG
| |
| | width="90%" | OutMin
| |
| |-
| |
| | colspan="2" | Lowest value after conversion
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-s32-icon.png]] - LONG
| |
| | width="90%" | OutMax
| |
| |-
| |
| | colspan="2" | highest value after conversion
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| |
| | width="90%" | ClampMinMax
| |
| |-
| |
| | colspan="2" | Clamp min & max so result does not go above or below set values. 0=No, 1=Yes
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-s32-icon.png]] - LONG
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MapUInt'''
| |
| |-
| |
| | colspan="2" | Map function for unsigned int type variables
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | Value
| |
| |-
| |
| | colspan="2" | Main variable used for map function
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | InMin
| |
| |-
| |
| | colspan="2" | Lowest input value
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | InMax
| |
| |-
| |
| | colspan="2" | Highest value input
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | OutMin
| |
| |-
| |
| | colspan="2" | Lowest value after conversion
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | OutMax
| |
| |-
| |
| | colspan="2" | highest value after conversion
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| |
| | width="90%" | ClampMinMax
| |
| |-
| |
| | colspan="2" | Clamp min & max so result does not go above or below set values. 0=No, 1=Yes
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MapByte'''
| |
| |-
| |
| | colspan="2" | Map function for byte type variables
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Value
| |
| |-
| |
| | colspan="2" | Main variable used for map function
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | InMin
| |
| |-
| |
| | colspan="2" | Lowest input value
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | InMax
| |
| |-
| |
| | colspan="2" | Highest value input
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | OutMin
| |
| |-
| |
| | colspan="2" | Lowest value after conversion
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | OutMax
| |
| |-
| |
| | colspan="2" | highest value after conversion
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| |
| | width="90%" | ClampMinMax
| |
| |-
| |
| | colspan="2" | Clamp min & max so result does not go above or below set values. 0=No, 1=Yes
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| | |
| | |
| ==Property reference==
| |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''
| |
| |-
| |
| |}==Macro reference==
| |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MapUlong''' | | | width="90%" class="mtx-class-macrohead" | '''MapInt''' |
| |-
| |
| | colspan="2" | Map function for unsigned long type variables
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
| |
| | width="90%" | Value
| |
| |-
| |
| | colspan="2" | Main variable used for map function
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
| |
| | width="90%" | InMin
| |
| |-
| |
| | colspan="2" | Lowest input value
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
| |
| | width="90%" | InMax
| |
| |-
| |
| | colspan="2" | Highest value input
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
| |
| | width="90%" | OutMin
| |
| |-
| |
| | colspan="2" | Lowest value after conversion
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u32-icon.png]] - ULONG
| |
| | width="90%" | OutMax
| |
| |-
| |
| | colspan="2" | highest value after conversion
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| |
| | width="90%" | ClampMinMax
| |
| |-
| |
| | colspan="2" | Clamp min & max so result does not go above or below set values. 0=No, 1=Yes
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u32-icon.png]] - ULONG
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MapInt'''
| |
| |- | | |- |
| | colspan="2" | Map function for signed int type variables | | | colspan="2" | Map function for signed int type variables |
| Line 671: |
Line 169: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| | ===MapLong=== |
| |-
| | {| class="mtx-class-macrotable wikitable" |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MapFloat''' | |
| |-
| |
| | colspan="2" | Map function for floating point type variables
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| |
| | width="90%" | Value
| |
| |-
| |
| | colspan="2" | Main variable used for map function
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| |
| | width="90%" | InMin
| |
| |-
| |
| | colspan="2" | Lowest input value
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| |
| | width="90%" | InMax
| |
| |-
| |
| | colspan="2" | Highest value input
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| |
| | width="90%" | OutMin
| |
| |-
| |
| | colspan="2" | Lowest value after conversion
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| |
| | width="90%" | OutMax
| |
| |-
| |
| | colspan="2" | highest value after conversion
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| |
| | width="90%" | ClampMinMax
| |
| |-
| |
| | colspan="2" | Clamp min & max so result does not go above or below set values. 0=No, 1=Yes
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MapLong''' | | | width="90%" class="mtx-class-macrohead" | '''MapLong''' |
| |- | | |- |
| | colspan="2" | Map function for signed long type variables | | | colspan="2" | Map function for signed long type variables |
| Line 757: |
Line 213: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===MapUInt=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MapUInt''' | | | width="90%" class="mtx-class-macrohead" | '''MapUInt''' |
| |- | | |- |
| | colspan="2" | Map function for unsigned int type variables | | | colspan="2" | Map function for unsigned int type variables |
| Line 800: |
Line 257: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| | ===MapUlong=== |
| |-
| | {| class="mtx-class-macrotable wikitable" |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MapByte''' | |
| |-
| |
| | colspan="2" | Map function for byte type variables
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Value
| |
| |-
| |
| | colspan="2" | Main variable used for map function
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | InMin
| |
| |- | | |- |
| | colspan="2" | Lowest input value
| | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| |-
| | | width="90%" class="mtx-class-macrohead" | '''MapUlong''' |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | InMax
| |
| |-
| |
| | colspan="2" | Highest value input
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | OutMin
| |
| |-
| |
| | colspan="2" | Lowest value after conversion
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | OutMax
| |
| |-
| |
| | colspan="2" | highest value after conversion
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| |
| | width="90%" | ClampMinMax
| |
| |-
| |
| | colspan="2" | Clamp min & max so result does not go above or below set values. 0=No, 1=Yes
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE | |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| | |
| | |
| ==Property reference==
| |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''
| |
| |-
| |
| |}==Macro reference==
| |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MapUlong''' | |
| |- | | |- |
| | colspan="2" | Map function for unsigned long type variables | | | colspan="2" | Map function for unsigned long type variables |
| Line 897: |
Line 301: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| | ==Property reference== |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MapInt'''
| |
| |-
| |
| | colspan="2" | Map function for signed int type variables
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
| |
| | width="90%" | Value
| |
| |-
| |
| | colspan="2" | Main variable used for map function
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
| |
| | width="90%" | InMin
| |
| |-
| |
| | colspan="2" | Lowest input value
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
| |
| | width="90%" | InMax
| |
| |-
| |
| | colspan="2" | Highest value input
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
| |
| | width="90%" | OutMin
| |
| |-
| |
| | colspan="2" | Lowest value after conversion
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
| |
| | width="90%" | OutMax
| |
| |-
| |
| | colspan="2" | highest value after conversion
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| |
| | width="90%" | ClampMinMax
| |
| |-
| |
| | colspan="2" | Clamp min & max so result does not go above or below set values. 0=No, 1=Yes
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-s16-icon.png]] - INT
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="mtx-class-macrotable wikitable" |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MapFloat'''
| |
| |-
| |
| | colspan="2" | Map function for floating point type variables
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| |
| | width="90%" | Value
| |
| |-
| |
| | colspan="2" | Main variable used for map function
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| |
| | width="90%" | InMin
| |
| |-
| |
| | colspan="2" | Lowest input value
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| |
| | width="90%" | InMax
| |
| |-
| |
| | colspan="2" | Highest value input
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| |
| | width="90%" | OutMin
| |
| |- | | |- |
| | colspan="2" | Lowest value after conversion | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]] |
| | | width="90%" class="mtx-class-macrohead" | '''Properties''' |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| |
| | width="90%" | OutMax
| |
| |-
| |
| | colspan="2" | highest value after conversion
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| |
| | width="90%" | ClampMinMax
| |
| |-
| |
| | colspan="2" | Clamp min & max so result does not go above or below set values. 0=No, 1=Yes
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |} | | |} |
|
| |
|
| | ==Component Source Code== |
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| | Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_Map-Function.fcfx FC_Comp_Source_Map-Function.fcfx] |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MapLong'''
| |
| |-
| |
| | colspan="2" | Map function for signed long type variables
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-s32-icon.png]] - LONG
| |
| | width="90%" | Value
| |
| |-
| |
| | colspan="2" | Main variable used for map function
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-s32-icon.png]] - LONG
| |
| | width="90%" | InMin
| |
| |-
| |
| | colspan="2" | Lowest input value
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-s32-icon.png]] - LONG
| |
| | width="90%" | InMax
| |
| |-
| |
| | colspan="2" | Highest value input
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-s32-icon.png]] - LONG
| |
| | width="90%" | OutMin
| |
| |-
| |
| | colspan="2" | Lowest value after conversion
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-s32-icon.png]] - LONG
| |
| | width="90%" | OutMax
| |
| |-
| |
| | colspan="2" | highest value after conversion
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| |
| | width="90%" | ClampMinMax
| |
| |-
| |
| | colspan="2" | Clamp min & max so result does not go above or below set values. 0=No, 1=Yes
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-s32-icon.png]] - LONG
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| | | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_Map-Function.fcfx FC_Comp_Source_Map-Function.fcfx] |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MapUInt'''
| |
| |-
| |
| | colspan="2" | Map function for unsigned int type variables
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | Value
| |
| |-
| |
| | colspan="2" | Main variable used for map function
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | InMin
| |
| |-
| |
| | colspan="2" | Lowest input value
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | InMax
| |
| |-
| |
| | colspan="2" | Highest value input
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | OutMin
| |
| |-
| |
| | colspan="2" | Lowest value after conversion
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | OutMax
| |
| |-
| |
| | colspan="2" | highest value after conversion
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| |
| | width="90%" | ClampMinMax
| |
| |-
| |
| | colspan="2" | Clamp min & max so result does not go above or below set values. 0=No, 1=Yes
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MapByte'''
| |
| |-
| |
| | colspan="2" | Map function for byte type variables
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Value
| |
| |-
| |
| | colspan="2" | Main variable used for map function
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | InMin
| |
| |-
| |
| | colspan="2" | Lowest input value
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | InMax
| |
| |-
| |
| | colspan="2" | Highest value input
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | OutMin
| |
| |-
| |
| | colspan="2" | Lowest value after conversion
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | OutMax
| |
| |-
| |
| | colspan="2" | highest value after conversion
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| |
| | width="90%" | ClampMinMax
| |
| |-
| |
| | colspan="2" | Clamp min & max so result does not go above or below set values. 0=No, 1=Yes
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| | |
| | |
| ==Property reference==
| |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''
| |
| |-
| |
| |}
| |