224
Bit Control Instructions
Section 5-9
5-9-1
OUTPUT and OUTPUT NOT – OUT and OUT NOT
Limitations
Any output bit can generally be used in only one instruction that controls its
status.
Description
OUT and OUT NOT are used to control the status of the designated bit
according to the execution condition.
OUT turns ON the designated bit for an ON execution condition, and turns
OFF the designated bit for an OFF execution condition. With a TR bit, OUT
appears at a branching point rather than at the end of an instruction line.
Refer to
4-3-8 Branching Instruction Lines
for details.
OUT NOT turns ON the designated bit for a OFF execution condition, and
turns OFF the designated bit for an ON execution condition.
OUT and OUT NOT can be used to control execution by turning ON and OFF
bits that are assigned to conditions on the ladder diagram, thus determining
execution conditions for other instructions. This is particularly helpful and
allows a complex set of conditions to be used to control the status of a single
work bit, and then that work bit can be used to control other instructions.
The length of time that a bit is ON or OFF can be controlled by combining the
OUT or OUT NOT with TIM. Refer to Examples under
5-16-1 TIMER – TIM
for
details.
Flags
There are no flags affected by these instructions.
5-9-2
SET and RESET – SET and RSET
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 affect the status of the operand bit when the execution condition is
OFF.
The operation of SET differs from that of OUT because the OUT instruction
turns the operand bit OFF when its execution condition is OFF. Likewise,
RSET differs from OUT NOT because OUT NOT turns the operand bit ON
when its execution condition is OFF.
B
:
Bit
IR, SR, AR, HR, LR, TR
Ladder Symbol
Operand Data Areas
OUTPUT
OUT
B
B
:
Bit
IR, SR, AR, HR, LR
Ladder Symbol
Operand Data Areas
OUTPUT NOT OUT NOT
B
B
:
Bit
IR, SR, AR, HR, LR
Ladder Symbols
Operand Data Areas
SET B
B
:
Bit
IR, SR, AR, HR, LR
RSET B