36
1 OVERVIEW
1.4 Precautions on Programming
If SET/RST instructions of the same device are used
â– For SET instructions
The SET instruction turns on the specified device if the execution command is on, and causes no operation if it is off.
Thus, if two or more SET instructions of the same device are executed during one scan, the specified device turns on even if
one execution command is on.
â– For RST instructions
The RST instruction turns on the specified device if the execution command is off, and causes no operation if it is off.
Thus, if two or more RST instructions of the same device are executed during one scan, the specified device turns on even if
one execution command is off.
â– If the SET and RST instructions of the same device exist in one scan
If the SET and RST instructions of the same device exist in one scan, the SET instruction turns on the specified device if the
execution command is on, and turns off the specified device if it is on.
If both the SET and RST instructions are off, the on/off state of the specified device will be unchanged.
If output (Y) is specified using a SET/RST instruction, the on/off state of the last SET/RST instruction executed during the one
scan will be output.
(1) Since X0 is on, M0 turns on.
(2) Since X1 is off, M0 remains on. (The RST instruction results in non-processing.)
(3) Since X0 is off, M0 remains on. (The SET instruction results in non-processing.)
(4) Since X1 is on, M0 turns off.
ON
X1
X0
RST M0
SET M0
RST M0
X1
X0
SET
ON
OFF OFF
OFF
M0
X1
X0
ENDEND
END
ON
(1)
(2)
(3)
(4)
OFF OFF
M0