Omron SYSMAC C200HS Operation Manual page 181

Programmable controllers
Hide thumbs Also See for SYSMAC C200HS:
Table of Contents

Advertisement

Data Comparison
Flags
Example 1:
Saving CMP(20) Results
TR
0
00000
Address
00000
00001
00002
00003
00004
Example 2:
Obtaining Indications
during Timer Operation
Indirectly addressed DM word is non-existent. (Content of ∗DM word is
ER:
not BCD, or the DM area boundary has been exceeded.)
EQ:
ON if Cp1 equals Cp2.
LE:
ON if Cp1 is less than Cp2.
GR:
ON if Cp1 is greater than Cp2.
Flag
GR
EQ
LE
The following example shows how to save the comparison result immediately. If
the content of HR 09 is greater than that of 010, 00200 is turned ON; if the two
contents are equal, 00201 is turned ON; if content of HR 09 is less than that of
010, 00202 is turned ON. In some applications, only one of the three OUTs would
be necessary, making the use of TR 0 unnecessary. With this type of program-
ming, 00200, 00201, and 00202 are changed only when CMP(20) is executed.
25505
25506
25507
Instruction
Operands
LD
00000
OUT
TR
CMP(20)
HR
LD
TR
AND
25505
The following example uses TIM, CMP(20), and the LE flag (25507) to produce
outputs at particular times in the timer's countdown. The timer is started by turn-
ing ON 00000. When 00000 is OFF, TIM 010 is reset and the second two
CMP(20)s are not executed (i.e., executed with OFF execution conditions). Out-
put 00200 is produced after 100 seconds; output 00201, after 200 seconds; out-
put 00202, after 300 seconds; and output 00204, after 500 seconds.
Address
C1 < C2
25505
OFF
25506
OFF
25507
ON
CMP(20)
HR 09
010
Address
Instruction
00005
OUT
0
00006
LD
00007
AND
010
00008
OUT
09
00009
LD
0
00010
AND
00011
OUT
Section 5-17
C1 = C2
OFF
ON
ON
OFF
OFF
OFF
00200
Greater Than
00201
Equal
00202
Less Than
Operands
00200
TR
0
25506
00201
TR
0
25507
00202
C1 > C2
171

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents