Tag Value Change Script gets executed multiple times

Seems like this whole thing should have been 12 UDT instances (the tags for each of the 12 lines) and 1 project, where the project is parameterized in such a way that it knows which of the 12 UDT instances it should be pointing at.

3 Likes

That is an argument that we lost (for now).

With that being said, is there any way to accomplish this using thin clients?

BTW, you are posting in a v7.9 topic, which doesn't have Perspective at all.

I did not notice this when I found this topic. I just saw that someone had a similar issue to me and I thought there was an answer out there.

I can create a new thread in the correct forum. My bad. Thanks!

When I tried this with one project, the lines would overpower each other with what session property it was using.

If "Line 1" launched a session, and then "Line 2" launched a session, Line 2 would overwrite the session properties of Line 1.

They are all using the same server and thin clients. Is this impossible to do using thin clients?

It is a fundamental problem with terminal server setups: the terminal server is the endpoint for the network connections that the gateway sees, and therefore causes the gateway to think they are all the same client. This is true for both Vision and Perspective.

Just say no to terminal servers. If security is the driving force for using one (because Windows is unsafe to deploy--duh), deploy on Linux instead. Directly on the thin client. I strongly recommend you re-fight this battle with whomever dictated the use of the terminal server.

Didn't you already figure out earlier that using Perspective Workstation solves the shared session issue?

Yes, but now it is the Gateway Events that are causing the issue. I need to fire a tag change script for one tag. Since each project is running off the same gateway, the script fires for all projects on the gateway. So when one tag goes high and triggers the gateway event, I get multiple duplicate entries in the SQL database matching the number of projects I have.

There is no way to have only one project fire one tag on the gateway?

That's been answered. Go back and look at those answers, then look at your project inheritance setup.

I'm sorry, but the projects were not inherited, they are just copies of one program.

:dizzy_face: Go back to Kevin's suggestion and scrap all of your maybe-identical 16 projects and use a single project with udts

No. Tags are a global resource. They aren't associated with a project.

You made 12 copies of a project, each with a gateway event tag change script, which it sounds like are looking at the same tag(s).

Each time the tag(s) change, all 12 of those scripts are going to fire.

Thanks for all the replies. This is an eye-opening learning experience.

It appears that I have a couple issues going against me to actually get this to work with Ignition.

Instead of using UDTs perhaps you could define 12 separate Tag Providers for the 12 projects with the copy of all tags in each of them! Only problem would be any change in a tag in a project will have to be replicated in all 12 providers tags! From that point of view perhaps UDT is a better solution but perhaps difficult to implement than separate tag provider solution. (This is similar to having separate tag database for each project which gets copied along with a project being copied).

12 tag providers would be the same mess as having 12 independent "identical" (until 5 years' time when they're not, but should be) projects :grimacing:

But what if all 12 Lines (project) change in their hardware (like new equipment or PLC logic and I/O etc) individually In fact it would be easier maintain their own databases as the hardware changes take place over the period of time after initial commissioning? In fact, if you did UDT implementation then individual changes would be difficult to do in each Line (Project). Anyways its individual's choice which approach he finds intuitive and easier.

I still wouldn't use 12 tag providers. I would use a single tag provider and have all tags in the one. Then you can easily maintain UDT definitions once instead of 12 times which would be a logistical nightmare. (Likewise with maintaining 12x individual projects that should, for the most part, be identical; use a single project. Having multiple projects is a nightmare as you can only open 1 per Designer - of course, sometimes this makes sense if they're completely independent, but it sounds like in this case they're not)

AH !

Reality does trump imagination sometimes !

Even if they are in a single project, tag provider would still work, of course UDT could be better approach. I, being from an older generation I think in terms of flat files compared to you young generation people who think in terms of objects (UDTs)!