226
Bit Control Instructions
Section 5-9
Precautions
Exercise caution when using a KEEP reset line that is controlled by an exter-
nal normally closed device. Never use an input bit in an inverse condition on
the reset (R) for KEEP(11) when the input device uses an AC power supply.
The delay in shutting down the PC’s DC power supply (relative to the AC
power supply to the input device) can cause the designated bit of KEEP(11) to
be reset. This situation is shown below.
Bits used in KEEP are not reset in interlocks. Refer to the
5-12 INTERLOCK
and INTERLOCK CLEAR – IL(02) and ILC(03)
for details.
5-9-4
DIFFERENTIATE UP and DOWN – DIFU(13) and DIFD(14)
Limitations
Any output bit can generally be used in only one instruction that controls its
status.
Description
DIFU(13) and DIFD(14) are used to turn the designated bit ON for one cycle
only.
Whenever executed, DIFU(13) compares its current execution with the previ-
ous execution condition. If the previous execution condition was OFF and the
current one is ON, DIFU(13) will turn ON the designated bit. If the previous
execution condition was ON and the current execution condition is either ON
or OFF, DIFU(13) will either turn the designated bit OFF or leave it OFF (i.e., if
the designated bit is already OFF). The designated bit will thus never be ON
for longer than one cycle, assuming it is executed each cycle (see
Precau-
tions
, below).
Whenever executed, DIFD(14) compares its current execution with the previ-
ous execution condition. If the previous execution condition was ON and the
current one is OFF, DIFD(14) will turn ON the designated bit. If the previous
execution condition was OFF and the current execution condition is either ON
or OFF, DIFD(14) will either turn the designated bit OFF or leave it OFF. The
designated bit will thus never be ON for longer than one cycle, assuming it is
executed each cycle (see
Precautions
, below).
These instructions are used when differentiated instructions (i.e., those pre-
fixed with an @) are not available and single-cycle execution of a particular
instruction is desired. They can also be used with non-differentiated forms of
instructions that have differentiated forms when their use will simplify pro-
gramming. Examples of these are shown below.
Flags
There are no flags affected by these instructions.
A
Input Unit
A
NEVER
S
R
KEEP(11)
B
B
:
Bit
IR, SR, AR, HR, LR
Ladder Symbols
Operand Data Areas
DIFU(13) B
B
:
Bit
IR, SR, AR, HR, LR
DIFD(14) B