Controller Vs Program Tag Scope

chavak

Member
Join Date
Jul 2002
Posts
750
Hi,

Please bear with this RS5000 newbie.đź“š

Just to clarify - In the PLC efficiency perspective is there any disadvantages using controller scoped tags in Control Logix.
  1. Am I right to say, the Program Tags are cleared from memmory when the scan exits that particular task and reduces the PLC overhead.
  2. Am I able to alias an I/O tag to a UDT. Any disadvantages.
Thankyou (More questions to come, just started to read and search)
__________
 
1. I don't know if they are cleared from memory but you can only use them between routines within the program. Controller tags can be used in all tasks.

2. Well we have tried and not succeeded.
 
1. I'm not sure that I understand what you mean; if a tag is "cleared from memory" where does it go to and how does it get back? I think the answer is "no".

2. No, you can't do that yet. I believe that it's going to be possible in the future.

I'd recommend downloading the manual 1756-RM094A-EN-P Logix Processors Design Considerations, it's a great introduction to some of the concepts of the CLX.
 
1. I don't know of a CPU efficiency effect, but the program scoped tags are isolated to that particular program, so the same tag name can be used in multiple programs without interfering. They are treated as truly separate variables. This allows for easier re-use of code without resolving naming issues.
 
OkiePC said:
1. so the same tag name can be used in multiple programs without interfering. They are treated as truly separate variables. This allows for easier re-use of code without resolving naming issues.

OK, for who is developing it is good to copy and paste tags from one programs and use it another, reduces development time. But I do not know how the maintenance guys going to track it. They have to remember for eg. 'This_Program.Tag_A' is different from 'That_Program_Tag_A'.

Those different tags are still stored in 2 different locations in the PLC memory.And I still think Program tags is not just for naming conveniece. It might be for the processor to avoid looking into when updating the rest of the programs.

If there is not much benefit for the processor by assigning local variables, why not declare all the tags as Global ones [Controller tags.]

I will read up " 1756-RM094A-EN-P Logix Processors Design Considerations.

Thank You
__________
 
I think you answered your own question...

If the variable is of interest for troubleshooting, it is almost certainly a global variable. Program variables are those boring things like For-Next loop indexes, or one-shots. My rule of thumb for program tags: If you'd really rather NOT come up with a meaningful name for it, it's a program tag. Then you call it I, or one-shot.0.

I'm not sure what the basis is for your concept of program tags somehow taking less processor time. From the processor's point of view, a program tag and a controller tag are equivalent. The only difference is how the data is displayed to us humans.
 
Thanks Mellis for your input,


I was thnking Control Logix memory assignment something similar to PC based programs,

ie, it create an instance of memory [Program Scoped Tags] when that routine is called, work on it and when get out of that routine, forget about their existance. Thus the overhead is reduced in overall.

Best Regards
____________
 
No, all tags in either Controller or Program scope are persistant and permanent.

I generally only put my master UDT tags in controller scope, and do everything else in program scope just to keep the namespaces smaller.

Kind of, "If an HMI must access it -> Controller Scope" otherwise, Program scope. This includes aliases.

chavak said:
Thanks Mellis for your input,


I was thnking Control Logix memory assignment something similar to PC based programs,

ie, it create an instance of memory [Program Scoped Tags] when that routine is called, work on it and when get out of that routine, forget about their existance. Thus the overhead is reduced in overall.

Best Regards
____________
 
I tend to do what rdrast does. But this is typically a preference question. There is no performance difference. Also, it doesn't make as much difference if you usually put everything in a single program anyway. I usually create multiple programs for any given application so I feel spreading the tags around tends to keep things more manageable.


Keith
 

Similar Topics

Hello, I am attempting to download a program someone else created to an existing PLC (1769-L24ER-QB1B CompactLogix5370 Controller). However, when...
Replies
3
Views
1,093
I have a PLC program for a 1769-L24ER PLC and would like to test it out on a 1756-L73 PLC in the office that is just for testing. The test PLC is...
Replies
0
Views
964
Hi, I have a program I need to modify offline and test prior to commissioning. Its developed in Logix V30. I have no L8x controllers available...
Replies
15
Views
4,937
Hi all, i have a 1756-L62 processor, it keeps going into fault mode when i put it into run. I went to check major faults and i see the program...
Replies
23
Views
4,557
Good Afternoon , I worked on a project from home this weekend . Added some local and controller tags to it . At the plant most likely a lot...
Replies
8
Views
2,576
Back
Top Bottom