String Data - Mitsubishi Electric MELSEC Q Series Structured Programming Manual

Fundamentals
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

4.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.
M0
" "
(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).
M0
"ABCD"
(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 fractional part).
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
"ABCDE"
$MOV
EN
ENO
s
d
Var_D0
D0 NULL
Transfers character string data
Specification of NULL code (00
$MOV
EN
ENO
s
d
Var_D0
D0
D1
D2
Transfers character string data
Specification of a character string
composed of even numbers
$MOV
EN
ENO
s
d
Var_D0
D0
D1
D2
Transfers character string data
Specification of a character string
composed of odd numbers
)
H
42
41
H
H
44
43
H
H
NULL
42
41
H
H
44
43
H
H
NULL
45
H
4.4 Method for Specifying Data
4.4.5 String data
4
4-33

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l seriesMelsec-f

Table of Contents