Character String Data - Mitsubishi Electric MELSEC iQ-R Series Programming Manual

Motion module instructions, standard functions/ function blocks
Hide thumbs Also See for MELSEC iQ-R Series:
Table of Contents

Advertisement

Character string data

Format of character string data
The following table lists the types of character string data, each of which ends with a NULL code to be handled as a character
string.
Type
Character string
Character string [Unicode]
Character string data is stored in devices or an array in ascending order of device numbers or array element numbers.
Lower
(1)
ABC ∙∙∙ XYZ
"ABC ∙∙∙ XYZ"
(1) Character code string
Notation of character string
The following shows the notation of character strings in ST programs.
Data type
String
STRING
Character string
WSTRING
[Unicode]
Data range
The following table summarizes the ranges of character string data.
Type
Character string
*1
Character string [Unicode]
*1 For the character string [Unicode], characters up to the basic multilingual plane can be used.
Number of words required for storing data
Character string data can be stored in word devices.
The following table lists the numbers of words required for storing character string data.
Number of
Number of words required for storing character
character string
strings
bytes
0 byte
1 [word]
Odd number of bytes
(Number of character string bytes+1) ÷ 2 [words]
Even number of bytes
(Number of character string bytes÷2) +1 [words]
Character code
ASCII code, Shift JIS code
Unicode (UTF-16 (little endian))
Upper
NULL
Notation
Enclose a string (ASCII code, Shift JIS code) in single quotation marks (').
Enclose a character string [Unicode] in double quotation marks (").
Maximum number of characters that can be set
in a label
255 single-byte characters (excluding the last NULL
character)
255 characters (excluding the last NULL character)
Last character
NULL(00H)
NULL(0000H)
Example
"ABC"
"ABC"
Maximum number of characters that can be
used for character string constant
16383 characters (excluding the last NULL character)
Number of words required for storing character
strings [Unicode]
1 [word]
 (because one character is an even number of bytes)
Number of characters+1 [words]
1.2 Data Specification Method
1
1 OVERVIEW
27

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents