Omron CS1G/H-CPUxxH Instructions Manual page 265

Sysmac cs series; sysmac cj series
Hide thumbs Also See for CS1G/H-CPUxxH:
Table of Contents

Advertisement

Timer and Counter Instructions
Example
1,2,3...
244
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.
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.
DM address
Content
D00100
0010
D00101
0100
D00102
0050
.
.
.
.
.
.
D00199
0999
P_On
(Always ON
Flag)
P_On
(Always ON
Flag)
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.
Function
SV for T0000
SV for T0001
SV for T0002
.
.
.
SV for T0099
FOR
@D00000
++
NEXT
Section 3-6
1
2
3
4
&100
&100
5

Advertisement

Table of Contents
loading

Table of Contents