3-16
3.4 Method for Specifying Data
3.4.5 String data
3.4.5
String data
String data are character data used in basic instructions and application instructions.
From the specified character to the NULL code (00H) that indicates the end of the character
string are the target string data.
(1) When the specified character is NULL code
The NULL code is stored by using one word.
(2) When the number of characters is an even number
Character string data and NULL code are stored by using the 'number of characters /2+1'
words.
For example, when 'ABCD' is transferred to word devices starting from D0, the character
string 'ABCD' is stored to D0 and D1, and the NULL code to D2. (The NULL code is stored to
the last one word).
(3) When the number of characters is an odd number
Character string data and NULL code are stored by using the 'number of characters /2'
words (Rounding the decimal fraction).
For example, when 'ABCDE' is transferred to word devices starting from D0, the character
string 'ABCDE' and the NULL code are stored to D0 to D2. (The NULL code is stored to the
higher 8 bits of the last one word).
M0
$MOV
EN
ENO
d
s
var_D0
" "
D0 N
U
LL
S
p
eci
f
ication o
f
N
U
LL code (00
H
)
Trans
f
ers c
h
aracter string data
"ABCD"
D0
4
2
H
44
H
4
1
H
43
H
N
U
LL
D
1
D
2
Trans
f
ers c
h
aracter string data
S
p
eci
f
ication o
f
a c
h
aracter string
com
p
osed o
f
even num
b
ers
M0
$MOV
EN
ENO
d
s
var_D0
"ABCDE"
D0
D
1
D
2
Trans
f
ers c
h
aracter string data
S
p
eci
f
ication o
f
a c
h
aracter string
com
p
osed o
f
odd num
b
ers
M0
$MOV
EN
ENO
d
s
var_D0
4
2
H
44
H
4
1
H
43
H
N
U
LL
4
5
H
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: ......