I have an UDT which I try to write to with a scrip on a button but it fails no mater what I try.
server = 'Ignition OPC UA Server'
path = 'ns=1;s=[PAXTest]AI01/Cfg_HiLim'
value = 65
system.opc.writeValue(server, path, value)
but it works perfectly with a regular tag
path = 'ns=1;s=[PAXTest]MyInt'
what am I overlooking?
Can you set the logging level for drivers.LogixDriver.Requests.WriteTagsRequest
to DEBUG and then see if there are any errors in the gateway logs?
https://docs.inductiveautomation.com/display/DOC80/Gateway+Diagnostics#GatewayDiagnostics-Logs
What kind of device is this? I’d expect a dot instead of a slash in the brands I usually use.
Or are you confusing Ignition tags with OPC items that represent device tags?
2 Likes
yeah, that was my confusion, I tried with system.tag.writeBlocking at not avail then switched to OPC but not knowing I needed to change to dots
Thanks! Much apreciated
So just to clear things up, system.opc.writeValue expects an OPC Item Path, which is derived from the NodeId assigned by the OPC server. The path is automatically assigned to an OPC tag when you drag and drop it from the browser. Most server/driver combos will have predictable NodeIds that let you guess or assign it manually, but you need to know that syntax ahead of time.
system.tag.writeBlocking expects the Tag Path to a tag, which is derived from its position in the Ignition tag model that you created it at at.
1 Like
Thanks Kevin, now I know, still on my learning curve