Indexed addressing

shahn4

Member
Join Date
Feb 2003
Location
Georgia
Posts
104
How to accomlish index addressing in SLC5/04. This processor does not support indirect addressing.
I am trying to store different speed values with their corresponding times in N15 and N16.
eg Mov N7:2 to N15:[N7.5]???
Thanks
🔨
 
Yes it does!

A SLC 5/04 does support the type of Indirect addressing that you are showing.

Keep in mind that indexed an indirect addressing are 2 different things. Your sample is indirect addressing. A 5/04 will support indexed or indirect addressing.



What made you think it doesn't?


I guess unless you have an old OS400, the SLC 5/04 with 24K memory, it apparently doesn't support indirect addressing.
 
Last edited:
From RSLogix500 help

Indexed Addressing:

Indexed addressing is valid with SLC 5/02, 5/03, 5/04, 5/05 or MicroLogix 1000 processors only.

An indexed address is one which is offset from its indicated address in the data table. Indexing of addresses applies to word addresses in bit and integer data files and also to the preset and accumulator words of timers and counters, and to the length and position words of control elements.
The offset value is contained in word 24 of the status file (S:24). The number in S:24 can be positive or negative.
The indexed address symbol is #. When programming, place it immediately before the file type identifier in the word address. For example #N7:2 is an indexed address.

Warning! The # symbol is also required for addresses in file instructions which also make use of word S:24 to store an offset value. If you are using file instructions in your program as well as indexed addressing, make sure that you load the correct offset value in S:24 prior to using an indexed address that follows a file instruction. Otherwise, unpredictable operation could occur, resulting in possible personal injury and/or damage to equipment.

Indexed addressing does not work in Timers, Counters, or Control files. Indexed addressing is invalid in any file type which consists of multi-word elements.
Data tables are not expanded automatically to accommodate indexed addresses.

RSLogix 500 - Copyright Rockwell Software 2000, 2001, 2002


Indirect Addressing:

Indirect addressing is valid with SLC 5/03 OS302, 5/04 OS401, and SLC 5/05 OS500 and OS501 and MicroLogix 1200 and 1500 processors only.

An indirect address is one that lets you substitute a word or bit number in a logical address with the value in another address. The processor uses the value from the substitute address to form the indirect address. You can use ladder logic to change the value stored at the substitute address.
Enter the substitute address in brackets [ ].
You can use M files to contain values used to calculate indirect address locations.
Example:
B3:[N7:1]/[N7:12] - In this example the word number is stored in integer address N7:1, and the bit number is stored in integer address N7:12.

Warning! Make sure that any indirect address being used in your ladder logic points to a valid data file and/or element. The processor will halt if it encounters an invalid address in Run mode.

Related Topics

RSLogix 500 - Copyright Rockwell Software 2000, 2001, 2002
 
I have 5/4 OS400 which won't support indirect addressing.
In case of index addressing, do I need to increment S:24 each time I move to next address? Or does S24 increments itslef?
Thanks for the feedback.
:)
 
You can manipulate S:24 any way you want, just remember that the file level instructions use it also. To manipulate it, you can treat S:24 like any other integer, the result of a math instruction, the destination of a MOV, etc.
 

Similar Topics

I am trying to use indexed addressing to store a long series of bits in a "file" via a bit shift left function in RSLogix 500. The file I want to...
Replies
8
Views
3,867
I have an automatic storage and retrieval system which uses indexed addressing to store the data for each stored and retrieved product. This...
Replies
7
Views
2,377
On the AB PLC-5 (540E) does the the Index Register (S:24) get reset at the beginning of each scan?
Replies
3
Views
4,369
I have a complex SLC program that used doubel index addressing. For example N[N47:162]:[N47:1]. When it coverts through the AB conversion tool...
Replies
4
Views
4,040
hi everybody,i have a problem as follow, there is an array of data with a specific start address in a DB block,i want to read a byte from this...
Replies
1
Views
1,628
Back
Top Bottom