Function blocks
3.23 The function block SCALE
3.23.1 Functional description
The FB SCALE is used to multiply the AnalogIn input with the scaling factor and then divided before the
scaling offset is added. The input data types INT16, INT32, UINT16 and UINT32 are permitted. The
output must be selected to match the input types. The AnalogIn input can be negated. For data types
INT16 and INT32 this corresponds to multiplication with -1, for data types UINT16 and UINT32 it
corresponds to an XOR function with 0xFFFF or 0xFFFFFFFF.
The Division Rounding parameter can be used to specify the rounding method to be used for the internal
division.
Parameter
Floor
Ceil
Round
The parameter Multiplication First can be used specify whether the first scaling operation after the
optional negation should be multiplication (TRUE) or division (FALSE).
In addition, the parameter watchdog (ms) can be used to specify that the AnalogIn input must have
changed within the specified time. If the input remains unchanged within the specified time, the
StuckAtError output is set to TRUE. If the parameter is set to 0, the check is turned off. The StuckAtError
output is not a FB error, which means the TwinSAFE group does not enter an error state. The application
program must respond to this.
KL6904/EL6900
The function block SCALE is not available in the KL6904 and the EL6900.
152
Rounding method
Decimal places are truncated
The next higher integer is returned as result
Commercial rounding is used (e.g. 2.5 is rounded to 3)
Figure 3-96: Function block SCALE
NOTE
Function blocks for TwinSAFE logic components
Need help?
Do you have a question about the TwinSAFE logic FB and is the answer not in the manual?
Questions and answers