Download Print this page

Mitsubishi Electric MELSEC iQ-F FX5 Programming Manual page 471

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

Advertisement

• When (s2)+1 (the number of characters to be extracted) is "-1", the entire character string stored in (s1) and later is stored
to (d) and later.
b15
b8
b7
(s1)
31H (1)
(s1)+1
33H (3)
35H (5)
(s1)+2
0000H
(s1)+3
"012345"
Position from the left end in the character
(s2)
2
string stored in (d) and later
Number of characters from the left end in the
(s2)+1
-1
character string stored in (s1) and later
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 (s1) and later, "00H" does not exist.
The device specified by (d) exceeds the corresponding device range.
3405H
The value stored in a device specified in (s2)+1 is -2 or lower.
The value stored in a device specified in (s2) exceeds the number of characters of (d).
The value stored in a device specified in (s2)+1 exceeds the number of characters of (s1).
The character string specified by (s1) has more than 16383 characters.
The character string specified by (d) has more than 16383 characters.
b0
30H (0)
32H (2)
34H (4)
Before execution
b15
b8
b7
(d)
42H (B)
(d)+1
44H (D)
(d)+2
46H (F)
(d)+3
48H (H)
(d)+4
4AH (J)
(d)+5
00H
"ABCDEFGHIJK"
After execution
b15
b8
b7
(d)
30H (0)
(d)+1
32H (2)
(d)+2
34H (4)
(d)+3
48H (H)
(d)+4
4AH (J)
(d)+5
00H
"A012345HIJK"
8.8 Character String Operation Instruction
b0
41H (A)
43H (C)
45H (E)
47H (G)
49H (I)
4BH (K)
b0
41H (A)
31H (1)
33H (3)
35H (5)
49H (I)
4BH (K)
8 APPLICATION INSTRUCTION
8
469

Hide quick links:

Advertisement

loading