Indirect Addressing ? SLC 5/03

The square brackets around the '9' and the '11' tell you that the processor is using indirect addressing for the given parameter. The 9 in N[9] is coming from address N7:100. If the value in N7:100 changed to 53, you would see N[9] change to N[53].

It may help to approach it this way: N7:100 is an address of data, any possible 16-bit value interpreted as a number - like the number 53. An instruction like EQU N7:100 6 tells the processor to determine whether the value in N7:100 is equal to the value '6'.

An indirect value [N7:100] is the address of an address. You're telling the processor that you don't want the data in N7:100 for say, a math comparison, you want the data at the address the value points to .


So. N9 means integer file 9. N[N7:100] means integer file x, where x is the value in N7:100. The same principle applies to the [N7:101] part of the address. Check out the RSLogix help section about indirect addressing.

Any help?

Re reading this now makes perfect sense as well. Again, I was Thinking values and glossing over your colourful, obvious descriptions.

Great help Doug. Its been a long day, thanks for sticking with this fella's. I'll make you proud on Monday.
 
if I can figure out a way to work around my issue.

I haven't seen your program code - but judging from what you've posted - I would STRONGLY advise you to come up with a "matching" processor - which has a compatible firmware revision ... move heaven and earth if necessary – but get a matching processor ...

I'm afraid that you're going to find that squeezing this particular foot into the wrong-size shoe is going to take a LOT more effort - and a LOT more time - than it's worth ...

and – consider this ...

if there is an HMI (PanelView, etc.) connected to this system, then consider that the HMI has always been "aimed" at specific address locations inside your processor ...

now then ...

suppose that your rewrite/conversion of the SLC program forces you to move some of those existing address locations around ... oops! ... now the HMI won't be able to find the same old locations that it's always used before - so now you're going to have to rewrite/convert the HMI program to correlate with the newly rewritten/converted SLC program ...

so ... can all of this be done? ... probably yes ... will the time and effort (mostly the TIME) be worth it from a financial viewpoint? ... that's for you (and/or your customer) to decide ...

It would be great if I could just grab an OS302 processor and be done with it.

I'm speaking from experience here - you really need to come up with a processor which will run the original code ...

can you post your entire RSS program file? ... if you can do that, then we can offer more detailed help ...
 
Last edited:
Ron I couldn't agree more. I have a firm grasp on where the info from the HMI is tied in, I have the original panelbuilder program as well.

The reason the move command was being used that way was to keep up with the multitude of recipes. They are only using the machine to run one product. You and I both know that turns into five or ten products relatively quickly in the real world, I know for certain it won't happen quickly though.

I am going to get a new processor with the proper revision, I needed to get something going quickly for the time being. I have it doing what it should now, when I change the processor in the future I will add the instruction back in and take out the code I did to work around.

I know I likely seemed like a bit of a rookie with those questions, I actually have quite a bit of experience. Unfortunately I grew up on the 5000 platform and hadn't seen that type of syntax in my travels.
 
sounds like a realistic, workable plan ... good luck with it ...

just for completeness ...

in the RSLogix5000 systems, you're allowed to have MATH and LOGICAL operations inside the INDIRECT [square bracket] characters ...

secret handshake:

whatever is inside the [square brackets] boils down to a NUMBER ... the rest of the INDIRECT addressing operation works the same way that we've been discussing ...

party on ...
 
I will definitely be tying this all up in a nice, neat bow and jamming into my next project.

You can count on that.

I've done a few jobs with recipes in the recent past and I do believe that I have done them the "hard way" after the tutorial you guys have given me here.

I really do appreciate the help from yourself and Doug, you've gone above and beyond.

I love this place.
 
From a end user who had to fault find a system coded in this manner without the original documents. Any saveings in time or cost are quickly lost when production is stopped.
Write it 10 times the people who have to keep it going may not be as smart as the original programmer, they will not appreciate how you save memory or time when the production manager is chewing to get it going. (Find, replace doesn't take much time)
ultimately your cute piece of code will get you a bad rap from the end users.

If you go this way your HMI will need to be very detailed to reduce the need for the end users to look into the code. So save in the PLC can increase time in the HMI Build.
 
Kellian,

I'm sorry you had a bad experience. Before throwing stones you might want to re read the thread. I think you've missed a few things.
 
I'm pretty sure indexed addressing will not address, no pun intended, this part of your problem.
If you mean for that one line, then yes, it will take rewriting several rungs to convert from indirect to indexed addressing. The index number will need to be loaded into S:24 for one thing. Probably then a For-Next type of loop will need to be established to move all the values. It is not a rung-to-rung conversion, just as it was not for us old timers when we went from indexed addressing up to indirect addressing.

As I said back in Post #19, the first and best thing is to find an OS302 processor (1747-L32C/D or 1747-L32E) that has indirect addressing. I even searched and found 25 of them on Ebay for Ted.
 
Last edited:
Original Question
--------------------------------------------------
AB SLC 5/03

What are your thoughts on "repetitive identical sections of code"?

Would you write it once and indirect address the elements etc?

Would you do it someother 'clever way'?

Or would you write it 10 times over (let's say it's 10 rungs per control section, duplicated 10 times but with different addresses)
--------------------------------------------------
Which is what may comment is aimed at is aimed at.
The rest of the thread refers to methods on how to achieve it using Indirect addressing.
 
The index number will need to be loaded into S:24 for one thing. Probably then a For-Next type of loop will need to be established to move all the values.
Yes, you'd have to hand build the code to accomplish what the MOV is doing. As has been said, finding a processor capable of indirect addressing is the best solution. You could probably buy a spare or two with the money/time saved by not having to rewrite and test the logic.
 
Holy smokes gang!

I am going to find a new processor! I have a line on one as we speak!

Kellian: there are about 15 lines of code I need to write to get the first recipe running. They will all be visible. THEY WILL GO AWAY AND ORIGINAL CODE WILL BE DUMPED BACK IN WHEN THE PROCESSOR GETS HERE!

This has become an ethics conversation for no reason.

As far as saving money by finding a processor etc goes, i'm doing it because in the long run ot makes much more sense. My customer is a "step over a dollar to pick up a dime" kind of guy. He'd rather see my sitting at his machine than out buying parts.

I know i'm not the only person that has customers / employers like that.
 
Hi,

I am new in PLC,

Anyone, could you please help me by provide an example program of indirect addressing?
Example in RSLogix500.

I really appreciate it.
 
Last edited:
Sample of indirect addressing

Hi,

Attached is the sample of indirect addressing.
Please have a look.
I don't know what all this about, just copy and paste from other project.
 
Anyone, could you please help me by provide an example program of indirect addressing?
Example in RSLogix500.
Why look any farther for examples? Take a look in this current thread, at the following Posts for examples of indirect addressing:

Posts # 3, 9, 11, 13, 14, 18, 23, 25, 26, and 29.

Note that there is no such thing as an "indirect addressing program". There are many examples on this site where the method of indirect addressing is used in part of a program.
 
Last edited:
I was about to say the same thing Lance, Amir, read through carefully a few times. There was a light bulb moment for me provided by this thread. I don't know that anyone can explain it any better.
 

Similar Topics

I recently did a conversion from an SLC to a CompactLogix and I am having trouble with a specific piece of code where the SLC used indirect...
Replies
6
Views
2,849
I would appreciate some help understanding some code from the RSLogix 500 days. I'm trying to convert a Studio and I get a PCE for the following...
Replies
9
Views
2,266
I'm trying to set up a 1746-HSCE2 high speed counter module in a SLC500 with a SLC 5/03 processor. The manual -...
Replies
2
Views
3,057
tough one to get my head around but here goes: N27 is a file that stores whether the recipe stored was valid. N12 is a file that holds recipe...
Replies
2
Views
1,549
I have a whole bunch of analog inputs that I need to scale to process values. Using JMP and LBL can I use indirect addressing to cycle through all...
Replies
14
Views
6,163
Back
Top Bottom