Delta AS Series Programming Manual page 327

Hide thumbs Also See for AS Series:
Table of Contents

Advertisement

A S S er i es Pr og r am m ing M an u a l
Example 1
Adding 16-bit binary values: when X0.0 is ON, the instruction adds the addend in D10 to the augend in D0, and stores
the sum in D20.
When the values in D0 and D10 are 100 and 10 respectively, D0 plus D10 equals 110, and 110 is stored in D20.
When the values in D0 and D10 are 16#7FFF and 16#1 respectively, D0 plus D10 equals 16#8000, and 16#8000
is stored in D20.
When the values in D0 and D10 are 16#FFFF and 16#1 respectively, D0 plus D10 equals 16#10000. Since the
operation result exceeds the range of 16-bit binary values, SM602 is ON, and the value stored in D20 is 16#0.
Since the operation result is 16#0, SM600 is ON.
Example 2
_6
Adding 32-bit binary values: when X0.0 is ON, the instruction adds the addend in (D41, D40) to the augend in (D31,
D30), and stores the sum in (D51, D50). The data in D30, D40, and D50 is the lower 16-bit data, whereas the data in
D31, D41, and D51 is the higher 16-bit data.
When the values in (D31, D30) and (D41, D40) are 11111111 and 44444444 respectively, (D31, D30) plus (D41,
D40) equals 55555555, and 55555555 is stored in (D51, D50).
When the values in (D31, D30) and (D41, D40) are 16#80000000 and 16#FFFFFFFF respectively, (D31, D30) plus
(D41, D40) equals 16#17FFFFFFF. Since the operation result exceeds the range of 32-bit binary values, SM602 is
ON, and the value stored in (D51, D50) is 16#7FFFFFFF.
6 - 4 8

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents