Contrologix 5000: Program Tags vs Controller Tags

Join Date
Dec 2010
Location
Burlington, NC
Posts
402
Looking for opinions on when it becomes advantageous to use program tags instead of controller tags. With some of the smaller programs I am using, I try to use all controller tags so all the tags are in the same place. What I would like to hear from you guys is when a program needs to use the functionality of program tags.

Thanks
Mark Snodgrass
 
Hi mark

For me I like to use one shots as program scope or station timers or even alarm timers as program almost everything else I use controller scope. I am looking at a system at the moment were I set up a servo homing sequence and make everything a program scope so I will just copy and paste the code and rename all tags again as program. The only difference would be the outputs and the servo motor

Donnchadh
 
I don't really know if there is a need for Program scoped tags.
I personally believe this is more of a Logix convenience feature when the user is developing similar applications running on different CPU platforms; Copy/Paste Programs between a CompactLogix application and a ControlLogix one sure beats individually adding Controller scoped tags.
 
I would avoid randomly making tags program scoped. They could be confusing to find for the end user.

The are very few times that I have used them, but they can have an advantage. Lets just say that you have 2 pieces of identical equipment controlled by one PLC. You could write all the logic in a program, with all of it's tags that are specific to that equipment in program scope. Once it's all working, you could copy all of that logic and it's tags into another program. All of the tags would be the exact same names (because program scoped tags cannot see tags in another program). Then all you would have to do is change your I/O.

Think of it as a tool to simplify code writing and organization.
 
2 advantages I use are:

(1) I can hide all the program flow bits, i.e. timers, one shots, intermediate calculations, in the program scope if nothing else needs to see them.

and (2) by doing that there are less Controller tags to browse through when setting up the SCADA end of things.

I guess you could equate this practice in the same way that some coders put everything on thier own rung, while others like to use branches to group associated code together.

I do both of these and also map and scale my I/O using both of these practices. For me it just makes the rest of my work easier.
 
Unless the system is small, I always make tags program scoped unless the tag needs to be shared between programs or the tag must be controller scoped (such as MSG tags).

IMO it makes the code cleaner and makes for more modular code. This may raise some hackles, but simply scoping all tags as controller without giving some consideration to how the tag is used is sloppy IMO.

If you're used to just about any other programming language then you're used to preferentially using locally scoped variables.
 

Similar Topics

I just imported four add-on instructions (which I believe are Rockwell AOIs), and they appeared to import OK, and I see them in the "tree"...
Replies
8
Views
3,103
I am working with an absolute mts encoder through ethernet connection, connected to a contrologix 5000, but after a few instances the reading is...
Replies
0
Views
1,200
Again, my apologies. Been asked to become the "PLC Guy" here ... This is a pollution control system that (now) runs a redundant PLC set-up. Can...
Replies
11
Views
3,851
Sorry for these basic questions. Eventually I'll surprise you with more sophisticated stuff. I just added some new tags in this PLC app. And...
Replies
9
Views
3,105
We have a chiller at our powerplant facility that we are communicating via MODBus RS484 using prosoft mnet card in our contrologix 5000 PLC. We...
Replies
2
Views
2,037
Back
Top Bottom