# Calling OPC UA methods

**URL:** <https://forum.inductiveautomation.com/t/calling-opc-ua-methods/69403>\
**Category:** Module Development\
**Tags:** vision\
**Created:** [February 3, 2023, 1:38pm UTC](https://forum.inductiveautomation.com/t/calling-opc-ua-methods/69403 "2023-02-03T13:38:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lele\_Krele](https://avatars.discourse-cdn.com/v4/letter/l/db5fbb/32.png) [@Lele\_Krele](https://forum.inductiveautomation.com/u/Lele_Krele)\
**Post date:** [February 3, 2023, 1:38pm UTC](https://forum.inductiveautomation.com/t/calling-opc-ua-methods/69403/1 "2023-02-03T13:38:07Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [February 3, 2023, 4:34pm UTC](https://forum.inductiveautomation.com/t/calling-opc-ua-methods/69403/2 "2023-02-03T16:34:40Z")

</div>

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](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.~~

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [February 3, 2023, 4:38pm UTC](https://forum.inductiveautomation.com/t/calling-opc-ua-methods/69403/3 "2023-02-03T16:38:34Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Lele\_Krele](https://avatars.discourse-cdn.com/v4/letter/l/db5fbb/32.png) [@Lele\_Krele](https://forum.inductiveautomation.com/u/Lele_Krele)\
**Post date:** [February 7, 2023, 9:48am UTC](https://forum.inductiveautomation.com/t/calling-opc-ua-methods/69403/4 "2023-02-07T09:48:45Z")

</div>

Thanks for the answers,

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

Thanks  
Lele
