FB_SCALING
Description Function Block
The FB_SCALING
function block is used to multiply the AnalogIn
input by the scaling factor and then divided and added to the scaling offset. The AnalogIn
input can be negated. In the case of data types INT
and DINT
, this corresponds to multiplication by –1. For the data types UINT
and UDINT
, this corresponds to an XOR
concatentation with 16#FFFFFF
or 32#FFFFFFFFFF
.
The bFloor
, bCeil
, and bRound
inputs can be used to specify which rounding method to be applied for the internal division.
In addition, the tWatchdog
input can be used to define that the AnalogIn
input must have changed within the specified time. If the AnalogIn
input remains unchanged within the specified time, the bStuckAtError
output is set to TRUE
. If the tWatchdog
input is set to t#0ms
or it is not used, then the check is deactivated. The bStuckAtError
output is not an FB error. As a result, the TwinSAFE group does not enter an error state. It must react to it in the application program.
EL6900
The FB_SCALING
function block is not supported by the EL6900.

Name | Data Type | Initial Value | Description, Parameter Values |
---|---|---|---|
|
|
| Input for scaling. The input can be negated. Permitted data types: |
|
|
| Scale factor Multiplier Only a constant value is permitted (no variable) |
|
|
| Scaling factor divisor Only a constant value is permitted (no variable) |
|
|
| Rounding method: Decimal places are truncated. Only a constant value is permitted (no variable) Only one of the |
|
|
| Rounding method: The next largest integer is returned as the result. Only a constant value is permitted (no variable) Only one of the |
|
|
| Rounding method: Rounded away from zero (for example, 2.5 is rounded up to 3). Only a constant value is permitted (no variable) Only one of the |
|
|
|
|
|
|
| Offset which is added to the analog value Only a constant value is permitted (no variable) |
|
|
| Time (in ms) within which the If the value is |
Name | Data Type | Initial Value | Description, Parameter Values |
---|---|---|---|
|
|
| Becomes |
|
|
| Output with the scaled input signal
Permitted data types: |
|
|
|
|