![background image](http://html1.mh-extra.com/html/omron/cvm1d/cvm1d_operation-manual_742532090.webp)
85
4-7
Controlling Bit Status
There are instructions that can be used generally to control individual bit status.
These include the OUTPUT, OUTPUT NOT, DIFFERENTIATE UP, DIFFER-
ENTIATE DOWN, SET, RESET and KEEP instructions. All of these instructions
appear as the rightmost instruction in an instruction line and take a bit address
for an operand. Although details are provided in 5-7 Bit Control Instructions,
these instructions (except for OUTPUT and OUTPUT NOT, which have already
been introduced) are described here because of their importance in most pro-
grams. Although these instructions are used to turn ON and OFF output bits in
the I/O Memory (i.e., to send or stop output signals to external devices), they are
also used to control the status of other bits in the I/O memory or in other data
areas.
4-7-1 DIFFERENTIATE UP and DIFFERENTIATE DOWN
DIFFERENTIATE UP and DIFFERENTIATE DOWN instructions are used to
turn the operand bit ON for one scan at a time. The DIFFERENTIATE UP instruc-
tion turns ON the operand bit for one scan after the execution condition for it
goes from OFF to ON; the DIFFERENTIATE DOWN instruction turns ON the op-
erand bit for one scan after the execution condition for it goes from ON to OFF.
Both of these instructions require only one line of mnemonic code.
Address
Instruction
00000
LD
000000
00001
DIFU(013)
000200
Operands
00002
LD
000001
00003
DIFD(014)
000200
(013)
DIFU 000200
(014)
DIFD 000200
0000
00
0000
01
Here, CIO 000200 will be turned ON for one scan after CIO 000000 goes ON.
The next time DIFU(013) 000200 is executed, CIO 000200 will be turned OFF,
regardless of the status of CIO 000000. With the DIFFERENTIATE DOWN
instruction, CIO 000200 will be turned ON for one scan after CIO 000001 goes
OFF (CIO 000200 will be kept OFF until then), and will be turned OFF the next
time DIFD(014) 000200 is executed.
CVM1D CPUs also provide UP(018) and DOWN(019) that can be used to differ-
entiate changes in the execution condition to control execution. Refer to Section
5 Instruction Set for details.
4-7-2 SET and RESET
SET and RESET instructions are used to control the status of the operand bit
while the execution condition for them is ON. When the execution condition is
OFF, the status of the operand bit will not be changed.
(015)
SET
000200
00000
00
00000
LD
000000
00001
SET(015)
000200
00002
LD
000001
00003
RSET(016)
000201
Address
Instruction
Operands
(016)
RSET 000201
00000
01
In the above example, CIO 000200 will be turned ON when CIO 000000 goes
ON and will remain ON even after CIO 00000 goes OFF unless turned OFF
somewhere else in the program. CIO 000201 will be turned OFF when
CIO 000001 goes ON and will remain OFF even after CIO 00000 goes OFF un-
less turned ON somewhere else in the program.
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...