Calling OPC UA methods

Hi everyone

I have a general question on how to do calling methods in OPC UA.

Our device in lab supports methods, so we need to be able to call them, is it possible to use Ignition for that?

After, is it possible to send data to PI vision after getting them in Ignition /client and is it much additional work required. PI also supports OPC UA, but can this be done?

Any docs, support or suggestion is helpful!

Thanks

You posted this in the module development category, so it's not clear, but, yes, you can use Ignition's OPC UA client to call methods:
https://docs.inductiveautomation.com/display/DOC81/system.opcua.callMethod

Doing that from a module would be somewhat more involved. You'll ultimately want to either call the static method callMethod in com.inductiveautomation.ignition.gateway.opcua.scripting.CallMethodKt, or directly construct a org.eclipse.milo.opcua.stack.core.types.structured.CallMethodRequest#CallMethodRequest and invoke it against your OpcUaConnection manually (obtain an OpcUaConnection from the singleton com.inductiveautomation.ignition.gateway.opcua.client.connection.OpcUaConnection.Companion).
Either approach will require your module be dependent on the OPC UA module, so that you're loaded in the appropriate classloader.

Even depending on the OPC UA module these are not part of the public API, so references to these won't compile against the SDK.

1 Like

Thanks for the answers,

Is it possible to send data to PI vision or Kepware after getting them in Ignition?

Thanks
Lele