554
LIMIT, LIMITP, DLIMIT, DLIMITP
DLIMIT
(1) The function controls the output value to be stored at the device designated by ( , +1) by checking whether the input
value (BIN 32 bits) designated by ( , +1) is within the range of upper and lower limit values specified by ( , +1)
and ( , +1) or not.
(2) The values designated by ( , +1), ( , +1), or ( , +1) are within the range of -2147483648 to 2147483647.
(3) To perform controls based only on the upper limit value, set the lower limit value designated by ( , +1) to
"-2147483648".
(4) To perform controls based only on the lower limit value, set the upper limit value designated by ( , +1) to
"2147483647".
Operation Error
(1) In the following case, an operation error occurs, the error flag (SM0) turns ON, and an error code is stored into SD0.
Program Example
(1) The following program conducts limit controls from 500 to 5000 on the data set as BCD values from X20 to X2F, and
stores the result at D1 when X0 is turned ON.
[Ladder Mode] [List Mode]
Error
code
Error details
Q00J/
Q00/
Q01
QnH QnPH QnPRH QnU LCPU
4100
The lower limit value specified in is greater than the upper limit value
specified in .
–– –– –– ––
D D
S3 S3
S1 S1
S2 S2
Input value
Lower limit value
Upper limit value
Input value
Lower limit value
Input value
Upper limit value
Input value Output value
Output value
Upper limit value
Lower limit value
Output value
+1
+1
+1
+1
+1
D
S1
S2
S3
D
S1
S2
S1
S3
S1
+1
S1 S1
+1
S3 S3
+1
S3 S3
+1
D
D
+1
D
D
+1
S2 S2
+1
S2
S2
+1
S3
S3
When
When
When
S1
Value designated by
+1,
Value designated by
Output value ( )
S3
+1,
S3
S2
+1,
S2
Output value ( )
D
+1,
D
S1
0
S1 S1
S2 S2
S3 S3
S1 S1
S2 S2
S1
S2
Step Instruction Device