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.
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.
05-18-2018 03:24 AM
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?
05-21-2018 08:59 AM
Are you using the LabVIEW OPC UA Toolkit?
http://www.ni.com/white-paper/53782/en/
http://zone.ni.com/reference/en-XX/help/376230A-01/opcuavis/opcua_clnt_pal/
http://zone.ni.com/reference/en-XX/help/376230A-01/opcuatool/using_opcua_svr/
http://zone.ni.com/reference/en-XX/help/371618J-01/lvmve/using_opcua_clnt/#Getting_Node_Attributes
05-22-2018 02:42 AM
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
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.
05-25-2018 03:18 AM
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
05-25-2018 04:30 AM
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 ). 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).
08-30-2021 05:15 AM - edited 08-30-2021 05:20 AM
Hi,
is there still no solution?
I found the following article:
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000001Dd3JSAS&l=en-US
09-02-2021 03:09 AM - edited 09-02-2021 03:09 AM
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.
09-02-2021 03:28 AM
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.
09-02-2021 03:51 AM - edited 09-02-2021 03:56 AM
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.
09-02-2021 05:52 AM - edited 09-02-2021 05:52 AM
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.