AH500 Programming Manual 
6-488 
If the values in D50 and D51 are 4 and 4 respectively, the execution result is as follows. 
 b15
 b0
 b7 b8
 000016#
 D1
 D2
 D3
16#31(1) 16#32(2)
 33(3)16# 34(4)16#
 42(B)16#
 41(A)16#
 41(A)16#
 42(B)16#
 31(1)16#
 D4
 b15
 b0
 b7 b8
 43(C)16#
 44(D)16#
 D5
 32(2)16#
 4
 4
 33(3)16#
 34(4)16#
 42(B)16#
 41(A)16#
 D50
 D51
 D0
 45(E)16#
 45(F)16#
 D6
 D7
 D21
 D22
 D23
 D24
 D25
 D20
 D26
 D27
16#31(1) 32(2)16#
 33(3)16# 43(C)16#
 45(E)16#
 44(D)16#
 46(F)16#
 42(B)16#
 (1)16#31
 (2)16#32
 33(3)16#
 34(4)16#
 42(B)16#
 (A)16#41
 D10
 D11
 16#00 Ignored
 D12
 16#00 Ignored
 After the instruction 
 is executed
 Character which is replaced
 N
umber of characters which are replaced
 
If the values in D50 and D51 are 20 and 4 respectively, the execution result is as follows. 
 b15
 b0
 b7 b8
 D1
 D2
 D3
16#31(1) 16#32(2)
 33(3)16# 34(4)16#
 42(B)16#
 41(A)16#
 41(A)16#
 42(B)16#
 31(1)16#
 D4
 b15
 b0
 b7 b8
 43(C)16#
 44(D)16#
 D5
 32(2)16#
 20
 4
 33(3)16#
 34(4)16#
 42(B)16#
 41(A)16#
 D50
 D51
 D0
 45(E)16#
 45(F)16#
 D6
 D7
 D21
 D22
 D23
 D20
16#31(1) 32(2)16#
 33(3)16# 43(C)16#
 45(E)16#
 44(D)16#
 46(F)16#
 D10
 D11
 0016#
 0016#
 Ignored
 D12
 0016# Ignored
 After the instruction 
 is executed
 Character which is replaced
 Number of characters which are replaced
 
If the values in D50, D51, and D10 are 3, 4, and 16#00 respectively, the execution result is as 
follows. The three characters in D0~D7 starting from the fourth character are deleted.   
 b15
 b0
 b7 b8
 0016#
 D1
 D2
 D3
16#31(1) 16#32(2)
 33(3)16# 34(4)16#
 42(B)16#
 41(A)16#
 41(A)16#
 42(B)16#
 31(1)16#
 D4
 b15
 b0
 b7 b8
 D5
 32(2)16#
 3
 4
 33(3)16#
 34(4)16#
 42(B)16#
 41(A)16#
 D50
 D51
 D0
 D6
 D7
 D21
 D22
 D23
 D24
 D25
 D20
16#31(1) 32(2)16#
 33(3)16# 41(A)16#
 42(B)16#
 31(1)16#
 32(2)16#
 33(3)16#
 34(4)16#
 41(A)16#
16#42(B)
 D10
 0016#
 0016#
 After the instruction 
 is executed
 Character which is replaced
 Number of characters which are replaced
 
Additional remark: 
1.  If the string in S
1
 does not end with -S
1
, SM0 is ON, and the error code in SR0 is 16#2003.