Mitsubishi Electric MELSEC FX3U Programming Manual page 670

Melsec fx series programmable logic controllers
Table of Contents

Advertisement

FX
/FX
/FX
Series Programmable Controllers
3G
3U
3UC
Programming Manual - Basic & Applied Instruction Edition
• When
S
2
and later is stored to
S
1
b15---------------b8b7-----------------b0
S
1
S
1
+1
S
1
+2
S
1
+3
Last character
S
2
2
S
+1
-1
2
Cautions
This instruction can handle character codes other than ASCII codes, but please note the following:
• 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 code, the length of 1 character is regarded as 2
characters.
• When overwriting 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 given if only 1 byte is overwritten out of a 2-byte character
code.
Errors
An operation error is caused in the following cases; The error flag M8067 turns ON, and the error code is
stored in D8067.
• When "00H" is not set within the corresponding device range after a device specified by
(error code: K6706)
• When the value specified by
and later (error code: K6706)
D
• When the number of characters specified by
(error code: K6706)
S
1
• When
S
2
• When
S
2
668
+1 (the number of characters to be extracted) is "-1", the entire character string stored in
and later.
D
31H(1)
30H(0)
33H(3)
32H(2)
35H(5)
34H(4)
00H
"012345"
Position from the left end in the
character string stored in
D
Number of characters from the left end
in the character string stored in
and later
exceeds the number of characters of the character string stored in
S
2
specifies a negative value (error code: K6706)
+1 specifies "-2" or less (error code: K6706)
26 Character String Control – FNC200 to FNC209
26.8 FNC207 – MIDW / Random Replacement of Character Strings
2nd
character
b15---------------b8b7-----------------b0
1st
D
+1
character
D
+2
D
+3
D
+4
D
+5
2nd
and later
character
S
b15---------------b8b7-----------------b0
1
D
+1
D
+2
D
+3
D
+4
D
+5
+1 exceeds the number of characters specified by
S
2
Before execution
42H(B)
41H(A)
44H(D)
43H(C)
46H(F)
45H(E)
48H(H)
47H(G)
4AH(J)
49H(I)
00H
4BH(K)
"ABCDEFGHIJK"
After execution
30H(0)
41H(A)
32H(2)
31H(1)
34H(4)
33H(3)
48H(H)
35H(5)
4AH(J)
49H(I)
00H
4BH(K)
"A012345HIJK"
Six characters from the 2nd
character are overwritten.
S
1
1st
character
or
D

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec fx3ucMelsec fx3g

Table of Contents