S:24 Index Register

Thanks Doug-P,

My understanding is the index value stays until the program scan is completed. There are more ladders in the program, some using the copy (COP) instruction, manipulating words. Am I correct that the index would affect those?
 
TSmith,

Other instructions do in fact manipulate the value of S:24. These instructions will initialize the register to whatever value they need before manipulating it. Therefore your program needs to initialize S:24 before you use it. After you are done, you can leave it as is (all other AB insturcions such as COP leave it as is when they are done) but do not ever assume it will be as you left it on the next scan. Also if you have any interrupt routines with instructions that manipulate S:24 your routine could be confounded right in the middle of its task. If you do have interrupt routines then use indirect addressing rather than indexed addressing.
 

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,177
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...
Replies
6
Views
5,033
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,881
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,489
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,515
Back
Top Bottom