jrupp82

Controller vs Program Scoped Tags

5 posts in this topic

Big question that I am happening across in fine tuning a new program I have written in RSLogix 5000 (BTW, this is the first AB project I have ever written). I am going back in my program and re-writing some of code to simplify my machine, and also gain some more functionality out of it. As I work through this process, I come to the point where I am re-creating originally scoped Program Tags into Controller Tags so I can access them throughout the project. As I'm doing this, I'm wondering, why would I even use Program Tags in the first place? Shouldn't I just make everything a Controller Tag? I am a Machine Builder, have not created any data collection or anything like that to this point. Because I did read where Program Level tags can provide a little level of security in that regard. Don't know if that's a good reason, or if there is more, but I thought I would ask the question.

Share this post


Link to post
Share on other sites
Hi, I have personally used only controller scoped tags so far but I know there is a programming methodology called modular programming that only uses program scoped tags which allows the programmer to copy and paste "modules" without causing tag naming conflicts. When you use program scoped tags you can have tags with the same name in different programs. In case you feel curious, download ia-rm001_-en-p.pdf and ia-rm002_-en-p.pdf I think phase programming is an implementation of modular programing as well Bye

Share this post


Link to post
Share on other sites
I also beleive that most HMI Programs can only access Controller Scoped tags so tags doing critical calculations which you don't want the HMI to potentially corrupt would be program scoped.

Share this post


Link to post
Share on other sites
The biggest benefit is when you are controlling duplicate items Eg Same routine in two programs that does exactly the same thing There I use Program based Tags that are alias's to the Controller Tags that are the actual IO however the program scope Tag name is identical so I can cut and paste between routines This allows a system builder to create "standard" code

Share this post


Link to post
Share on other sites
All of those responses make sense. Thanks for the replies! Learning & growing!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now