Alarm pipeline binding

We have setup alarms on some of our UDT tags and reuse these UDTs from project to project. These alarms always call the same active pipeline name and we use the same pipeline name on all projects.

On each project we have to go into the UDTs and change the pipeline because the path includes the project name and our project names are different. So I am looking into binding the pipeline so it will dynamically include the project name.

I can bind the Active Pipeline to runScript(“system.util.getProjectName”)+’/pipeline name’

My question is would this be a good idea? I’m not sure how often the runScript function would be called. If it’s called at the scan class rate, for every alarm in every UDT instance, it seems like this would be an unnecessary burden on the gateway.

Just looking for suggestions.

I have a similar situation and am curious if a good solution was found.

In my testing, runScript(“system.util.getProjectName”)+’/pipeline name’ did not work. Tags are in the Gateway and not project-specific.

What did work is runScript(“system.project.getProjectNames()[0]”)+’/pipeline name’ . This is not ideal though. It works if you have only one project on your gateway, but not if you have multiple projects and the project you want is not first in the list.

Use system.util.getProjectName() on a session.custom property, and reference this in your binding.

Why do you think that? Tags aren’t in projects. Pipelines are, but this binding is in the tag.

1 Like

Sorry, I didn’t mean that it should work on the tag, just that it should work to get the project name on a session.custom prop, which I suggest afterward. I’ll rephrase my post, I admit it’s a bit confusing

Admittedly, I am not familiar with session custom properties, but this sounds like it would make my alarm’s active pipeline binding dependent on Perspective. I would rather the solution not be dependent on the HMI, whether Vision or Perspective.

In principle, I should be able to make a project with only an alarm notification pipeline in it (no Vision or Perspective) and reference the active pipeline for all of my alarms to it. That may be a solution, albeit not an elegant one. If every gateway included a project with the same name which only contained an alarm notification pipeline, then I would not have to change my UDT definitions from gateway to gateway.

This is actually how we handle 7.9 → 8.x upgrades… Alarm Pipelines were previously defined in the “global” project and on upgrade get moved to a single “alarm-pipelines” project.

1 Like

You’re right, I was talking non-sense.
In our setup, we have one remote tag provider per project, and a tag with the project name is configured there. This may work if you have a similar setup, but if several projects use the same provider then you’ll need something else.

1 Like

We have multiple projects on the same gateway with the same standard tag provider. Here is what I have come up with…

Within the Tag Browser, have one folder for each project. The names of these top-level folders match the names of the projects. For alarms, bind the Active Pipeline to split({PathToTag}, '/')[0,0] + '/pipeline name'.