Counter -- Cnt - Omron CPM1 Programming Manual

Hide thumbs Also See for CPM1:
Table of Contents

Advertisement

7-15-5 COUNTER - - CNT
Limitations
Description
Precautions
Flags
Example
Ladder Symbol
CP
CNT N
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
Program execution will continue even if a non-BCD SV is used, but the SV will
not be correct.
ER:
Indirectly addressed DM word is non-existent. (Content of
not BCD, or the DM area boundary has been exceeded.)
In the following example, CNT is used to create extended timers by counting SR
area clock pulse bits.
CNT 001 counts the number of times the 1-second clock pulse bit (SR 25502)
goes from OFF to ON. Here again, IR 00000 is used to control the times when
CNT is operating.
Operand Data Areas
SV
SV: Set value (word, BCD)
IR, SR, AR, DM, HR, LR, #
SV
SV -- 1
SV -- 2
Section
7-15
Definer Values
N: TC number
#
SV
0002
0001
0000

DM word is

Advertisement

Table of Contents
loading

This manual is also suitable for:

Srm-v2Cpm1aCpm2aSrm1Cpm2c

Table of Contents