PLC5 and Indirect Addressing

kdcui

Lifetime Supporting Member
Join Date
Dec 2007
Location
USA
Posts
386
So I am working on projects that have been on PLC5s for years now. One of our goals is to eventually migrate to ControlLogix, however in the meantime we are still using PLC5s in the short-term and, of course, when existing systems need maintenance. Everything is validated, so any major changes to a PLC, much less an entire line of PLCs, take forever (you should see the paperwork to change XIC to XIO!).

Anyways, over the years they began to run out of space on the PLC5s, so eventually they resorted to a very modular and generic form of code to impliment, but however it uses massive indirect addressing (5+ levels in some places). As the code grew, it became more and more messy (though I have to say they did a good job with what they had).

The main goal of all this indrect addressing was to save space, however at the cost of code readability. And it has gotten me thinking...

Is indrect addressing really THAT much more effective in saving memory space? Even if it is, it seems to me that the cost, in terms of the time it takes for an engineer, especially new ones coming in, to learn or re-learn a piece of code, seems too great to warrant the massive amounts of indirect addressing required to save memory.

As I am relatively new to automation compared to the many of you out there, I was just curious on the general consensus on indrect addressing and its advantages/disadvantages.

With something like ControlLogix, at least any indirect addressing can be done using tags and structures. With what I have seen with PLC5, it can be much more confusing and overwhelming.
 
kdcui said:
So I am working on projects that have been on PLC5s for years now. One of our goals is to eventually migrate to ControlLogix, however in the meantime we are still using PLC5s in the short-term and, of course, when existing systems need maintenance. Everything is validated, so any major changes to a PLC, much less an entire line of PLCs, take forever (you should see the paperwork to change XIC to XIO!).

Anyways, over the years they began to run out of space on the PLC5s, so eventually they resorted to a very modular and generic form of code to impliment, but however it uses massive indirect addressing (5+ levels in some places). As the code grew, it became more and more messy (though I have to say they did a good job with what they had).

The main goal of all this indrect addressing was to save space, however at the cost of code readability. And it has gotten me thinking...

Is indrect addressing really THAT much more effective in saving memory space? Even if it is, it seems to me that the cost, in terms of the time it takes for an engineer, especially new ones coming in, to learn or re-learn a piece of code, seems too great to warrant the massive amounts of indirect addressing required to save memory.

As I am relatively new to automation compared to the many of you out there, I was just curious on the general consensus on indrect addressing and its advantages/disadvantages.

With something like ControlLogix, at least any indirect addressing can be done using tags and structures. With what I have seen with PLC5, it can be much more confusing and overwhelming.

One main difference which I have encountered with indirect addressing between a PLC 5 and Contrologix, is when the index goes beyond the limit of the file being indexed.

Example, in a PLC 5 if N7 has 100 words, and you try to access
Index = 101
VALUE = N7:[Index]
the PLC will crash with an subscript out of range error, N7:101 does not exist

with contrologix, if an array is set up as DINTS[100] and
again Index = 101
VALUE = DINTS[Index]
the Clgx will not crash, but there will be a memory leak into what ever other data is in the Clgx memory after the last element in the DINTS[100] array

This can cause unpredicted behaviour of a program
 
Is indrect addressing really THAT much more effective in saving memory space? Even if it is, it seems to me that the cost, in terms of the time it takes for an engineer, especially new ones coming in, to learn or re-learn a piece of code, seems too great to warrant the massive amounts of indirect addressing required to save memory.

Indirect addressing, indexed addressing, and subroutines can all save memory. You do risk less readability which, IMHO, is one of the most
important issues to take into account when doing PLC programming. I'd
rather have a well documented poorly programmed PLC program to
debug that a poorly documented work of PLC art to debug.

With that said, I bet your customer would have saved more money upgrading to larger controllers (way back when) rather than going over-board using indirect addressing as a memory saver when trouble-shooting
time over the years is taken into account.

Any comments?

Good luck

(8{)} :) .)
(Yosi)
 
An engineer can design and program a control system that will work great, but if it isn't easily maintainable, many people (especially technicians) consider it to be useless. Why do you think such a high percentage of control loops are in manual mode? Design for constructability, reliability, operability, and maintainability isn't taught in engineering schools, but it ought to be. This is why advanced control schemes are rarely valued to my clients. If I design something the maintenance techs can't understand, it'll be my salaried butt troubleshooting it at 3 a.m. when the plant crashes and hundreds of thousands of dollars in production time is lost each hour, with no overtime pay and everyone breathing down my neck to restore operations. As far as indirect addressing goes, no thanks! I'll program my code to be easily read by a tech so that it is more maintainable.
 

Similar Topics

Hey everyone, Just used the PLC5/Logix migration utility to convert a program, and while addressing the PCEs, I noticed a lot of errors for "XIC...
Replies
12
Views
1,943
Can anyone explain to me what this would mean in a COP instruction? Source: #N[N187:4]:[N187:5] Dest: #N[N187:1]:0 Length: 20 I am doing a...
Replies
6
Views
2,196
Hi Everybody, I never have used indirect addressing in AB PLC5, but used it in SLC5/04. Today I found out PLC5 don't allow bit level indirect...
Replies
4
Views
9,573
I am trying to convert an old PLC5 program. I have several instances in the unlatch instruction where they give a B file on top of the unlatch...
Replies
9
Views
2,013
what would be the simplest way to convert this to CLX Thanks
Replies
17
Views
3,741
Back
Top Bottom