Function blocks
Function blocks for TwinSAFE logic components 161
3.25 The function block LOADSENSING
3.25.1 Functional description
The FB LoadSensing can be used to check the AnalogInX and AnalogInY inputs; specifically, whether the
AnalogInY values are within a certain range at position AnalogInX. The input data types INT16, INT32,
UINT16 and UINT32 are permitted. For the AnalogInY values in the table there is a warning level and a
switch-off level. The Outside parameter can be used to specify whether the AnalogInY value has to be
within or outside the defined window.
If Inactive=FALSE, the largest index is determined whose corresponding X-value is still smaller than the
AnalogInX input. The system then checks whether the AnalogInY input is within the corresponding switch-
off level (Y1, Y2) or within the warning level (WY1, WY2). If the value is within the switch-off level, the
Valid output is set. If the value is between the Y1 and WY1 or Y2 and WY2, the Warning output is set in
addition. There can be up to 25 indices.
The Outside parameter can be used to reverse the test, in which case values outside Y1 and Y2 are valid
and the output Valid is set. In this case the warning level must be greater than the switch-off level.
The data in the value table are checked based on the following formulas:
Outside = FALSE: Y1[index] <= WY1[index] < WY2[index] <= Y2[index]
Outside = TRUE: WY1[index] <= Y1[index] < Y2[index] <= WY2[index]
Figure 3-104: Function block LOADSENSING