![Omron CVM1D Скачать руководство пользователя страница 199](http://html1.mh-extra.com/html/omron/cvm1d/cvm1d_operation-manual_742532199.webp)
194
Placing other instructions between CMP(020) and the operation which ac-
cesses the EQ, LE, and GR Flags may change the status of these flags. Be sure
to access them before the desired status is changed.
Note Refer to page 101 for general precautions on operand data areas.
Flags
ER (A50003):
Content of
*
DM word is not BCD when set for BCD.
GR (A50005):
ON if Cp
1
is greater than Cp
2
.
EQ (A50006):
ON if Cp
1
equals Cp
2
.
LE (A50007):
ON if Cp
1
is less than Cp
2
.
The following example shows how to save the comparison result immediately. If
the content of word 0010 is greater than that of word 1209, bit 000200 is turned
ON; if the two contents are equal, bit 000201 is turned ON; if content of word
0010 is less than that of word 1209, bit 000202 is turned ON. In some applica-
tions, only one of the three OUTs would be necessary, making the use of TR 0
unnecessary. With this type of programming, bits 000200, 000201, and 000202
are changed only when CMP(020) is executed.
00000
LD
000000
00001
CMP(020)
0010
1209
00002
OUT
TR0
00003
AND
A50005
00004
OUT
000200
00005
LD
TR0
00006
AND
A50006
00007
OUT
000201
00008
LD
TR0
00009
AND
A50007
00010
OUT
000202
(020)
CMP
0010
1209
0000
00
A500
0002
00
05(>)
0002
01
0002
02
A500
06(=)
A500
07(<)
TR0
Greater Than
Equal
Less Than
Address Instruction
Operands
The following example uses TIM, CMP(020), and the LE Flag (A50007) to pro-
duce outputs at particular times in the timer’s countdown. The timer is started by
turning ON bit 000000. When bit 000000 is OFF, TIM 0010 is reset and the sec-
ond two CMP(020)s are not executed (i.e., executed with OFF execution condi-
tions). Output 000200 is produced after 100 seconds; output 000201, after 200
seconds; output 000202, after 300 seconds; and output 000204, after 500 sec-
onds.
Example 1:
Saving CMP(020) Results
Example 2:
Obtaining Indications
during Timer Operation
Comparison Instructions
Section 5-16
Содержание CVM1D
Страница 462: ...SYSMAC CVM1D Duplex System Programmable Controllers Operation Manual Revised August 2001...
Страница 463: ...iv...
Страница 465: ...vi...