Hi All,
I have an existing tag structure of about ~750 tags I want to create a UDT from, but I want the tag paths to be dynamic based on two parameters. I can easily do this through the GUI, but it will take me several hours to do it by hand.
Here’s what the tag looks like before changed:
"valueSource": "opc",
"opcItemPath": "ns\u003d1;s\u003d[Device1]Program:PRG1.ProductionDisplay.ActiveShiftNum",
"dataType": "Int1",
"historyProvider": "History",
"name": "ActiveShiftNum",
"historyEnabled": false,
"tagType": "AtomicTag",
"opcServer": "Ignition OPC UA Server"
I’m trying to parameterize the “Device1” and “PRG1” fields of the opcItemPath, which is easy enough, however adding a parameter binding also adds extra json code so it is not as simple as finding and replacing all Device 1 with my parameter binding, here’s what it looks like after:
"opcItemPath": {
"bindType": "parameter",
"binding": "ns\u003d1;s\u003d[{device_name}]Program:{op_program_name}.ProductionDisplay.ActiveShiftNum"
},
"valueSource": "opc",
"dataType": "Int1",
"historyProvider": "History",
"name": "ActiveShiftNum",
"historyEnabled": false,
"tagType": "AtomicTag",
"opcServer": "Ignition OPC UA Server"
Does anyone know of a method of quickly editing all 750 tags to match this new structure? I’m using Ignition 8.1.0.
Note: The opcItemPath will be much different for each tag as some are in folders and some are in the root. I tried using regex in a text editor with wildcards but it was too complicated with all of the json indenting for each folder/directory.