Download Print this page

Mitsubishi Electric MELSEC iQ-F FX5 Programming Manual page 470

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

Advertisement

Processing details
• These instructions extract the number of characters specified by (s2)+1 from the character string data stored in the device
specified by (s1) and later, and store the extracted data in the position specified by (s2) and later of the character string
data stored in the device specified by (d) and later.
b15
(s1)
31H (1)
(s1)+1
33H (3)
(s1)+2
35H (5)
(s1)+3
37H (7)
00H
(s1)+4
"012345678"
Position from the left end in the character string
(s2)
3
stored in (d) and later
Number of characters from the left end in the
(s2)+1
6
character string stored in (s1) and later
• A character string stored in (s1) or (d) indicates data stored in devices from the specified device until "00H" is first detected
in units of 1 byte.
• A NULL code (00H), which indicates an end of a character string, is automatically added at the end of the character string
data.
• If the number of characters specified by (s2)+1 is 0, no processing is performed.
• When the number of characters specified by (s2)+1 exceeds the last character of the character string specified by (d), data
is stored up to the last character of (d).
b15
(s1)
31H (1)
(s1)+1
33H (3)
(s1)+2
35H (5)
37H (7)
(s1)+3
(s1)+4
00H
"012345678"
Position from the left end in the character
(s2)
5
string stored in (d) and later
Number of characters from the left end in the
(s2)+1
8
character string stored in (s1) and later
8 APPLICATION INSTRUCTION
468
8.8 Character String Operation Instruction
b8
b7
b0
30H (0)
32H (2)
34H (4)
36H (6)
38H (8)
b8
b7
b0
30H (0)
32H (2)
34H (4)
36H (6)
38H (8)
Before execution
b15
b8
b7
(d)
42H (B)
(d)+1
44H (D)
(d)+2
46H (F)
(d)+3
48H (H)
(d)+4
00H
"ABCDEFGHI"
After execution
b15
b8
b7
(d)
42H (B)
(d)+1
31H (1)
(d)+2
33H (3)
(d)+3
35H (5)
(d)+4
00H
"AB012345I"
Before execution
b15
b8
b7
(d)
42H (B)
(d)+1
44H (D)
(d)+2
46H (F)
(d)+3
48H (H)
(d)+4
00H
"ABCDEFGHI"
After execution
b15
b8
b7
(d)
42H (B)
(d)+1
44H (D)
(d)+2
31H (1)
(d)+3
33H (3)
(d)+4
00H
"ABCD01234"
"35H (5)" to "37H (7)" are not stored.
b0
41H (A)
43H (C)
45H (E)
47H (G)
49H (I)
b0
41H (A)
30H (0)
32H (2)
34H (4)
49H (I)
b0
41H (A)
43H (C)
45H (E)
47H (G)
49H (I)
b0
41H (A)
43H (C)
30H (0)
32H (2)
34H (4)

Hide quick links:

Advertisement

loading