Mitsubishi Electric FX3G SERIES Programming Manual page 639

Programmable controllers
Hide thumbs Also See for FX3G SERIES:
Table of Contents

Advertisement

FX
/FX
/FX
Series Programmable Controllers
3G
3U
3UC
Programming Manual - Basic & Applied Instruction Edition
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
code: K6706)
• When the value specified by
later (error code: K6706)
• When the number of characters specified by
code: K6706)
• When
S
specifies a negative value (error code: K6706)
2
• When
S
+1 specifies "-2" or less (error code: K6706)
2
Program example
In the program example shown below, 4 characters are extracted from the character string data stored in D0 and later,
and stored to the 3rd character (from the left end) and later for the character string data stored in D100 and later when
X010 turns ON.
X010
4th
character
b15---------------b8b7-----------------b0
D0
31H(1)
45H(E)
D1
D2
33H(3)
D3
R0
3
R1
4
S
exceeds the number of characters of the character string stored in
2
FNC207
D0
D100
MIDWP
1st
32H(2)
character
46H(F)
30H(0)
00H
"21FE03"
26 Character String Control – FNC200 to FNC209
26.8 FNC207 – MIDW / Random Replacement of Character Strings
+1 exceeds the number of characters specified by
S
2
R0
END
Before execution
b15---------------b8b7-----------------b0
D100
53H(S)
59H(Y)
D101
D102
31H(1)
D103
42H(B)
D104
0000H
"USCYZ10B"
After execution
b15---------------b8b7-----------------b0
D100
53H(S)
D101
31H(1)
45H(E)
D102
D103
42H(B)
D104
0000H
"US21FE0B"
The 1st to 4th characters are stored.
or
(error
S
D
1
D
and
(error
S
1
1st
55H(U)
character
3rd
43H(C)
character
5AH(Z)
30H(0)
55H(U)
3rd
32H(2)
character
46H(F)
30H(0)
637
21
22
23
24
25
26
27
28
29
30

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx3u seriesFx3uc series

Table of Contents