Timer and Counter Instructions
Precautions
Flags
Example
00000
TIM004
7-15-4 LONG TIMER: TIML(––)
392
changing its PV to a value other than #0000 with an instruction such as
MOV(21).
The operation of very high-speed timers in jumped program sections depends
upon the TC number used to define the timer, as shown in the following table.
TC number
000 to 003,
The timer will stop when the execution condition for JMP(04) is OFF.
008 to 255
This can greatly reduce the accuracy of timers in jumped program
sections.
004 to 007
If jump number 00 is used, the timer will stop timing when the
execution condition for JMP(04) is OFF. This can greatly reduce the
accuracy of timers in jumped program sections.
If any other jump number is used, the timer will continue timing
normally when the execution condition for JMP(04) is OFF.
Very high-speed timers with timer numbers other than TC 004 through TC 007
may not be accurate when the cycle time exceeds 1 ms. (The cycle time will not
affect very high-speed timers defined with TC 004 through TC 007.)
Very high-speed timers in interlocked program sections are reset (to the SV)
when the execution condition for IL(02) is OFF.
If the timer's set value is set to 0000, the Completion Flag will turn ON as soon as
the timer's execution condition turns ON. If TIM004 to TIM007 are used, howev-
er, there may be a delay before the flag turns ON.
If the timer's set value is set to 0001, the Completion Flag will turn ON some-
where between 0 and 1 ms after the timer's execution condition turns ON (i.e.,
the timer accuracy will actually determine the time), and may turn ON as soon as
the timer's execution condition turns ON.
Always consider the accuracy of the timer (0 to –1 ms) in application programs.
ER:
N is not a valid TC number.
In the following example, CIO 20000 will be turned ON after CIO 00000 goes ON
and stays ON for at least 1.5 seconds. When 00000 goes OFF, the timer will be
reset and CIO 20000 will be turned OFF.
TMHH(––)
004
#1500
000
20000
Ladder Symbol
TIML(––)
N
SV
C
This instruction is supported by the CPM2A/CPM2C only.
Operation
Address
Instruction
00000
LD
00001
TMHH(––)
1.5 s
00002
LD
00003
OUT
Operand Data Areas
TC number (see Limitations)
SV: Set value
IR, SR, AR, DM, HR, LR, #
C: Control data
Section
7-15
Operands
00000
---
004
#
1500
000
TIM
004
20000
N
000 or 001
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