A compelling reason to NOT have Prog. Tags and Ctlr. Tags with the same name

jdbrandt

Lifetime Supporting Member
Join Date
Oct 2002
Location
Pennsylvania
Posts
1,203
Issue:
The ability to have a Program Tag and a Controller Tag with the same name.

Now, I know there are some who will say "But, I want to.", but, there is a compelling reason not to, if albeit a small one.

If you do have this situation, and you want to reference the Controller Tag in a Program that can see the Program tag, the Controller Tag will not be available to you. (Try it yourself, and see.)

Apparently, 'Program Tags win' (as, I suppose they should).

My situation was that a user AOI referenced a Controller Tag, and, was itself, called from another AOI. In the over-reaching AOI, it had an input parameter that used the Program Tag (because it could do nothing else), and, unfortunately, the Logic portion got confused, as to which tag was which.

No big deal, easy to fix (offline), but difficult to find, because everything 'looked right', but, of course, it didn't work.

A good exercise for Ron's bootcamp, I think.
 
+1

Got caught with this once and had to fix online

Method: Go to the Program Tags and change the TagName to TagNamePROG
You are now able to see which one tag has what scope
You now must edit the program to the correct Tag

Be careful as the Program scope tag may have a different value to the controller scoped tag
 
+2

I got caught last year and it was after a long day and it caught me out bad. It cost me a few hours on site, a few hours sleep as it was so late and then a few more hours trying to explain to the engineer in charge the next day what and why it had taken so long to find it. With me it was two dint words with different value but one was 235 and the next 236 it was so close I was checking the code to see What was going on.
Donnchadh
 
A good exercise for Ron's bootcamp, I think.
It seems it also would be appropriate to ask the software designers to try to fix the flaw that leads to the condition.
 
I always start my tags with PT for program tags and CT for controler tags that way I know what I am looking at. I also include HMI in a tag that comes from the HMI that way I know why there is no output or input for that tag in the program.
 

Similar Topics

I've posted this on the ptc forum as well, but no luck with an answer (waiting for my service contract number) I keep getting the following error...
Replies
2
Views
122
Good Afternoon , I have a Powerflex 70 Drive . It faulted out with a #12 HW OverCurrent Fault . With your experience , what is the...
Replies
5
Views
7,697
UL 508: Any reason I can't supply a 60W 24VDC power supply from 2 legs of 480VAC? Our MechE is asking, it is for a product I don't deal with. My...
Replies
12
Views
5,876
Hello, I am having an issue with 1756-IT16 modules going out at a client’s location. This has been the issue from the very start. The modules will...
Replies
0
Views
932
Hi guys, First post here but i really need your help on this Devicenet communication error. I have 5 electrical panels wired the same way, but one...
Replies
6
Views
2,817
Back
Top Bottom