Read/Write OPC Tags within a Dataset

Hello, I’ve been trying to find a method where I can store OPC Tags and Read/Write to them and update automatically when their values change within a Dataset or something.

The application I want to use it for is when I select on a Filter, a pop-up window of a template with custom properties linked to the components within that display appears with all the details of that filter. This display will have Boolean, Integer, String, and Double data types. I’m needing the ability to store OPC Tags somehow within Ignition and to have their values pulled into those custom properties of a template by performing an action such as a click of the mouse on a button or image.

If anyone is willing to help guide, perhaps share a few scripting examples and resources, I would greatly appreciate it all. I’ve looked on Inductive University, Forums, and the manual, and still experiencing some difficulties. Attached to this topic is a snippet of the template I’ve made with Customs Properties in the Template Parameters.

Thank you all for your help!

Use indirect tag bidirectional bindings

1 Like

Is this what you mean? Do you mind being a bit more specific, please? And how can I have the tag value change depending on the filter I selected such as the example I gave in my first post?

As an example, my tags are similarly grouped by assembly line. The line number is assigned as a template parameter, everything else uses it as a reference.

As you can see, this line is not doing very well. It’s opening day of deer hunting season, and we’re somewhat short-handed. It should probably be considered a state holiday in Michigan, but that’s another story.

2 Likes

The key is to solve a tag path as a string. E.g.
Say you have this tags of a motor:

Motor 1/status
Motor 1/flt
Motor 1/km...

For this, in your template parameters, you need a property for motor name o main path.

Inside your template you’ll have some components. There is where you need indirect tag binding in properties like .text or .value.

At the beginning of the “Indirect Tag Path” you should set something like this:

{1}/status

Where {1} is a reference to something, in this case is the property you defined at the template level that holds the entry of the path.

This is just an example and it can be as complex as you need.
Bidirectional bindings should be used only when you need to write back to the driver. Otherwise, no.