The LSLIM function block restricts the output value between a high limit and a low limit. When IN is less than or equal to the configured minimum value (OUT_LO_LIM), OUT equals OUT_LO_LIM and OUT_LO_ACT is set True.
When IN is greater than or equal to the configured maximum value (OUT_HI_LIM), OUT equals OUT_HI_LIM and OUT_HI_ACT is set True.
When the value is within the limits, OUT_HI_ACT and OUT_LO_ACT are set False.
When IN becomes greater than or equal to OUT_HI_LIM, LIM_INDICATOR is set True.
When IN becomes less than or equal to OUT_LO_LIM, LIM_INDICATOR is set False.
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 table shows an example of the Limit function block outputs when OUT_LO_LIM = 5 and OUT_HI_LIM = 90:
IN |
OUT |
OUT_LO_ACT |
OUT_HI_ACT |
LIM_INDICATOR |
|---|---|---|---|---|
0 |
5 |
True |
False |
False |
5 |
5 |
True |
False |
False |
50 |
50 |
False |
False |
Equal to the previous value |
90 |
90 |
False |
True |
True |
100 |
90 |
False |
True |
True |