7. APPLICATION INSTRUCTIONS
7
−
115
MELSEC-A
Program Examples LED
Program which converts "ABCDEFGHIJKLMNOP" into ASCII code and stores it to
the D88 to 95 when X8 turns on, and displays the ASCII data of D88 to 95 at the
LED indicator on the front face of CPU when X16 turns on.
LEDC
Program which displays the comment of D0 to D15 at intervals of 30 seconds.
•
Coding
0 LD
X008
1 ASC
ABCDEFGH
D88
14
ASC
IJKLMNOP
D92
27
LD
X016
28
LED
D88
31
END
•
Coding
0 LD
M9036
1 OUT
T5
K300
2 LD
T5
3 RST
T5
6 LEDC
D0Z
9 INCP
Z
12
LD=
K16
Z
17
RST
Z
20
END
(
)
30 seconds are counted
Comment of D(0+Z) is displayed on the LED
indicator on the front of the CPU.
When T5 turns from off to on, Z+1 is executed.
When Z = 16, Z is set to 0.
0 T5
2 RST
T5
12 =
16 Z
RST Z
M9036
K300
K
LEDC
D0
INC
Z
P
Z
T5
Eight characters, A to H, are converted into
ASCII code and stored into the D88 to 91.
Eight characters, I to P, are converted into
ASCII code and stored into the D92 to 95.
ASCII data of D88 to 95 are displayed on
the LED indicator.
ASC
IJKLMNOP
D92
X008
X016
ASC ABCDEFGH D88
LED D88
0
27
Содержание MELSEC-A series
Страница 1: ......
Страница 2: ......
Страница 13: ...A 11 MEMO...
Страница 505: ...APPENDICES APP 100 MELSEC A MEMO...
Страница 507: ......
Страница 508: ......