# OPC-UA Method Call

**URL:** <https://discourse.nodered.org/t/opc-ua-method-call/79812>\
**Category:** Industrial\
**Created:** [14 July 2023 08:44 UTC](https://discourse.nodered.org/t/opc-ua-method-call/79812 "2023-07-14T08:44:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![steve1](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@steve1](https://discourse.nodered.org/u/steve1)\
**Post date:** [14 July 2023 08:44 UTC](https://discourse.nodered.org/t/opc-ua-method-call/79812/1 "2023-07-14T08:44:16Z")

</div>

Hi,  
I'm trying to call an OPC-UA method. Input parameters are handled in a function node.  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/9/f975c74442afd58e69118619c742498db9833530.png)

```auto
msg.objectId = "ns=2;s=Sinumerik";
msg.methodId = "ns=2;s=/Methods/Filehandling/Select";
//msg.fname=flow.get("fname");
msg.inputArguments = [
    { dataType: "String", value: "Sinumerik/FileSystem/Work Pieces/TECHNIKER/MESS.MPF"},
    { dataType: "UInt32", value: 1}
];
return msg;

```

Error:Execute method result, error:The node id refers to a node that does not exist in the server address space.  
Copied the identifier from UAExpert:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/7/e7f059ed348bf9e229f785df2d5471ab12e90ca8.png)  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/e/3e8953f849504211562352bf6548fc3780d7423f.png)  
I'm not sure if the identifier of the method or of the input argument is the problem.  
If I call the method in UAExpert directly it works.  
Any thoughts about this?  
Thx,  
Steve

---

<div class="post-metadata">

**Author:** ![mikakaraila](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mikakaraila/32/37496_2.png) [@mikakaraila](https://discourse.nodered.org/u/mikakaraila)\
**Post date:** [13 August 2023 17:12 UTC](https://discourse.nodered.org/t/opc-ua-method-call/79812/2 "2023-08-13T17:12:29Z")

</div>

You need to provide method parent nodeId as objectId that contains method.  
And methodId nodeId to call method.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [12 October 2023 17:12 UTC](https://discourse.nodered.org/t/opc-ua-method-call/79812/3 "2023-10-12T17:12:46Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
