Jose,
The LIM instruction is like two comparison instructions combined (ANDed) together. There are two major variations:
1. NORMAL CASE: When the Low Limit value is less than High Limit:
IF (TEST >= LOW LIMIT) AND (TEST <= HIGH LIMIT), THEN OUTPUT = TRUE
(Notice that when Test = Low or High Limit, ouput is TRUE).
2. ABNORMAL CASE: When the Low Limit value is entered as greater than or equal to the High Limit:
IF (TEST > LOW LIMIT) AND (TEST < HIGH LIMIT), THEN OUTPUT = FALSE
(Notice that when Test = Low or High Limit, ouput is TRUE).
In both cases, if the test value is outside the comparison limits, then the output is the opposite of those shown above.