Counter: Cnt - Omron CVM1D Operation Manual

Hide thumbs Also See for CVM1D:
Table of Contents

Advertisement

Timer and Counter Instructions
Flags
Example
0000
00

5-13-6 COUNTER: CNT

Ladder Symbol
CP
CNT
R
Description
140
Note: Refer to page 101 for general precautions on operand data areas.
Content of *DM word is not BCD when set for BCD.
ER (A50003):
Timing will start in the following example when CIO 000000 is ON and
CIO 000508 changes from OFF to ON. The PV will be output to D02000
Comparisons will be made between the value in D02000 and the SV in CIO 0002
through CIO 0009 (S to S+7) and the corresponding bits in CIO 0050 will be
turned on whenever the PV is greater than or equal to an SV, for example, CIO
005000 will be turned ON when the PV reaches 0155 (15.5 s).
The timer will restart from 0000 when the PV reaches 9999.
If CIO 005008 turns ON, the PV will be reset to 0000 and all Completion Flags
will be turned OFF and then counting will restart when CIO 005008 turns OFF
again.
If CIO 005009 turns ON, timing will stop until CIO 005009 turns OFF again.
CIO 005008 and CIO 005009 are effective only while CIO 00000 is ON.
(122)
MTIM
0050
D02000
S
S+1
S+2
S+3
S+4
S+5
S+6
S+7
N
S
CNT is used to count down from the SV when the execution condition on the
count pulse, CP, goes from OFF to ON, i.e., the present value (PV) will be de-
cremented by one whenever CNT is executed with an ON execution condition
for CP and the execution condition was OFF for the last execution. If the execu-
tion condition has not changed or has changed from ON to OFF, the PV of CNT
will not be changed. The Completion Flag for a counter is turned ON when the
PV reaches zero and will remain ON until the counter is reset.
CNT is reset with a reset input, R. When R goes from OFF to ON, the PV is reset
to the SV. The PV will not be decremented while R is ON. Counting down from
SV will begin again when R goes OFF. The PV for CNT will not be reset in inter-
locked program sections or by power interruptions.
0002
SVs
CIO 0002
0
1
5
CIO 0003
2
5
0
CIO 0004
1
0
2
CIO 0005
6
0
4
CIO 0006
4
1
0
CIO 0007
7
9
1
CIO 0008
1
0
5
CIO 0009
9
8
0
Operand Data Areas
N: Counter number #
S: Set value
CIO, G, A, T, C, #, DM, DR, IR
*Refer to page 128 for details on indirectly addressing counters.
Section 5-13
Address Instruction
00000
LD
00001
MTIM(122)
Completion Flags
5
CIO 005000
6
CIO 005001
9
CIO 005002
7
CIO 005003
6
CIO 005004
0
CIO 005005
0
CIO 005006
0
CIO 005007
Operands
000000
0050
D02000
0002

Advertisement

Table of Contents
loading

Table of Contents