Writing a Single OPC tag To Work with Multiple Components

Good afternoon Team,

I am not sure what information is needed for you to help me on this question but I am starting with a screenshot.

Here is my issue. I have many conveyors, as shown in the pic with PT10010_Conveyor_Singulate.HMI.Send_to_Hospital tag.

I need to create a button that when a conveyor is selected on my view, it will use that conveyor number to execute the tag for that conveyor. See second picture for view of the conveyors that will be selected.

I should have included this screen shot of the set up of each tag. I will be using

That is what indirect binding is all about. Design your window/template/page/view to accept a tagPath or tagFolder string parameter. Wherever you are accessing tags for a specific conveyor, use that string in an indirect binding. For writable tags, set the binding to bidirectional. Then your button can write to the bound property and the write will be directed to the corresponding conveyor. You can also perform more complicated tasks by scripting the concatenation to feed into system.tag.writeBlocking().

If it is only one target tag, not one tag for each conveyor, you will have to script the entire operation to match that one tag’s requirements. How does it work now?

I thought it would be an indirect binding, i am glad you confirmed that for me. There is a tag for each named conveyor. I put that tag in there to show all the values.


I hate to admit this but i am completely lost on this. I have tried, in the past to do an indirect binding on something like this and i gave up. My problem is that I do not know how to write it when the conveyor name is at the beginning.

I have successfully created this which seemed easy at the time. This is a template of a crane, we have 5., 1 - 5. (see pic) I used an indirect binding on the root to allow me to “name” each crane as I added the template to my view.

For these conveyors, how or what do i bind this new indirect binding to? I need to drill down to this {/root/“Conveyor NAME HERE”.props.status.keys[1]}, but i do not know how to make it so it is dynamic so when I select a conveyor it populates the name. (See 2nd pic)

This, however, eludes me. I think you are saying to add a PARAMS to my view

To get this to work dynamically, try this:
In Tag Path, search for the tag of interest: /root/“Conveyor NAME HERE ”.props.status.keys[1]
Replace /“Conveyor NAME HERE ” with {1}
In your Reference 1 Property, bind it the string tag that contains the “Conveyor Name” of interest that dynamically changes.

I hope that helps!

Cheers, Sean