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.
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.
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.