482
7 APPLICATION INSTRUCTION
7.10 Data control instruction
Zone control of 32-bit binary data
DZONE(P)(_U)
These instructions add the bias value specified by (s1) or (s2) to the input value specified by (s3), and store the operation
result in the device specified by (d).
■Descriptions, ranges, and data types
■Applicable devices
• These instructions add the bias value specified by (s1) or (s2) to the input value (32-bit binary data) specified by (s3), and
store the operation result in the device specified by (d). The bias value is controlled as follows.
• When the output values to be stored in the devices specified by (d) and (d)+1 are 32-bit signed binary values and the
operation result exceeds the range of -2147483648 to 2147483647, the output value is calculated as follows.
Ladder diagram Structured text
ENO:=DZONE(EN,s1,s2,s3,d);
ENO:=DZONEP(EN,s1,s2,s3,d);
ENO:=DZONE_U(EN,s1,s2,s3,d);
ENO:=DZONEP_U(EN,s1,s2,s3,d);
Operand Description Range Data type Data type (label)
(s1) DZONE(P) Negative bias value to be added to the input
value
-2147483648 to +2147483647 32-bit signed binary ANY32
DZONE(P)_U 0 to 4294967295 32-bit unsigned binary
(s2) DZONE(P) Positive bias value to be added to the input value -2147483648 to +2147483647 32-bit signed binary ANY32
DZONE(P)_U 0 to 4294967295 32-bit unsigned binary
(s3) DZONE(P) Input value for performing the zone control -2147483648 to +2147483647 32-bit signed binary ANY32
DZONE(P)_U 0 to 4294967295 32-bit unsigned binary
(d) DZONE(P) Head device number storing the output value
controlled by the zone
32-bit signed binary ANY32
DZONE(P)_U 32-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)
Condition Output value
Input value ((s3), (s3)+1) < 0 Input value ((s3), (s3)+1) + Negative bias value (s1), (s1)+1
Input value ((s3), (s3)+1) = 0 0
Input value ((s3), (s3)+1) > 0 Input value ((s3), (s3)+1) + Positive bias value (s2), (s2)+1
0
Output value (d+1, d)
Input value (s3+1, s3)
Negative bias value (s1+1, s1)
Positive bias value (s2+1, s2)