2 Instructions
2-30 CP1E CPU Unit Instructions Reference Manual(W483)
Hint
Differences between OUT/OUT NOT and SET/RSET
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. For OUT, the operand bit is turned ON
when the input condition turns ON and is turned OFF when the input condition turns OFF. For SET
and RSET, the operand bit turns ON or OFF, respectively, when the input condition turns ON and the
operand bit does not change when the input condition turns OFF.
The set and reset inputs for a KEEP(011) instruction must be programmed with the instruction, but
the SET and RSET instructions can be programmed completely independently. Furthermore, the
same bit may be used as the operand in any number of SET or RSET instructions.
SET and RSET have immediate refreshing variations (!SET and !RSET). When a CPU Unit built-in
output bit has been specified for R in one of these instructions, any changes to R will be refreshed
when the instruction is executed and reflected immediately in the output bit.
If external output is specified for R by !SET (or !RSET), R will be OUT-refreshed as soon as it turns
ON (or OFF) (when the instruction is executed). R, which turned ON (or OFF), will remain ON (or
OFF) as normal until a RSET instruction (or SET instruction) is executed.
Precautions
SET and RSET cannot be used to set and reset timers and counters. When SET or RSET is pro-
grammed between IL(002) and ILC(003) or JMP(004) and JME(005), the status of the specified bit
will not be changed if the program section is interlocked or jumped.
0.01
SET
100.00
0.02
RSET
100.00
100.00
0.00
CIO 100.00 is turned ON/OFF
when CIO 0.00 goes ON/OFF.
CIO 100.00 is turned ON when
CIO 0.01 goes ON; it remains ON
until CIO 0.02 goes ON.