Difference between revisions of "How to read an OPC UA node value in FSharp"
Jump to navigation
Jump to search
m (User moved page How to read an OPC UA node value in F to How to read an OPC UA node value in FSharp) |
|||
Line 1: | Line 1: | ||
− | [[Category:.NET]] [[Category:Console application]] [[Category:F-sharp]] [[Category:OPC UA]] | + | [[Category:.NET]] [[Category:Console application]] [[Category:F-sharp]] [[Category:How to]] [[Category:OPC UA]] |
<syntaxhighlight lang="fsharp"> | <syntaxhighlight lang="fsharp"> | ||
open OpcLabs.EasyOpc.UA | open OpcLabs.EasyOpc.UA |
Revision as of 14:15, 17 August 2016
open OpcLabs.EasyOpc.UA
open System
Console.WriteLine "Instantiating the client object..."
let client = new EasyUAClient()
Console.WriteLine "Reading node..."
let value = client.ReadValue(new UAEndpointDescriptor("http://opcua.demo-this.com:51211/UA/SampleServer"), new UANodeDescriptor("nsu=http://test.org/UA/Data/;i=10853"))
Console.WriteLine "Displaying results..."
Console.WriteLine value
Console.WriteLine "Press Enter to continue..."
Console.ReadLine() |> ignore
Ships as UAConsoleApplication1 example with QuickOPC since version 5.41. Use the example from the product for an up-to-date code.