6. BASIC INSTRUCTIONS
6
−
37
MELSEC-A
Program Examples DINC
(1) Program which adds 1 to the data of D0 and 1when X0 turns on.
(2) Program which adds 1 to the data of X10 to 27 and stores the result to D3 and 4
when X0 turns on.
DDEC
(1) Program which subtracts 1 from the data of D0 and 1 when X0 turns on.
(2) Program which subtracts 1 from the data of X10 to 27 and stores the result to
D3 and 4 when X0 turns on.
X000
0
P
DINC DO
•
Coding
0 LD
X000
1 DINCP D0
4 END
•
Coding
0 LD
X000
1 DMOVP K6X010 D3
8 DINCP D3
11
END
X000
0
P
K6
DMOV X010
D3
P
DINC D3
X000
0
P
DDEC D0
•
Coding
0 LD
X000
1 DDECP D0
4 END
•
Coding
0 LD
X000
1 DMOVP K6X010 D3
8 DDECP D3
11
END
X000
0
P
K6
DMOV X010
D3
P
DDEC D3
Summary of Contents for MELSEC-A series
Page 1: ......
Page 2: ......
Page 13: ...A 11 MEMO...
Page 505: ...APPENDICES APP 100 MELSEC A MEMO...
Page 507: ......
Page 508: ......