AH500 Programming Manual value in D should be within the range described below. If the instruction ZONE is executed, the negative deviation in S 1 , the positive deviation in S 2 , the input value in S 3 , and the output value in D is within the range between -32768 and 32767. Suppose the negative deviation in S 1 is -100 and the input value in S 3 is -32768. The output value in D is calculated as follows. Output value in D =(-32768)+(-100)=16#8000+16#FF9C=16#7F9C=32668 If the instruction DZONE is executed, the negative deviation in S 1 , the positive deviation in S 2 , the input value in S 3 , and the output value in D is within the range between -2147483648 and 2147483647.
Suppose the negative deviation in ( S 1 +1, S 1 ) is -1000 and the input value in ( S 3 +1, S 3 ) is -2147483648. The output value in ( D +1, D ) is calculated as follows. Output value in ( D +1, D) =-2147483648+(-1000)=16#80000000+16#FFFFFC18=16#7FFFFC18=2147482648 Example 1: When X0.0 is ON, -100 or 100 is added to the binary-coded decimal value in X1, and the sum is stored in D10. The execution results: Example 2: When X0.0 is ON, -10000 or 10000 is added to the binary-coded decimal value in (X2, X1), and the sum is stored in (D11, D10).
6-306 Negative Positive Input value in Output value in Function deviation deviation D0 D10 -100 100 -10 D0 D10=(-10)+(-100) -110 0 D0=0=>D10=0 0 50 D0>0=>D10=50+100 150