Omron SYSMAC C20K Operation Manual page 111

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

Advertisement

Timer and Counter Instructions
1813 (normally ON)
0002 (start input)
CNT 47
1814 (normally OFF)
1810 (turns On for 1 cycle upon hard reset)
1813 (normally ON)
1906 (EQ)
HR 000
Packaging Machine
100
The high-speed counter is a ring counter and thus when its present count
value is incremented from 9999 to 0000, the completion flag of CNT 47 is
turned ON for one cycle. By using this flag as an input to the UP input of the
reversible counter (i.e., cascade connection) you can increase the number of
digits to eight. Although an ordinary counter can be cascade-connected to
the high-speed counter, programming is easier with CNTR since an ordinary
counter is decrementing.
In the above program example, output 0500 is turned ON when the following
condition is satisfied (where S is the present count value of the high-speed
counter):
20,000
S
25,000.
Note
In hard reset mode, program SR 1810, which turns ON for one cycle time
upon input of the hard reset signal, to CNTR as the reset input. Unless CNTR
and CMP are programmed immediately after the high-speed counter, the cor-
rect corresponding outputs may not be produced.
The high-speed counter is very useful in the following application. Here,
packages are being carried on a conveyor belt at random intervals. Some of
them are spaced far apart and others are clustered together, making it im-
possible to accurately detect and count them with photoelectric switches
alone.
By presetting the number of pulses generated when a single package is de-
tected and by counting those pulses, the number of packages can be accu-
rately counted, regardless of whether the packages are spaced or clustered.
Address Instruction
MOV(21)
0000
#0000
0001
DM 32
0002
MOV(21)
#5000
DM 33
0003
0004
HDM(61) 47
0005
HR 0
0006
II
0007
0008
CNTR(12)
46
DI
#9999
0009
R
0010
CMP(20)
0011
CNT 46
0012
#0002
0013
0500
Section 5-11
Operands
LD
1813
MOV(21)
#
0000
DM
MOV(21)
#
5000
DM
LD
0002
HDM(61)
HR
LD
CNT
LD
1814
LD
1810
CNTR(12)
#
9999
LD
1813
CMP(20)
CNT
#
0002
AND
1906
AND
HR
000
OUT
0500
32
33
47
0
47
46
46

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac c40kSysmac c60kSysmac c28k

Table of Contents