# Executing opcua method Siemens OPC server

**URL:** <https://forum.inductiveautomation.com/t/executing-opcua-method-siemens-opc-server/64939>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [October 7, 2022, 10:45am UTC](https://forum.inductiveautomation.com/t/executing-opcua-method-siemens-opc-server/64939 "2022-10-07T10:45:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adam\_Feigum](https://avatars.discourse-cdn.com/v4/letter/a/7bcc69/32.png) [@Adam\_Feigum](https://forum.inductiveautomation.com/u/Adam_Feigum)\
**Post date:** [October 7, 2022, 10:45am UTC](https://forum.inductiveautomation.com/t/executing-opcua-method-siemens-opc-server/64939/1 "2022-10-07T10:45:45Z")

</div>

need some help using opcua method call with a siemens controller does anyone know the appropriate way to call these methods example below,i get back results but they are not correct

server = "M954"   
methodobjectid= "[M954]nsu=SinumerikVarProvider;s=/Methods"  
methodnodeid= "[M954]nsu=SinumerikVarProvider;s=/Methods/ReadVar"  
opcnodepath = "[M954]nsu=SinumerikVarProvider;s=/Channel/Parameter/R[u1,820]"  
tried this syntax as well  
server = "M954"   
methodobjectid = "ns=2;s=/Methods"  
methodnodeid= "ns=2;s=/Methods/ReadVar"  
opcnodepath= "ns=2;s=/Channel/Parameter/R[u1,820]"

result = system.opcua.callMethod(server,  
methodobjectid,  
methodnodeid,  
[opcnodepath])

result of executing the above script  
**((2147483648L, u'Bad', u'Bad; unspecified.'), [(0L, u'Good', u'Good; unspecified.')], [])**

---

<div class="post-metadata">

**Author:** ![Gurjot\_Sandhu](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/gurjot_sandhu/32/38368_2.png) [@Gurjot\_Sandhu](https://forum.inductiveautomation.com/u/Gurjot_Sandhu)\
**Post date:** [October 17, 2022, 9:42pm UTC](https://forum.inductiveautomation.com/t/executing-opcua-method-siemens-opc-server/64939/2 "2022-10-17T21:42:00Z")

</div>

Hi [Adam\_Feigum](https://forum.inductiveautomation.com/u/Adam_Feigum),  
Based off the code example given here [system.opcua.callMethod - Ignition User Manual 8.1 - Ignition Documentation](https://docs.inductiveautomation.com/display/DOC81/system.opcua.callMethod) your second syntax looks correct to me. What were you expecting to see in the results? Are you seeing any errors in the logs? Have you been able to call the method successfully from somewhere else like UAExpert?

You may want to open a support ticket for assistance with this.
