Read from A OPC device, write value to B OPC device/PLC

Hi everyone,

I’ve got a customer that wants to use Ignition as a middleware between OPC systems (A device and B device) on a production line. Ignition is to read values from OPC device A and then write changes into a PLC or other OPC device.

My first thought was just to have tag event change scripts on the tags to write whenever a change was registered. My only concern is that there will be a lot of tags being managed all at the same time. For instance, a device could have hundreds of tags and there could be upwards of 25 opc devices that need this functionality.

I didn’t find anything in the forums, and just wanted to check to see if there was a more tried and true method of achieving what I want, or if there is a more reliable method than just thousands of tag change scripts.

Thanks,
Stuart

OPC to OPC transaction group?

https://docs.inductiveautomation.com/display/DOC81/OPC+to+OPC+Transaction+Group

Tag change scripts would probably be fine, too, though…

I would use a single gateway tag change script subscribed to all of the “origin” OPC tags. Place all of those in folder named “Origin”, with subfolders as desired. For each of those, make the corresponding (receiving) OPC tag with the same name and subfolder within a top level “Target” folder. In the tag script, remove the “Origin” prefix and add the “Target” prefix to obtain the target tag path to write the new value to.

As an optimization, when the initialChange flag is true, I would read the target tag and only write the new value if different.

I was curious if transaction groups could be used for this, but I missed the OPC to OPC example when doing my research. Thanks for providing the link.

Thank you for your proposed solution. I’ll look into this on our side.

Won’t putting all the source tagpaths in the gateway tag change script tag list and writing a script to write them to appropriate tag name generated thru script, in destination PLC tag paths work? Only thing is that we have to manually list all tag paths from the ‘source’ PLCs tags in the script. Of course initial change flag has to be used appropriately. This is how I am using to communicate in my new module.

Aren't wildcards supported here now?

Minimally supported. Only for leaf nodes in a folder, IIRC.

I think you just restated my recommendation.

1 Like

Yes I guess that will help in case of bulk of tags under a folder or tags are having a pattern.

All three approaches are valid, each has its pluses and minuses. One has to choose based on his convenience.