Publication 1766-RM001A-EN-P - October 2008
Programming Instructions Overview
97
Example - Using Indirect Addressing to Duplicate Indexed
Addressing
In this section, an indexed addressing example is shown first. Then an
equivalent indirect addressing example is shown. Indexed addressing is
supported by SLC 500 and MicroLogix 1000 programmable controllers.
The MicroLogix 1100, 1200, 1400, and 1500 do not support indexed
addressing. This example is shown for comparison purposes.
Indexed Addressing Example
The following ADD instruction uses an indexed address in the Source A
and Destination addresses. If the indexed offset value is 20 (stored in
S:24), the controller uses the data stored at the base address plus the
indexed offset to perform the operation.
In this example, the controller uses the following addresses:
Table 4.1
Operand
Base Address
Offset Value in S:24 Working Address
Source A
N7:0
20
N7:20
Destination
N15:0
20
N15:20
ADD
Add
Source A
#N7:0
Source B
25
Dest
#N15:0
ADD
ADD
Add
Source A
N7:20
Source B
25
Dest
N15:20
ADD
Indexed
Working
efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive