![Omron CVM1D Operation Manual Download Page 91](http://html1.mh-extra.com/html/omron/cvm1d/cvm1d_operation-manual_742532091.webp)
86
4-7-3 KEEP
The KEEP instruction is used to maintain the status of the operand bit based on
two execution conditions. To do this, the KEEP instruction is connected to two
instruction lines. When the execution condition at the end of the first instruction
line is ON, the operand bit of the KEEP instruction is turned ON. When the
execution condition at the end of the second instruction line is ON, the operand
bit of the KEEP instruction is turned OFF. The operand bit for the KEEP instruc-
tion will maintain its ON or OFF status even if it is located in an interlocked sec-
tion of the diagram.
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
Summary of Contents for CVM1D
Page 462: ...SYSMAC CVM1D Duplex System Programmable Controllers Operation Manual Revised August 2001...
Page 463: ...iv...
Page 465: ...vi...