Delta AH500 — 6.2.2 Explanation of Arithmetic Instructions

Chapter 6 Applied Instructions API 0112 Symbol: S 1 : Augend Word S 2 : Addend Word n : Data length Word D : Sum Word 1. n pieces of data in devices starting from S 2 are added to those in devices starting from S 1 . The augends and the addends are binary numbers, and the sums are stored in D . 2. The operand n should be within the range between 1 and 256. 3. When the operation result is zero, SM600 is ON. 4. When the operation result is less than –32,768, SM601 is ON. 5. When the operation result is larger than 32,767, SM602 is ON. 6. When the operand S 2 is a device (not a constant or a hexadecimal value): Explanation: . . . . . S +n-1 1 2 } } . . . . .

D +n-1 } S 1 S 1 +1 1 2 S 2 S 2 +1 1 2 D D +1 1+1=2 2+2=4 . . . . . S +n-1 . . n n + . . n = . . S . . S . . S+S=10 . . 7. When the operand S 2 is a constant or a hexadecimal value: S 1 . . . . . S 1 2 } } 10 1 S 2 . . . . . D +n-1 } D D +1 1+10=11 . . . . . S +n-1 S 1 +1 . . 2 n n + S 2 10 . . n = 2+10=12 . . . . . . . . S 10 S+10=1S Example 1: When X0.0 is ON, the binary values in D10~D14 are added to the binary values in D0~D4, and the sums are stored in D100~D104.

6-61 Instruction code Operand Function BK+ P S , S , n, D 1 2 Addition of binary numbers in blocks Device X Y M S T C HC D L SM SR E PR K 16# “$” DF S 1           S 2             n             D           Pulse instruction 16-bit instruction (9 steps) 32-bit instruction AH500 AH500 -