133
5-9-3 SET and RESET – SET and RSET
B: Bit
IR, SR, AR, HR, LR
Ladder Symbols Operand Data Areas
SET B
B: Bit
IR, SR, AR, HR, LR
RSET
B
Description SET
turns the operand bit ON when the execution condition is ON,
and does not
affect
the status of the operand bit when the execution condition is OFF
. RSET
turns
the operand bit OFF when the execution condition is ON, and does not af
-
fect the status of the operand bit when the execution condition is OFF.
The
operation of SET dif
fers from that of OUT
because the OUT instruction turns
the
operand bit OFF when its execution condition is OFF
.
Likewise, RSET dif
fers
from
OUT NOT because OUT NOT turns the operand bit ON when its execution
condition is OFF.
Precautions The
status
of operand bits for SET and RSET programmed between IL(02) and
ILC(03)
or JMP(04) and JME(05) will not change when the interlock or jump con
-
dition is met (i.e., when IL(02) or JMP(04) is executed with an OFF execution
condition).
Flags There are no flags affected by these instructions.
Examples The following examples demonstrate the difference between OUT and SET/
RSET. In the first example (Diagram A), IR 10000 will be turned ON or OFF
whenever IR 00000 goes ON or OFF.
In
the second example (Diagram B), IR 10000 will be turned ON when IR
00001
goes
ON and will remain ON (even if IR 00001 goes OFF) until IR 00002
goes
ON.
00000
Diagram A
00002
RSET 10000
Diagram B
SET 10000
00001
Address Instruction Operands
00000 LD 00000
00001 OUT 10000
Address Instruction Operands
00000 LD 00001
00001 SET 10000
00002 LD 00002
00003 RSET 10000
10000
5-9-4 KEEP – KEEP(11)
B: Bit
IR, AR, HR, LR
Ladder Symbol Operand Data Areas
S
R
KEEP(11)
B
Limitations Any
output bit can generally be used in
only one instruction that controls its sta
-
tus. Refer to 3-3 IR Area for details.
Bit Control Instructions Section 5-9