Mitsubishi Electric FX3G SERIES Programming Manual page 629

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
Caution
• This instruction can handle character codes other than ASCII codes, but the character string length 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, the length of 1 character is detected as "2".
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
When the detected number of characters is "32768" or more (error code: K6706)
Program example
In the program example shown below, the length of a character string stored in D0 and later is output in 4-digit BCD to
Y040 to Y057 when X000 turns ON.
X000
b15---b8
49H(I) 4DH(M)
D0
D1
53H(S) 54H(T)
D2
42H(B) 55H(U)
D3
53H(S)
D4
49H(I) 48H(H)
D5
41H(A)
43H(C)
D6
FNC203
D0
LEN
FNC 18
D10
BCD
b7----b0
49H(I)
"MITSUBISHI"
(Characters
" ABC......."
after "00H" are
00H
ignored.)
42H(B)
26 Character String Control – FNC200 to FNC209
26.4 FNC203 – LEN / Character String Length Detection
D10
The length of the character
string is output to the display
K4Y40
unit.
END
Conversion
D10
Y057 to Y040
into BCD
10
0 0
BCD value
BCD
(error code: K6706)
S
1
0
627
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