Indirect Addressing: Can Enough be Said about this Powerful Tool?

ndzied1 said:
jamesau:

That is basically what a function block does. When you write a function block you create one copy of the code. When you instantiate the function block multiple times, there are multiple copies of the data but still only one copy of the code. The PLC does all the state-space swapping for you.
Norm,

I agree but some software packages don't have function blocks or those that do may have limited capability in that regard. In those cases, you have to design and build the functionality. An example that comes to mind is programming a Quantum with ProWorx32 or older Taylor software.

Jim
 
My god!, some of the readers of plcs must live in the dark ages, I have been using indirect addressing since early 80's, it's not new or a black art, even a simple mitsi has it (use of the Z reg), siemens have had it for yonks.
Another good thing is subroutines, however some don't have them (well that will take parameters), well one simple way.....
say on SLC500... create a routine using words/bits in a file say N:10, before calling the routine copy the actual parameters (as inputs to the routine) to the input words/bits in N:10, call the routine, then afterwards load the so-called output params to your own words & hey presto you have a sub which passes params.
you could do this indirectly of course....
only worth doing if the function is complex of course.
 
customer is someone who:

- loves you, admires your work and keeps on calling you in odd hours.

- wants your opinion for every detail, then disregard it completely.

- although don't know anothing about it, they are certain that your work
is better than everyone else's. this is exactly why they come to you - to tell you how to do it.

- makes you wear those safety glasses and hat when you are alone in a plant on
sunday afternoon working with your laptop.

- gives you spec of things they want in machine (including which parts to use).
then they call you in the middle of night asking if you happen to have one
of those parts in stock because they run out of spares or never had any.
like 12 or 18mm shielded pnp proxy... (must be brand XYZ of course)

- tells you how to write program (alarms, seguencer, outputs, user interface etc.)
and what has to be submitted in documentation package. they review it for a while,
ask you to make some adjustments so it adhers to their standard, and - ask you to
train their maintenance so they understand how each of concepts should work.

- after long long long delay (your job is almost done), gives you sample of plc and
hmi program. it's just that those samples violate every single thing they told you
before and they really really want it his way.

- gives you detailed spec of ratios of specific paints to be mixed to paint panel
a week before machine is shipped. later they complain that panel doesn't look quite
as good as with original paint or they are surprised that paint need to dry.

- questions why plc they selected can process some 20-30 floating point values,
have them displayed on HMI screen etc. but cannot log them all for a month, .... or a year.
(btw. machine cycle is 2.45 seconds and it operates 24/7). oh, and no fancy stuff like
FIFO, indirect addressing or any instructions that can address whole register. only allowed
function block should be timer.

- shows you existing machine, that is to be replaced. it's fixed design, running
only one type of parts, 38sec. cycle and only does small part of a job, keeps on jamming,
braking down etc. new design should be flexible, all parameters adjustable from HMI, run
variety of parts, do model change in seconds, must do complete job and in under 30sec
(25sec. would be nice...). when you do all they ask and proudly show them machine that
is radically different from old design, it is smaller, cheaper, low maintenance, requires only
one operator instead of four, uses less power and does everything in only 10sec.,
they wrinkle their nose and say 'why 10sec? you couldn't do it in 7...?'.
 
Panic,

I see that you have "been there, done that". You must have the same customers as I do!
 
I've used indirect addressing for loading, saving, and moving around recipes. It's a very powerful tool but at the same time is difficult to troubleshoot. I had a SLC 5/04 that had a routine on about 2 rungs that started 30 some motors in sequence. It's nice that it was only on a few rungs, but those rungs gave you almost no information about why motor 'X' wasn't starting. You couldn't just search that output because it wasn't directly addressed anywhere, so finding where the rung was was a massive pain, especially since it was all written into internal bits and transferred by word to the Output data table with a COP instruction.

Indirect addressing is great, but is very easy to overuse and make maintenance technicians curse your name.
 
...does anyone have an example program for a slc500 system?
Yes, here is a Number Sorting Routine that uses indirect addressing on Rungs 4, 9, 10, and 11.
 

Similar Topics

Good day. I firmly believe there are stupid questions. This may be one of them. I haven't found a clear solution on the other indirect...
Replies
8
Views
2,584
Howdy folks, I am an Allen Bradley guy currently living in an Emerson world. Working with Rx3i on PacSystems Machine Edition v. 9.6? i think...
Replies
3
Views
629
Hello, I'm very new to programming with absolutely zero schooling in this field and pretty hands off training in my new role, it's been fun...
Replies
4
Views
673
Hello Friends, I am trying to index M Bits, however GX Works2 is not allowing it with following message. https://ibb.co/zPcqj6M...
Replies
3
Views
1,391
Hi All, which the best way to do the indirect addressing in an optimize DB? Ccurrently this is my partial code inside an FB...
Replies
7
Views
2,280
Back
Top Bottom