7 APPLICATION INSTRUCTIONS
7.13 Data Control Instructions
669
7
■DZONE
• Adds bias value designated by ((S1), (S1)+1) or ((S2), (S2)+1) to input value designated by ((S3), (S3)+1), and stores the
result at device number designated by ((D), (D)+1). Addition of the bias value is performed as follows:
• The values designated by ((S1), (S1)+1), ((S2), (S2)+1), or ((S3), (S3)+1) are within the range of from -2147483648 to
2147483647.
• The value stored at ((D), (D)+1) is a signed 32-bit BIN value. Therefore, if the operation results exceed the range of from -
2147483648 to 2147483647, the following takes place:
When negative bias value ((s1), (s1)+1) is -1000 and input value ((s3), (s3)+1) is -2147483648
-2147483648 + (-1000) = 80000000H + FFFFFC18H = 7FFFFC18H = 2147482648
• There is no operation error in the ZONE(P) or DZONE(P) instruction.
• The following program performs zone control by applying negative and positive bias values of -100 to 100 for the data set at
D0 and stores the result of control at D1 when X0 is turned ON.
• The following program performs zone control by applying negative and positive bias values of -10000 to 10000 for the data
set at D0 and D1 and stores the result of control at D10 and D11 when X1 is turned ON.
Condition Result
When input value ((S3)+1, (S3)) < 0 Input value ((S3)+1, (S3)) + Negative bias value ((S1)+1, (S1)) Output
value ((D)+1, (D))
When input value ((S3)+1, (S3)) = 0 0 Output value ((D)+1, (D))
When input value ((S3)+1, (S3)) > 0 Input value ((S3)+1, (S3)) + Positive bias value ((S2)+1, (S2)) Output value
((D)+1, (D))
[Ladder Mode] [List Mode]
[Operation]
• The value (D0) + (-100) is stored at D1 if D0 < 0. (example: D0 = -200 D1 = -300)
• The value 0 is stored at D1 if D0 = 0.
• The value of (D0) + 100 is stored at D1 if 0 < D0. (example: D0 = 700 D1 = 800)
[Ladder Mode] [List Mode]
[Operation]
• The value (D1, D0) + (-10000) is stored at (D11, D10) if (D1, D0) < 0. (example: (D1, D0) = -12345 (D11, D10) = -22345)
• The value 0 is stored at (D11, D10) if (D1, D0) = 0.
• The value (D1, D0) +10000 is stored at (D11, D10) if 0 < (D1, D0). (example: (D1, D0) = 50000 (D11, D10) = 60000)
Positive bias value
Negative bias value
S2
( , +1)
S2
D
Output value ( +1, )
D
Input value
( , +1)
S3 S3
S1
( , +1)
S1
0
Step
Instruction
Device