7 Applied Instructions
7.20 Character String Control
647
FXCPU Structured Programming Manual
(Basic & Applied Instruction)
1
Outline
2
Instruction List
3
Configuration of
Instruction
4
How to Read
Explanation of
Instructions
5
Basic Instruction
6
Step Ladder
Instructions
7
Applied
Instructions
8
Interrupt Function
and Pulse Catch
Function
A
Relationships
between devices
and addresses
Program examples
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.
[ST]
LEN(X000,D0,D10);
BCD(X000,K4Y40);
[Structured ladder]
X000
The length of the character string
is output to the display unit.
LEN
EN ENO
d
s
D0 D10
BCD
EN
s
ENO
d
D10 K4Y40
D0
D1
49H(I) 4DH(M)
53H(S) 54H(T)
53H(S)
D10
10
D3
42H(B) 55H(U)
49H(I)
"MITSUBISHI"
(Characters "ABC ..."
after "00H" are ignored.)
49H(I)
41H(A)
43H(C) 42H(B)
48H(H)
D2
D4
D6
D5
00H
BCD
conversion
BCD
0 0 01
BCD value
Y057 to Y040
b15---b8 b7---- b0