7 APPLICATION INSTRUCTIONS
7.11 Character String Processing Instructions
577
7
■LEFT
• Stores n number of characters from the left side of the character string (the beginning of the character string) being stored
in devices starting from that whose number is designated by (S), in devices starting from that whose number designated by
(D).
When n=7
• The NULL code (00H) indicating the end of the character string is automatically added to the end of the character string.
Refer to Page 91 Using character string data for the format of the character string data.
• If the number of characters designated by n is "0", the NULL code (00H) will be stored at (D).
• In any of the following cases, an operation error occurs, the error flag (SM0) turns ON, and an error code is stored into SD0.
Error
code
Error details Q00J/
Q00/
Q01
QnH QnPH QnPRH QnU LCPU
4100 The character number of character string designated by (S) is "0".
4101 The value of n exceeds the number of characters specified by (S).
The range of the device specified by (D) exceeds the range from (D) to (D) +
the number of characters specified in n (including (D)).
+1
ASCII code for the 1st character
ASCII code for the 2nd character
ASCII code for the 3rd characterASCII code for the 4th character
ASCII code for the (n - 2)th character
ASCII code for the (n - 1)th character
ASCII code for the nth character
ASCII code for the (n + 1)th character
ASCII code for the last character
00
H
+1
ASCII code for the 1st characterASCII code for the 2nd character
ASCII code for the 3rd character
ASCII code for the 4th character
ASCII code for the (n - 2)th character
ASCII code for the (n - 1)th character
ASCII code for the nth character
00
H
S
S
D
b15 b8b7 b0
D
b15 b8
b7
b0
+1
41
H
(A)42
H
(B)
43
H
(C)44
H
(D)
+2
45
H
(E)46
H
(F)
ASCII code for the
7th character
"ABCDEF1"
+3
31
H
(1)00
H
+1
41
H
(A)42
H
(B)
43
H
(C)44
H
(D)
45
H
(E)46
H
(F)
31
H
(1)32
H
(2)
33
H
(3)34
H
(4)
35
H
(5)
00
H
+2
+3
+4
+5
"ABCDEF12345"
b15 b8b7 b0
S
S
S
S
S
S
D
D
D
b15 b8b7 b0
D