From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Does OPC UA support Methods?

I learnt that OPC UA has methods, like procedure calls ("Method service set"). In a OPC UA client demo from Siemens in Visual studio (109737901_OPC_UA_Client_S7-1500_CODE_V12) I can do "Method Calling", see picture.

 

Can I call OPC UA methods also from a labview client?

 

Can a labview OPC UA server have such methods for others to call?

 

In labview 2015 I find no such vi's, but maybe it has arrived later?

 

OPC UA client demo in Visual studioOPC UA client demo in Visual studio

 

0 Kudos
Message 1 of 10
(4,124 Views)

Thanks kiwi007, a lot of useful links!

I finally installed labview 2017 + OPC UA tookit yesterday. I still cannot find any vi's that seem to relate to methods, but my problem is that I am at the same time learning about OPC UA, so I don't really know what to look for Smiley Wink

 

My idea was to find some Labview example of using OPC UA Methods as a way to learn about them, but so far no luck. There are notifications and triggered alarms (?) but I don't think this is the same as Methods.

 

 

0 Kudos
Message 3 of 10
(4,069 Views)

Hey Ola_A,

 

Is there an example of a method you would like to call?

 

what would you like to use the OPC UA toolkit for overall?

 

 

Daniel

0 Kudos
Message 4 of 10
(4,048 Views)

Hello again Daniel,

my short term goal is to create a method FooBar(add1, add2) that returns the sum of add1 and add2, or something equally simple.

As a way to learn more about OPC UA, does it even include methods that I can construct? How to call them, results, errors etc.
Labview examples usually is a good way to get started, since I know it and it usual short from start to some sample code that works.

 

If have not yet found  a good book about OPC UA including methods. Suggestions?

I have read the book "The Everymans's Guide to OPC UA", and it include maybe 5 sentences about methods. I also tried to read the specifications at http://opcfoundation.org, but got lost.

Examples is a quick way to get some basic understanding I think. Managed to download some sample OPC UA server and client from opcfoundation.org, but could never run them in visual studio (it is not Labview Smiley Wink). I could run the dotnet command line server and client. The server seems to have some standard methods like ListMonitoredItems(), but I could not call them since I need to do things before.
So far the best evidence of methods = functions with in and out paramters are the siemens software I mentioned in earlier post. There I can do GetMethodInfo, fill in inparameters, Call, and view result as a list of outparameters.

 

The long term goal would be to construct a OPC UA server with a few functions (methods?) like GetRecipe(xx,yy), SendReport(zz,aa).

0 Kudos
Message 5 of 10
(4,042 Views)

Hi,

 

is there still no solution?

I found the following article:

 

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000001Dd3JSAS&l=en-US

 

0 Kudos
Message 6 of 10
(2,404 Views)

Labview OPC UA toolkit does not support methods and won't be as its development has been suspended. Your best bet is the same as the one we have used, which is to create a wrapper dll. around a .NET OPC UA library and call it from labview. We had a lot of trouble to make it work though. 

0 Kudos
Message 7 of 10
(2,370 Views)

When I used the OPC-UA toolkit I made a simplistic "Command" OPC item, where commands are text strings.  Results came either as separate items, or encoded as a string on the same "Command" item.  Crude, and can't support multiple clients (race conditions), but it did work.

0 Kudos
Message 8 of 10
(2,364 Views)

In our case we did not have such option as the device itself (a Siemens RFID reader) could only read/write the tag by invoking its method. In an other case we used a very similar solution to yours where we could modifiy both the server and the client code.

 
0 Kudos
Message 9 of 10
(2,344 Views)

We have used similar approach in the past, but for a Siemens RFID reader we had to create a wrapper because writing and reading was only possible via method calls.

0 Kudos
Message 10 of 10
(2,348 Views)