S:24 Index Register in Micrologix

dskplc

Member
Join Date
Aug 2013
Location
New Zealand
Posts
119
Hello,

I have searched the Forum and googled this without any results that I can use. What is so important and the use of the Index Register S:24 in RSLogix 500? Is this a SLC specific thing or is it also used in a Micrologix? I don't see it in the list of data files in the left side of RSLogix 500 but it is in the code. Thank you for clearing up this mystery!
 
Basically it's a pointer used by the operating system when it needs to perform some sort of indirection. It can be used automatically by certain instructions, or it can be used intentionally by your program.

If you preface a data table address with the pound sign, like "#N10:0", the controller substitutes that value that's in the Index Register to the data table address element number. So if S:24 = 5, then "#N10:0" means the same thing as "#N10:5".

Some instructions make use of the S:24 Index Register themselves, to keep track of where they have placed a pointer or detected a value.

One good place to read about the SLC-500 Index Register is the 1747-RM001 SLC-500 Instruction Set Reference. It describes how various instructions that operate of arrays of memory elements use the Index Register, and also describes how Indexed Addressing and Indirect Addressing work, in Appendix D.
 
IIRC, it appears somewhere in one of the controller -> 'processor status' tabs. It doesn't appear (at least I can't find it) in Micro Starter Lite. I know it's there though, because I can switch the radix to say, HEX, and it takes its place like any other address. Even has its name attached.

The index register S:24 appears in several A-B processors. It is the default pointer register when certain file instructions are invoked. This is indicated by a '#' sign in the address - in a FLL instruction #N10:0 indicates the index register is being used. It's effectively the same as indirect addressing except it happens in the background.

Ken beat me but, not by much! :nodi:
 
Last edited:
There's also information in the help section: Help -> contents -> click on the Index tab and search keyword 'index'.
 
Hello, thank you for your replies. I need to be more specific: When given a program that was written for a SLC5/02 how does the S:24 work when changing the controller to a ML1200 for the same program?
 
The answer is going to be fact-specific and depends on the exact code you have. It might work with no modification at all.

My recollection is that the SLC-5/02 did not support Indirect Addressing, so if you had to roll your own by manipulating the Index Register and labeling your Word references with the # prefix.

That still works in the MicroLogix, but it's more convenient to simply use Indirect Addressing instead.
 
Thank you your answers so far.

I need to be more specific: I am changing controllers from a SLC5/02 to ML1200. The ladder logic had S:24 in the original code. Do I still use S:24 when changing to a MicroLogix 1200?
 

Similar Topics

My base address all work fine. The problem starts when I set the Index from 0 to an offset. I get a "PLC No Response" error. So say my Base...
Replies
2
Views
1,169
Using GX Developer For a fx3u processor I can use the index registers e.g. LD M300Z1 When I try to use the same line with fx3g it throws up a...
Replies
1
Views
1,878
Hi, In Mitsubishi you can use the index register to change a device number, e.g.: z2 := 2; M2Z2 :=0; (*i.e. sets M2+2, M4 = 0*) Does...
Replies
1
Views
2,485
Hi All I have 5 similar consumers (panels exter) located in 5 different locations in the factory connected to a single compaclogix controller...
Replies
2
Views
3,503
I've been using S:24 in SLC 500 programs. It has allowed me to really shorten some of my programs. I haven't had any trouble, but there must be...
Replies
16
Views
11,960
Back
Top Bottom