String Data - Mitsubishi MELSEC-Q Series Programming Manual

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

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec-l seriesMelsec-f series

Table of Contents