Delta AH500 — 6.21.2 Explanation of String Processing Instructions

AH500 Programming Manual API 2119 Symbol: S 1 : String Word S 2 : String which is inserted Word S 3 : The string is inserted into S 1 after the D : Device in which the execution result is character indicated by the value in S 3 . Word stored Word Explanation: 1. The string in S 2 is inserted into the string in S 1 after the character indicated by the value in S 3 , and the result is stored in D . 2. If the string in either S 1 or S 2 is a null string, the other string which is not a null string is stored in D . 3. If the strings in S 1 and S 2 are null strings, 16#0000 is stored in D .

b15 b0 b7 b8 b15 b0 b7 b8 S1 +1 S1 D +1 D +2 S1 +3 S1 +2 D +3 D +4 S1 After the instruction is executed +4 D +5 S1 +5 D +6 D D S2 +1 S2 S2 6 S3 When M0 is ON, the data in D0~D3 is “1234567”, and the data in D10 is “AB”. When the instruction $INS is executed, “AB” is inserted into the string in D0~D3 after the character indicated by the value in D30. The result is stored in D20~D24. Example:

6-494 Instruction code Operand Function $INS P S , S , S , D 1 2 3 Inserting the string Device X Y M S T C HC D L SM SR E PR K 16# “$” DF S 1         S 2          S 3            D        Pulse instruction 16-bit instruction (9-15 steps) 32-bit instruction AH500 AH500 - 16#32(2) 16#31(1) 16#34(4) 16#33(3) 16#36(6) 16#35(5) 16#38(8) 16#37(7) 16#30(0) 16#39(9) 16#00 16#32(2) 16#31(1) 16#34(4) 16#33(3) 16#36(6) 16#35(5) 16#4E(N) 16#4D(M) 16#38(8) 16#37(7) 16#30(0) 16#39(9) 16#00 16#4E(N) 16#4D(M) 16#00