The LSLIM function block limits an input value between two reference values. The block has options that set the output to a default value or the last value if the input becomes out of range.
IN is the analog input value and status.
OUT is the analog output value and status.
LIM_INDICATOR is set True (1) when the input is limited to the OUT_HI_LIM value. It remains True until the input is limited to the OUT_LO_LIM value, at which time it is set False (0). It remains False until the input is again limited to the OUT_HI_LIM value.
OUT_LO_ACT is a Boolean value set True when the input is limited to the minimum value.
OUT_HI_ACT is a Boolean value set True when the input is limited to the maximum value.
If the LIMIT_OPT option is CLAMP, then OUT is set to either OUT_HI_LIMIT or OUT_LO_LIMIT when there is a corresponding limit violation.
You can use other LIMIT_OPT options instead of passing the clamped value to the output. If the USE_LAST option is set then the output is set to the last output when the high or low limit is exceeded. If the USE_DEFAULT option is set then the output is set to the DEFAULT parameter value.
The following diagram shows the internal components of the LSLIM function block.