![Omron CJ1G-CPUxx Instructions Manual Download Page 265](http://html1.mh-extra.com/html/omron/cj1g-cpuxx/cj1g-cpuxx_instructions-manual_742491265.webp)
244
Timer and Counter Instructions
Section 3-6
The timer or counter instruction won’t be executed if the PLC memory address
in the specified Index Register is not the address of a timer or counter PV.
Using Index Registers to indirectly address timers and counters can reduce
the size of the program and increase flexibility. For example, common subrou-
tines can be created.
Example
The following example shows a program section that uses indirect addressing
to define and start 100 timers with SVs contained in D00100 through D00199.
IR0 contains the PLC memory address of the timer PV and IR1 contains the
PLC memory address of the timer Completion Flag.
1,2,3...
1.
MOVRW(561) moves the PLC memory address of the PV for timer T0000
to IR0. Afterwards IR0 can be used in place of the timer number.
DM address
Content
Function
D00100
0010
SV for T0000
D00101
0100
SV for T0001
D00102
0050
SV for T0002
.
.
.
.
.
.
.
.
.
D00199
0999
SV for T0099
1
2
3
4
5
(Always ON
Flag)
(Always ON
Flag)
P_On
P_On
&100
FOR
&100
@D00000
++
NEXT
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 ...