Timer and Counter Instructions
Precautions
Flags
Example
00000 25502
00001
CNT 001
!Caution The shorter clock pulses will not necessarily produce accurate timers
236
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.
ON
Execution condition
on count pulse (CP)
OFF
ON
Execution condition
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:
SV is not in BCD.
Indirectly addressed EM/DM word is non-existent.
(Content of *EM/*DM word is not BCD, or the EM/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.
Because in this example the SV for CNT 001 is 700, the Completion Flag for
CNT 002 turns ON when 1 second x 700 times, or 11 minutes and 40 seconds
have expired. This would result in IR 01602 being turned ON.
CP
R
because their short ON times might not be read accurately during longer
cycles. In particular, the 0.02-second and 0.1-second clock pulses should not
be used to create timers with CNT instructions.
SV
SV − 1
SV − 2
Address Instruction
CNT
00000
LD
001
00001
AND
#0700
00002
LD NOT
00003
CNT
01602
00004
LD
00005
OUT
Section 5-16
SV
0002
0001
0000
Operands
00000
25502
00001
001
#
0700
CNT
001
01602
Need help?
Do you have a question about the CQM1H - PROGRAM and is the answer not in the manual?