Omron SYSMAC CV Series Operation Manual page 166

Ladder diagrams
Hide thumbs Also See for SYSMAC CV Series:
Table of Contents

Advertisement

Timer and Counter Instructions
Flags
Example 1:
Basic Application
0000
0000
00
01
0000
02
C0004
0000
0000
00
01
0000
02
A500
15
C0004
Example 2: Extended
Counter
154
Counter numbers are as shown in the following table. Each counter number can
be used to define only one counter instruction unless the counters are never ac-
tive simultaneously.
CV500 or CVM1-CPU01-EV2
CV1000, CV2000, or CVM1-CPU11/21-EV2
Note: Refer to page 115 for general precautions on operand data areas.
Content of *DM word is not BCD when set for BCD.
ER (A50003):
Content of S (SV) is not BCD.
In the following example, the PV will be decremented whenever both 000000
and 000001 are ON provided that 000002 is OFF and either 000000 or 000001
was OFF the last time C0004 was executed. When 150 pulses have been
counted down (i.e., when PV reaches zero), 000205 will be turned ON.
CP
CNT
0004
R
Here, 000000 can be used to control when CNT is operative and 000001 can be
used as the bit whose OFF to ON changes are being counted.
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.
CP
CNT
0004
R
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.
PC
C0000 through C0511
C0000 through C1023
#0150
0002
05
#0150
0002
05
Section 5-13
Counter numbers
Address Instruction
Operands
00000
LD
000000
00001
AND
000001
00002
LD
000002
00003
CNT
0004
#0150
00004
LD
C0004
00005
OUT
000205
Address Instruction
Operands
00000
LD
000000
00001
AND
000001
00002
LD
000002
00003
OR
A50015
00004
CNT
0004
#0150
00005
LD
C0004
00006
OUT
000205

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cv2000Cvm1Cv500Cv1000

Table of Contents