5. SEQUENCE INSTRUCTIONS
5 − 21
MELSEC-A
Program Examples SET , RST
(1) Program which sets (turns on) Y8B when X8 turns on and which resets (turns
off) Y8B when X9 turns on.
(2) Program which sets the content of data register to 0.
• Coding
0 LD X000
1 MOV K4X010 D8
6 LD X005
7 RST D8
10 END
When X0 turns on, the contents of
X10 to 1F are stored into D8.
When X5 turns on, the content of
D8 is set to 0.
K4
MOV X010 D8
RST D8
0
6
• Coding
0 LD X009
1 RST Y08B
2 LD X008
3 SET Y08B
4 END
X009
X008
RST Y08B
SET Y08B
2
X8 (SET input) OFF
X9
RST in
ut
OFF
Y8B OFF
ON
ON
ON
X000
X005