OPC-UA Method Calls

@Kevin.Herron Thanks.

For those interested, here’s some code that I used to achieve what Kevin suggested:

tagPath = "path-to-ignition-tag-in-same-address-space-as-method"
tagConfig = system.tag.getConfiguration(tagPath, False)
server = tagConfig[0]['opcServer']
opcPath = tagConfig[0]['opcItemPath']
#opcValue = system.opc.readValue(server, opcPath).getValue()

namespaceID = opcPath[3:str(opcPath).find(";")]
objectId = 'ns='+namespaceID+';s=id-of-object-containing-the-method'
methodId = 'ns='+namespaceID+';s=id-of-method'
system.opcua.callMethod(server, objectId, methodId,[])
1 Like