6. BASIC INSTRUCTIONS
6
−
27
MELSEC-A
Program Examples DB+
Program which performs the addition of BCD data 98765400 and 123456, and
stores the result to D888 and D887, and at the same time, outputs it to Y30 to 4F.
•
Coding
0 LD
M9036
1 DMOVP H98765400
D887
8 DB+P
H00123456
D887
17
DMOVP D887
K8Y030
24
END
0
M9036
P
H
DB+
00123456 D887
P
H
DMOV
98765400
D887
P
K8
DMOV
D887
Y030
98765400 is stored into D888 and D887 in BCD.
BCD data 98765400 and 123456 are added and
the result is stored into D888 and D887.
Data of D888 and D887 is output to Y30 to 4F.
Содержание MELSEC-A series
Страница 1: ......
Страница 2: ......
Страница 13: ...A 11 MEMO...
Страница 505: ...APPENDICES APP 100 MELSEC A MEMO...
Страница 507: ......
Страница 508: ......