
7 APPLICATION INSTRUCTION
7.6 Character string operation instruction
391
7
Ex.
When 5 is specified in (n)
• A NULL code (00H), which indicates an end of a character string, is automatically added at the end of the character string
data.
• When the number of extracted characters is odd, "00H" is stored in the upper byte of a device storing the last character.
When the number of extracted characters is even, "0000H" is stored in the device after the last character.
• When the number of characters specified by (n) is 0, a NULL code (00H) is stored in (d).
Precautions
When handling character codes other than ASCII codes, note the following points:
• The number of characters is handled in byte units (8 bits). Accordingly, in the case of character codes in which 2 bytes
express 1 character such as shift JIS codes, 1 character is detected as "2".
• When extracting characters from a character string including character codes in which 2 bytes express 1 character such as
shift JIS codes, consider the number of characters to be extracted in units of character codes for 1 character. Note that the
expected character code is not retrieved if only 1 byte is extracted out of a 2-byte character code.
Operation error
Error code
(SD0/SD8067)
Description
2820
In the corresponding device range of the device specified by (s) and later, "00H" does not exist.
3405
(n) is not within the following range
0 to 16383
The character string specified by (s) has more than 16383 characters.
"n" exceeds the number of characters specified by (s)
3406
The (n) points of data in the device starting from the one specified by (d) exceed the corresponding device range.
41H (A)
42H (B)
43H (C)
44H (D)
31H (1)
32H (2)
33H (3)
34H (4)
45H (E)
46H (F)
31H (1)
32H (2)
33H (3)
34H (4)
35H (5)
00H
35H (5)
00H
"ABCDEF12345"
"12345"
b15
b0
b7
b8
b15
b0
b7
b8
(s)
(s)+1
(s)+2
(s)+3
(s)+4
(s)+5
(d)
(d)+1
(d)+2
ASCII code for 5th character
Summary of Contents for MELSEC iQ-F FX5 series
Page 1: ...MELSEC iQ F FX5 Series Programming Manual Instructions Standard Functions Function Blocks ...
Page 2: ......
Page 21: ...19 PART 1 PART 1 OVERVIEW Part 1 consists of the following chapter 1 OVERVIEW ...
Page 98: ...96 4 STANDARD FUNCTIONS FUNCTION BLOCKS 4 2 Standard Function Blocks MEMO ...
Page 840: ...838 23 TIME DATA FUNCTIONS 23 4 Division MEMO ...
Page 887: ......