7.11 String Processing Instructions
7.11.15 Extraction of character string data from right/left
7-213
7
APPLI
C
A
T
IO
N
INSTRUCTIONS
RI
GHT
, L
E
FT
RIGHT, LEFT
When n 5
(2) The NULL code (00
H
) indicating the end of the character string is automatically appended at
the end of the character string data. For the format of the character string data, refer to
Section 3.4.5.
(3) If the number of characters specified for n is 0, the NULL code (00
H
) will be stored to
.
LEFT(P)
(1) Stores n characters from the left side of the character string data (the beginning of the
character string data) which is stored in the device specified for
and the following
devices, to the device specified for
and the following devices.
When n 7
(2) The NULL code (00
H
) indicating the end of the character string is automatically appended to
the end of the character string data.
For the format of the character string data, refer to Section 3.4.5.
(3) If the number of characters specified for n is 0, the NULL code (00
H
) will be stored to
.
O
peration Error
In any of the following cases, an operation error occurs, the error flag (SM0) is turned ON, and
the corresponding error code is stored to SD0.
• The value of n exceeds the number of characters specified for
.
(Error code: 4101)
• The range of n characters from
exceeds the corresponding device.
(Error code: 4101)
+1
41
H
(A)
42
H
(
B
)
43
H
(C)
44
H
(
D
)
+1
31
H
(1)
32
H
(2)
33
H
(3)
34
H
(4)
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
+2
35
H
(5)
00
H
ASCII
co
d
e
for
the
5
th
character
"A
B
C
D
EF12345"
"12345"
b15
b8b7
b0
s
s
s
s
s
s
d
d
d
b15
b8b7
b0
d
s
d
+1
ASCII
co
d
e
for
the
1
st
character
ASCII
co
d
e
for
the
2
n
d
character
ASCII
co
d
e
for
the
3
r
d
character
ASCII
co
d
e
for
the
4
th
character
ASCII
co
d
e
for
the
(
n
- 2)
th
character
ASCII
co
d
e
for
the
(
n
- 1)
th
character
ASCII
co
d
e
for
the
nth
character
ASCII
co
d
e
for
the
(
n
+ 1)
th
character
ASCII
co
d
e
for
the
l
ast
character
00
H
+1
ASCII
co
d
e
for
the
1
st
character
ASCII
co
d
e
for
the
2
n
d
character
ASCII
co
d
e
for
the
3
r
d
character
ASCII
co
d
e
for
the
4
th
character
ASCII
co
d
e
for
the
(
n
- 2)
th
character
ASCII
co
d
e
for
the
(
n
- 1)
th
character
ASCII
co
d
e
for
the
nth
character
00
H
s
s
d
b15
b8b7
b0
d
b15
b8b7
b0
+1
41
H
(A)
42
H
(
B
)
43
H
(C)
44
H
(
D
)
+2
45
H
(E)
46
H
(F)
ASCII
co
d
e
for
the
7
th
character
"A
B
C
D
EF1"
+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
"A
B
C
D
EF12345"
b15
b8b7
b0
s
s
s
s
s
s
d
d
d
b15
b8b7
b0
d
d
s
d
Summary of Contents for MELSEC Q Series
Page 1: ...Structured Programming Manual Mitsubishi Programmable Controller QCPU Common Instructions ...
Page 2: ......
Page 14: ...A 12 MEMO ...
Page 340: ...6 178 MEMO MTR ...
Page 708: ...7 368 MEMO ...
Page 776: ...8 68 MEMO ...
Page 796: ...9 20 MEMO ...
Page 804: ...App 8 MEMO ...
Page 812: ...Index 8 MEMO ...
Page 815: ......