![Omron CVM1D Operation Manual Download Page 147](http://html1.mh-extra.com/html/omron/cvm1d/cvm1d_operation-manual_742532147.webp)
142
The above CNT can be modified to restart from SV each time power is turned ON
to the PC. This is done by using the First Cycle Flag in the Auxiliary Area
(A50015) to reset CNT as shown below.
Address
Instruction
00000
LD
000000
00001
AND
000001
00002
LD
000002
00003
OR
A50015
00004
CNT
0004
#0150
00005
LD
C0004
00006
OUT
000205
Operands
0000
00
0002
05
0000
01
0000
02
A500
15
CNT
0004
#0150
CP
R
C0004
Counters that can count past 9,999 can be programmed by using one CNT to
count the number of times another CNT has counted to zero from SV.
In the following example, 000000 is used to control when C0001 operates.
When 000000 is ON, C0001 counts down the number of OFF to ON changes in
000001. C0001 is reset by its Completion Flag, i.e., it starts counting again as
soon as its PV reaches zero. C0002 counts the number of times the Completion
Flag for C0001 goes ON. Bit 000002 serves as a reset for the entire extended
counter, resetting both C0001 and C0002 when it is OFF. The Completion Flag
for C0002 is also used to reset C0001 to inhibit C0001 operation once the SV for
C0002 has been reached and until the entire extended counter is reset via
000002.
Because in this example the SV for C0001 is 100 and the SV for C0002 is 200,
the Completion Flag for C0002 turns ON when 100 x 200 or 20,000 OFF to ON
changes have been counted in 000001. This would result in 000203 being
turned ON.
CNT can be used in sequence as many times as required to produce counters
capable of counting any desired values.
Address
Instruction
00000
LD
000000
00001
AND
000001
00002
LD NOT
000002
00003
OR
C0001
00004
OR
C0002
00005
CNT
0001
#0100
00006
LD
C0001
00007
LD NOT
000002
00008
CNT
0002
#0200
00009
LD
C0002
00010
OUT
000203
CNT
0002
#0200
CP
R
0000
00
0000
01
CNT
0001
#0100
CP
R
0000
02
C0001
C0002
C0001
0000
02
C0002
0002
03
Operands
CNT can be used to create extended timers in two ways: by combining TIM with
CNT and by counting Auxiliary Area clock pulse bits.
Example 2: Extended
Counter
Example 3:
Extended Timers
Timer and Counter Instructions
Section 5-13
Summary of Contents for CVM1D
Page 462: ...SYSMAC CVM1D Duplex System Programmable Controllers Operation Manual Revised August 2001...
Page 463: ...iv...
Page 465: ...vi...