Author
|
medelec35
|
Version
|
2.0
|
Category
|
Calculation
|
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
Component Source Code
Please click here to view the component source code (Beta): FC_Comp_Source_Map-Function.fcfx
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
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
|
- BOOL
|
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
|
- INT
|
Value
|
Main variable used for map function
|
- INT
|
InMin
|
Lowest input value
|
- INT
|
InMax
|
Highest value input
|
- INT
|
OutMin
|
Lowest value after conversion
|
- INT
|
OutMax
|
highest value after conversion
|
- BOOL
|
ClampMinMax
|
Clamp min & max so result does not go above or below set values. 0=No, 1=Yes
|
- INT
|
Return
|
|
MapFloat
|
Map function for floating point type variables
|
- FLOAT
|
Value
|
Main variable used for map function
|
- FLOAT
|
InMin
|
Lowest input value
|
- FLOAT
|
InMax
|
Highest value input
|
- FLOAT
|
OutMin
|
Lowest value after conversion
|
- FLOAT
|
OutMax
|
highest value after conversion
|
- BOOL
|
ClampMinMax
|
Clamp min & max so result does not go above or below set values. 0=No, 1=Yes
|
- FLOAT
|
Return
|
|
MapLong
|
Map function for signed long type variables
|
- LONG
|
Value
|
Main variable used for map function
|
- LONG
|
InMin
|
Lowest input value
|
- LONG
|
InMax
|
Highest value input
|
- LONG
|
OutMin
|
Lowest value after conversion
|
- LONG
|
OutMax
|
highest value after conversion
|
- BOOL
|
ClampMinMax
|
Clamp min & max so result does not go above or below set values. 0=No, 1=Yes
|
- LONG
|
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
|
- BOOL
|
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
|
- BOOL
|
ClampMinMax
|
Clamp min & max so result does not go above or below set values. 0=No, 1=Yes
|
- BYTE
|
Return
|
Property reference
|
Properties
|
==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
|
- BOOL
|
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
|
- INT
|
Value
|
Main variable used for map function
|
- INT
|
InMin
|
Lowest input value
|
- INT
|
InMax
|
Highest value input
|
- INT
|
OutMin
|
Lowest value after conversion
|
- INT
|
OutMax
|
highest value after conversion
|
- BOOL
|
ClampMinMax
|
Clamp min & max so result does not go above or below set values. 0=No, 1=Yes
|
- INT
|
Return
|
|
MapFloat
|
Map function for floating point type variables
|
- FLOAT
|
Value
|
Main variable used for map function
|
- FLOAT
|
InMin
|
Lowest input value
|
- FLOAT
|
InMax
|
Highest value input
|
- FLOAT
|
OutMin
|
Lowest value after conversion
|
- FLOAT
|
OutMax
|
highest value after conversion
|
- BOOL
|
ClampMinMax
|
Clamp min & max so result does not go above or below set values. 0=No, 1=Yes
|
- FLOAT
|
Return
|
|
MapLong
|
Map function for signed long type variables
|
- LONG
|
Value
|
Main variable used for map function
|
- LONG
|
InMin
|
Lowest input value
|
- LONG
|
InMax
|
Highest value input
|
- LONG
|
OutMin
|
Lowest value after conversion
|
- LONG
|
OutMax
|
highest value after conversion
|
- BOOL
|
ClampMinMax
|
Clamp min & max so result does not go above or below set values. 0=No, 1=Yes
|
- LONG
|
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
|
- BOOL
|
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
|
- BOOL
|
ClampMinMax
|
Clamp min & max so result does not go above or below set values. 0=No, 1=Yes
|
- BYTE
|
Return
|
Property reference
|
Properties
|