Timer and Counter Instructions
Example
00000
TIM002
7-15-5 COUNTER – CNT
Limitations
Description
394
In the following example, CIO 20000 will be turned ON after CIO 00000 goes ON
and stays ON for at least 1,500 seconds. When 00000 goes OFF, the timer will
be reset and CIO 20000 will be turned OFF.
TIML(––)
002
#0150
001
20000
Ladder Symbol
CP
R
Each TC number can be used as the definer in only one TIMER or COUNTER
instruction. TC numbers run from 000 through 255 in the CPM2A/CPM2C PCs
and from 000 through 127 in the CPM1/CPM1A/SRM1(-V2) PCs.
CNT is used to count down from SV when the execution condition on the count
pulse, CP, goes from OFF to ON, i.e., the present value (PV) will be decrem-
ented 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 execution
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 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 interlocked
program sections or by power interruptions.
Changes in execution conditions, the Completion Flag, and the PV are illus-
trated below. PV line height is meant only to indicate changes in the PV.
Execution condition
ON
on count pulse (CP)
OFF
Execution condition
ON
on reset (R)
OFF
ON
Completion Flag
OFF
PV
Address
Instruction
00000
LD
00001
TIML(––)
1500 s
00002
LD
00003
OUT
CNT N
SV
SV: Set value (word, BCD)
IR, SR, AR, DM, HR, LR, #
SV
SV – 1
SV – 2
Section
7-15
Operands
00000
---
002
#
0150
001
TIM
002
20000
Definer Values
N
TC number
Operand Data Areas
0002
0001
0000
SV
Need help?
Do you have a question about the CPM1 - PROGRAMING MANUAL 02-2001 and is the answer not in the manual?
Questions and answers