Omron SYSMAC C20K Operation Manual page 124

K-type programmable controllers
Hide thumbs Also See for SYSMAC C20K:
Table of Contents

Advertisement

DATA COMPARE – CMP(20)
Example 1:
Saving CMP(20) Results
Address
0000
0001
0002
0003
0004
Example 2:
Obtaining Indications
during Timer Operation
The following example shows how to save the comparison result immedi-
ately. If the content of HR 8 is greater than that of 9, 0200 is turned ON; if the
two contents are equal, 0201 is turned ON; if content of HR 8 is less than
that of HR 9, 0202 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 programming, 0200, 0201, and 0202 are changed only then CMP(20)
is executed.
TR
0
0000
1905
1906
1907
Instruction
Operands
LD
0000
OUT
TR
CMP(20)
HR
HR
LD
TR
AND
1905
The following example uses TIM, CMP(20), and the LE flag (1907) to pro-
duce outputs at particular times in the timer's countdown. The timer is started
by turning ON 0000. When 0000 is OFF, the TIM (10) is reset and the second
two CMP(20)s are not executed (i.e., executed with OFF execution condi-
tions). Output 0200 is output after 100 seconds; output 0201, after 200 sec-
onds; output 0202, after 300 seconds; and output 0204, after 500 seconds.
Address
Instruction
0005
OUT
0
0006
LD
0007
AND
8
0008
OUT
9
0009
LD
0
0010
AND
0011
OUT
Section 5-14
CMP(20)
HR 8
HR 9
0200
Greater Than
0201
Equal
0202
Less Than
Operands
0200
TR
0
1906
0201
TR
0
1907
0202
113

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac c40kSysmac c60kSysmac c28k

Table of Contents