95
In the following example, CIO 000200 will be turned ON when CIO 000002 is ON
and CIO 000003 is OFF. CIO 000200 will then remain ON until either CIO
000004 or CIO 000005 turns ON. With KEEP, as with all instructions requiring
more than one instruction line, the instruction lines are coded first before the
instruction that they control.
R: reset input
S: set input
Address Instruction
00000 LD 000002
00001 AND NOT 000003
00002 LD 000004
00003 OR 000005
00004 KEEP(011) 000200
Operands
(011)
KEEP 000200
0000
02
0000
03
0000
04
0000
05
4-7-4 Self-maintaining Bits (Seal)
Although the KEEP instruction can be used to create self-maintaining bits, it is
sometimes necessary to create self-maintaining bits in another way so that they
can be turned OFF when in an interlocked section of a program.
To create a self-maintaining bit, the operand bit of an OUTPUT instruction is
used as a condition for the same OUTPUT instruction in an OR setup so that the
operand bit of the OUTPUT instruction will remain ON or OFF until changes oc-
cur in other bits. At least one other condition is used just before the OUTPUT
instruction to function as a reset. Without this reset, there would be no way to
control the operand bit of the OUTPUT instruction.
The above diagram for the KEEP instruction can be rewritten as shown below.
The only difference in these diagrams would be their operation in an interlocked
program section when the execution condition for the INTERLOCK instruction
was ON. Here, just as in the same diagram using the KEEP instruction, two reset
bits are used, i.e., CIO 000200 can be turned OFF by turning ON either
CIO 000004 or CIO 000005.
Address Instruction
00000 LD 000200
00001 AND NOT 000003
00002 OR 000000
00003 AND NOT 000004
00004 AND NOT 000005
00005 OUT 000200
Operands
0002
00
0000
03
0000
00
0000
04
0002
00
0000
05
Controlling Bit Status Section 4-7