Example Using Index Registers - Omron CP1L-EL20DR-D Operation Manual

Sysmac cp series cp1l-el/em cpu unit
Table of Contents

Advertisement

Index Registers
130

■ Example Using Index Registers

In the following example, TIM instructions for timer numbers 0 to 99 use set
values in D100 to D199. This can be achieved by using one TIM instruction,
using an index register for the timer number, using another index register for
the Completion Flags, and repeatedly executing the TIM instruction to start
the timers.
The PLC memory addresses for each T0's PV, Completion
Flag, and W0.00 are set in Index Registers IR0, IR1, and IR2 using a
MOVRW or MOVR instruction.
- The TIM instruction is executed for the timer number
(timer PV) that IR0+ indirectly addresses.
- The Timer Completion Flag that is indirectly addressed for
IR1+ turns ON when the time elapses. When the ON status
is received, bits in the work area that are indirectly
addressed for IR2+ are turned ON.
- The contents of IR0+, IR1+, and IR2+ are automatically
incremented by one after accessing the values using indirect
addressing.
- D0 is incremented.
Section 4-11
Repeated

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents