![background image](http://html1.mh-extra.com/html/omron/srm1-programing-02-2001/srm1-programing-02-2001_programming-manual_742414412.webp)
7-15
Section
Timer and Counter Instructions
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.
00000
LD
00000
00001
TIML(––)
---
002
#
0150
001
00002
LD
TIM
002
00003
OUT
20000
20000
TIM002
00000
TIML(––)
002
#0150
001
Address
Instruction
Operands
1500 s
7-15-5 COUNTER – CNT
N
TC number
Ladder Symbol
Definer Values
SV
: Set value (word, BCD)
IR, SR, AR, DM, HR, LR, #
Operand Data Areas
CP
R
CNT N
SV
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 count pulse (CP)
Execution condition
on reset (R)
ON
OFF
ON
OFF
Completion Flag
ON
OFF
PV
SV
SV – 1
SV – 2
0002
0001
0000
SV
Example
Limitations
Description