Delta AH500 — 6.2.2 Explanation of Arithmetic Instructions

Chapter 6 Applied Instructions Symbol: S 1 : String 1 Word S 2 : String 2 Word D : Device in which the string is stored Word Explanation: 1. When the instruction is executed, the string starting with the data in the device specified by S 1 (exclusive of 16#00), and the string starting with the data in the device specified by S 2 (exclusive of 16#00) are linked and moved to the operand D . Besides, the code 16#00 is added to the end of the linked string in the operand D . When the instruction is not executed, the data in D is unchanged. 2. The string in the operand S 1 and the string in the operand S 2 are linked and moved to the operand D , as illustrated below.

S 1 S 2 D S 1 +1 S 2 +1 = D +1 S 1 +2 2 S 1 +2 D +2 D +3 D 1 +4 Turning into 16#00 automatically S 1 S 2 D S 1 +2 2 S 1 +2 D +2 S 1 +1 S 2 +1 = D +1 D +3 D 1 +4 3. When S 1 or S 2 is not a string, the code 16#00 should be added to the end of the data which is moved. 4. Suppose S 1 or S 2 is not a string. When the instruction is executed and the first character is the code 16#00, 16#00 is still linked and moved. 5. For a string “abcde” in S 1 will be shown as below.

Turning into 16#00 automatically S 1 S 1 +1 S 1 +2 6-65 API Instruction code Operand Function 0114 $+ P S , S , D 1 2 Linking the strings Device X Y M S T C HC D L SM SR E PR K 16# “$” DF S 1           S 2           D          Pulse instruction 16-bit instruction (7-19 steps) 32-bit instruction AH500500 AH500500 - b(16#62) a(16#61) d(16#64) c(16#63) (16#00) e(16#65) B(16#42) A(16#41) D(16#44) C(16#43) (16#00) (16#00) b(16#62) a(16#61) d(16#64) c(16#63) A(16#41) e(16#65) C(16#43) B(16#42) (16#00) D(16#44) Turning into b(16#62) a(16#61) d(16#64) c(16#63) e(16#65) (16#00) B(16#42) A(16#41) D(16#44) C(16#43) (16#00) (16#00) b(16#62) a(16#61) d(16#64) c(16#63) B(16#42) A(16#41) D(16#44) C(16#43) (16#00) (16#00) b(16#62) a(16#61) d(16#64) c(16#63) (16#00) e(16#65)