Omron CPM1 - PROGRAMING MANUAL 02-2001 Programming Manual page 396

Hide thumbs Also See for CPM1 - PROGRAMING MANUAL 02-2001:
Table of Contents

Advertisement

Bit Control Instructions
Flags
7-8-2 SET and RESET – SET and RSET
Description
Precautions
Flags
Examples
378
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 6-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 execu-
tion 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 7-15-1 TIMER – TIM for
details.
There are no flags affected by these instructions.
Ladder Symbols
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 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.
Note On the Programming Console, input SET by pressing the FUN and SET Keys
and input RSET by pressing the FUN and RESET Keys.
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
condition is met (i.e., when IL(02) or JMP(04) is executed with an OFF execution
condition).
There are no flags affected by these instructions.
The following examples demonstrate the difference between OUT and SET/
RSET. In the first example (Diagram A), IR 20000 will be turned ON or OFF
whenever IR 00000 goes ON or OFF.
SET B
RSET B
Section
Operand Data Areas
B: Bit
IR, SR, AR, HR, LR
B: Bit
IR, SR, AR, HR, LR
7-8

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents