![Omron CJ1G-CPUxx Instructions Manual Download Page 261](http://html1.mh-extra.com/html/omron/cj1g-cpuxx/cj1g-cpuxx_instructions-manual_742491261.webp)
240
Timer and Counter Instructions
Section 3-6
When CIO 000001 is ON, the Completion Flags for counters C0003 to C0007
are turned OFF and the counters’ PVs are set to the maximum value of 9999.
3-6-10 Example Timer and Counter Applications
The following examples show various applications of timer and counter
instructions including long-term timers, a two-stage counter, ON/OFF delay,
one-shot bit, and flicker bit.
Example 1:
Long-term Timers
The following program examples show three ways to create long-term timers
with standard TIM and CNT instructions.
Two TIM Instructions
In this example, two TIM instructions are combined to make a 30-minute
timer.
TIM and CNT Instructions
In this example, a TIM instruction and a CNT instruction are combined to
make a 500-second timer.
TIM 0001 generates a pulse every 5 s and CNT 0002 counts these pulses.
The set value for this combination is the timer interval
×
counter SV. In this
case, the timer SV would be 5 s
×
100 = 500 s. With this combination, the
long-term timer’s PV is actually the PV of a counter, which is maintained
through power interruptions.
Address Instruction
000000 LD
000000
000001 TIM
0001
#9000
000002 LD
T0001
000003 TIM
0002
#9000
000004 LD
T0002
000005 OUT
000200
Operands
000000
T0001
T0002
Summary of Contents for CJ1G-CPUxx
Page 3: ...iv N o t i c e ...
Page 5: ...vi ...
Page 21: ...xxii Conformance to EC Directives 6 ...
Page 35: ......
Page 1131: ...1110 CJ series Instruction Execution Times and Number of Steps Section 4 2 ...