Omron C20K Video Game Controller User Manual


 
90
5-11-4 COUNTER – CNT
N: TC number
# (00 through 47)
Ladder Symbol
Definer Values
SV: Set value (word, BCD)
IR, HR, #
Operand Data Areas
CP
R
CNT N
SV
Each TC number can be used as the definer in only one timer or counter in-
struction.
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
decremented by one whenever CNT is executed with an ON execution condi-
tion 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. 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 for power interruptions.
Changes in execution conditions, the completion flag, and the PV are illus-
trated below. PV line height is meant to indicate changes in the PV only.
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
Program execution will continue even if a non-BCD SV is used, but the SV
will not be correct.
ER: SV is not in BCD.
Limitations
Description
Precautions
Flags
Timer and Counter Instructions Section 5-11