472
7 APPLICATION INSTRUCTION
7.10 Data control instruction
7.10 Data control instruction
Upper and lower limit control of 16-bit binary data
LIMIT(P)(_U)
These instructions control the output value to be stored in the device specified by (d) by checking the input value (16-bit binary
data) in the device specified by (s3) with the upper and lower limit values specified by (s1) and (s2).
*1 The LIMIT_U instruction is not supported by the ST language. Use LIMIT of the standard function.
Page 806 LIMIT(_E)
■Descriptions, ranges, and data types
■Applicable devices
Ladder diagram Structured text
*1
ENO:=LIMIT(EN,s1,s2,s3,d);
ENO:=LIMITP(EN,s1,s2,s3,d);
ENO:=LIMITP_U(EN,s1,s2,s3,d);
Operand Description Range Data type Data type (label)
(s1) LIMIT(P) Lower limit value (minimum output value) -32768 to 32767 16-bit signed binary ANY16
LIMIT(P)_U 0 to 65535 16-bit unsigned binary
(s2) LIMIT(P) Upper limit value (maximum output value) -32768 to 32767 16-bit signed binary ANY16
LIMIT(P)_U 0 to 65535 16-bit unsigned binary
(s3) LIMIT(P) Input value controlled by the upper and lower limit values -32768 to 32767 16-bit signed binary ANY16
LIMIT(P)_U 0 to 65535 16-bit unsigned binary
(d) LIMIT(P) Head device number storing the output value controlled by
the upper and lower limit values
16-bit signed binary ANY16
LIMIT(P)_U 16-bit unsigned binary
Operand Bit Word Double word Indirect
specification
Constant Others
X, Y, M, L,
SM, F, B, SB
U\G T, ST,
C, LC
T, ST, C, D,
W, SD, SW, R
U\G Z LC LZ K, H E $
(s1)
(s2)
(s3)
(d)