AH500 Programming Manual 5. If the value in S 3 is equal to 0, the instruction is not executed. Example: When M0 is ON, the data in D0~D7 is “1234ABAB1234AB”, and the data in D10~D11 is “CDEF”. When the instruction $RPLC is executed, the characters in D0~D7 starting from the character indicated by the value in D51 are replaced by the characters in D10~D11. The number of characters which are replaced is indicated by the value in D50, and the result is stored in D20~D27. If the values in D50 and D51 are 3 and 4 respectively, the execution result is as follows.
b15 b0 b7 b8 b15 b0 b7 b8 D1 D0 D20 D21 D2 D22 D3 D4 After the instruction is executed D23 D24 D6 D5 D25 D26 D7 D27 D10 D11 D12 D50 4 4 Number of characters which are replaced Character which is replaced D51 6-488 16#32(2) 16#31(1) 16#34(4) 16#33(3) 16#42(B) 16#41(A) 16#42(B) 16#41(A) 16#32(2) 16#31(1) 16#34(4) 16#33(3) 16#42(B) 16#41(A) Ignored 16#00 16#32(2) 16#31(1) 16#43(C) 16#33(3) 16#45(E) 16#44(D) 16#42(B) 16#46(F) 16#32(2) 16#31(1) 16#34(4) 16#33(3) 16#42(B) 16#41(A) 16#0000 16#44(D) 16#43(C) 16#45(F) 16#45(E) Ignored 16#00