Indirect Addressing ? SLC 5/03

kamenges said:
By the way, this may all be academic. I don't even know if the SLC will let you do this. COP(#N7:0 #C5:0 3) will verify offline but I don't know if it will run right in a plc. But it tends to be an extreme case when trying to figure out how a copy works.

Keith

I happen to have a 5/05 hooked up here doing some testing so I tried it, it works just as you described.
 
Hi All, time to resurrect an old thread. A little background:

I have an SLC 5/03 os 301 that obviously does not support indirect addressing. My issue is that the original manufacturer had an OS 302 installed in the machine i'm on. Its changed hands a few times but at some point changes were made and an OS 301 was installed. The processor was defaulted before being sold to my customer. I don't have access to the most recent program.

My customer wants the equipment back to its original design. I don't understand indirect addressing to well to begin with though I do have the original program from the manufacturer.

MOV N[N7:100]:[N7:101] N7:9 is the code that was used originally. Is there a way to accomplish this other than using indirect addressing?

Let mw know of any questions, I am quite stuck and don't have an OS302 anywhere in sight.

Thanks
Ted
 
My customer wants the equipment back to its original design.
It seems that to put it back to its original design, you would have to install an OS302 processor. Sometimes you can find old SLC processors at Ebay.com. I see at least 25 of the SLC 5/03, 1747-L532 OS302 processors there, ranging in quality from "used" to "tested" to "reconditioned" to "new", and priced from $100 US to $1100 US. There are 3 or 4 "new" ones for $400 to $500. You could not do much program modification for $400.

http://www.ebay.com/sch/Electrical-...&rt=nc&Brand=Allen%2DBradley&LH_AllListings=1

To use the OS301 without indirect addressing, you might be able to substitute indexed addressing. That will take several changes in the program logic. Read the RSLogix 500 Instruction Set Reference Manual chapter on Addressing Modes (Indexed Addressing). Also look at the RSLogix Help file on Indexed Addressing.

You may specify an address as being indexed by placing the “#” character in front of the address. When an address of this form is encountered in the
program, the processor takes the element number of the address and adds to it
the value contained in the Index Register S:24, then uses the result as the actual
address.
 
Last edited:
MOV N[N7:100]:[N7:101] N7:9 is the code that was used originally. Is there a way to accomplish this other than using indirect addressing?
N7:100 defines which integer file is to be used. I'm pretty sure indexed addressing will not address, no pun intended, this part of your problem. How many possible files does the program use for this part of the address?
 
FYI its an older palletizer that i'm working on. We're in good shape now.

N7:9 is being used as the process control word.
N100 is being used to orient boxes to make the pattern. Recipe 1 uses N100:0 - N100:79 as its process control database. Each time a package enters the cell, N7:9 gets a new word dumped in starting from N100:0, incrementing by one word with each package. I am monitoring the package count and pulling everything out with individual rungs for each.

There was a database of 30 recipes with a possibility of multiple layers per recipe, hence the indexing. I only need to make one work for now.

I got the pattern correct and spit a skid out the end, good enough for me for a friday.

I'm thinking they are using N7:101 as the layer count. I will confirm Monday. Looks like i'll probably break everything out and hard code it all for now.
 
The good news is I understand the operation of the equipment now. I also understand why the were using that indexing type of addressing, just don't understand the syntax of that MOV. Don't get how that would work.

500 isn't my strong suit.
 
just don't understand the syntax of that MOV. Don't get how that would work.

making the setting shown below will usually make INDIRECT addressing a lot easier to visualize ...

note that even when the display is set up this way - you can still "float" your mouse over the INDIRECT address - and see the "normal" syntax as shown in the Windows Tool Tip popup ...

.

display_indirect_values.PNG
 
Thank you for taking the time to go through that Ron. It definitely does make a bunch more sense when the right info is shown.
I do have the issue of the F/W revision though and can't write that MOV instruction with OS301. My next question: what is happening in the N[9]:[11] ??? I'm trying to figure out how to split that instruction into a few usable (with OS301) instructions. Are the values being "indexed"? Thats the part i'm struggling with. How does the source "math" arrive at 123 in your example?
I'm feeling a bit slow right now... I am much further ahead than I was this morning though!

Thank you all for the input
 
what is happening in the N[9]:[11] ???

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?
 
Definitely does help Doug. I do understand that part, I just don't get the fact that we have two values [9] semi colon [11] in the source line of the MOV. I would understand MOV N[N7:100]+[N7:101] N7:9 or N[N7:100]*[N7:101] N7:9 (if that syntax is correct).

What function does the colon between [N7:100] and [N7:101] perform?
 
It makes sense the way Ron explained it, your description helped cement it Doug.

I do get where the initial source values come from, i'm trying to understand how the instruction is operating to get the value in the destination.

Here I was thinking a MOV instruction was simple.
 
i'm trying to understand how the instruction is operating to get the value in the destination.

consider the two rungs shown below ... do you fully understand the operation of the first rung? ...

if the answer is yes, let's move on to the second rung ...

as long as the "pointers" N7:100 and N7:101 have the EXACT values mentioned (9 and 11) then the operation of the second rung will be precisely the same as the operation of the first rung ...

in other words, these two rungs will operate EXACTLY THE SAME – as long as the pointers have the specific values that I've shown ...

here's the reason for using this INDIRECT addressing technique ...

the first MOV is "FIXED" ... specifically it will ALWAYS get its Source value from the integer location N9:11 ...

but ...

the second MOV can be "RE-AIMED" ... specifically, we can tell the processor to get the Source value from ANY valid integer location – just by plugging different values into the "pointers" ...

the "pointer" N7:100 tells the MOV command which FILE NUMBER to get its Source from ... (example: FILE number 9) ...

the "pointer" N7:101 tells the MOV command which WORD NUMBER to get its Source from ... (example: WORD number 11) ...

if this doesn't nail it down for you, get some sleep and call me tomorrow afternoon ... I'll talk you through it over the phone ...

.

mov_vs_mov.jpg
 
Last edited:
That does nail it down Ron. I was missing the part about pointing to a file, i've only ever moved a value. I was stuck in value mode.

The nuts and bolts have been assembled. I'm going to muck around a bit on Monday when i'm connected to the processor again. It would be great if I could just grab an OS302 processor and be done with it. I do believe it will cement it for good if I can figure out a way to work around my issue. I will report back when I come up with something. No more help until then!

This has been fantastic help, how much do I owe you for the course? ��
 

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