Download Print this page

Mitsubishi Electric MELSEC iQ-F FX5 Programming Manual page 465

Instructions, standard functions/function blocks
Hide thumbs Also See for MELSEC iQ-F FX5:

Advertisement

Ex.
When 7 is specified in (n)
b15
b8
b7
(s)
42H (B)
(s)+1
44H (D)
(s)+2
46H (F)
(s)+3
32H (2)
(s)+4
34H (4)
00H
(s)+5
"ABCDEF12345"
(1): ASCII code for 7th character
• 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
Description
(SD0/SD8067)
2820H
In the corresponding device range of the device specified by (s) and later, "00H" does not exist.
3405H
(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)
3406H
The (n) points of data in the device starting from the one specified by (d) exceed the corresponding device range.
b0
b15
41H (A)
(d)
43H (C)
(d)+1
45H (E)
(d)+2
31H (1)
(d)+3
33H (3)
35H (5)
(1)
b8
b7
b0
42H (B)
41H (A)
44H (D)
43H (C)
46H (F)
45H (E)
00H
31H (1)
"ABCDEF1"
8 APPLICATION INSTRUCTION
8.8 Character String Operation Instruction
8
463

Hide quick links:

Advertisement

loading