32
1 OVERVIEW
1.2 Data Specification Method
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.
Character string data is stored in devices or an array in ascending order of device numbers or array element numbers.
Data range
The following table summarizes the ranges of character string data.
*1 When specifying a character string in the program, enclose it in single quotes (').
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.
Character string data storage location
An image of the character string data storage location is shown below.
â– Character strings
In each character string storage image, "NULL" indicates a NULL code (00H).
Type Character code Last character
Character string ASCII code NULL(00H)
Type Maximum number of character strings
*1
Maximum number of character strings that can
be handled in the program
Character string 255 single-byte characters (excluding the last NULL
character)
16383 characters (excluding the last NULL character)
Number of character string bytes Number of words required for storing character strings
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 string
to be stored
Image of storing character string data from D0 Image of storing character string data from word type
label array arrayA[0]
' ' (null character
string)
'ABC'
'ABCD'
ABC ∙∙∙ XYZ
'ABC ∙∙∙ XYZ'
Device number
or array element
number
Lower Upper
Null code
Character
code string
arrayA[0]
NULL NULL
arrayA[0]
arrayA[1]
B
NULL
A
C
arrayA[0]
arrayA[1]
arrayA[2]
B
D
A
C
NULL NULL