QuickOPC for OPC XML-DA
The OPC XML-DA (Data Access) specification builds on the OPC Data Access specifications to communicate data in XML. It incorporates SOAP and Web services. The current version of the OPC XML-DA specification is 1.01. XML is a technology that is readily available across a wide range of platforms, and the OPC XML-DA is not tied to Microsoft COM/DCOM as the other OPC "Classic" specifications are.
OPC XML Data Access (OPC XML-DA) is the OPC Foundations's adoptions of the XML set of technologies to facilitate the exchange of plant data across the Internet, and upwards into the enterprise domain. Note: For newer installations, OPC Unified Architecture (OPC-UA) provides a superset of OPC XML-DA functionality. There is, however, a large installed base of OPC XML-DA servers.
OPC XML-DA is fully and transparently supported by QuickOPC. You can develop OPC clients with XML data access capabilities easily with help of QuickOPC components.
As usual in QuickOPC, we have strived for providing a concise API that will allow you to achieve your goals in quickly. In additional, due to the similarities between OPC XML-DA and the COM/DCOM-based OPC-DA, we have generalized our component to work with both these specifications in the same way (in most cases). This means that you can write your code without making a distinction between the underlying technologies, and mix OPC COM and OPC XML freely, even in a single method call. In many cases, the only difference you will not is that the OPC XML servers are identified by their URL, and not by their ProgID/CLSID and the computer they reside on.
The code below (in C# language) connects to an OPC XML-DA server, and reads and displays an item value, using the QuickOPC.NET component. It works in Microsoft Visual Studio 2012, 2013 or 2015.
// Read item value and display it in a message box
"http://opcxml.demo-this.com/XmlDaSampleServer/Service.asmx", "Dynamic/Analog Types/Int").ToString());
The code below subscribes to changes of an item, and displays the value with each change:
// The callback is a lambda expression that displays the value
"http://opcxml.demo-this.com/XmlDaSampleServer/Service.asmx", "Dynamic/Analog Types/Int", 1000,
(_, args) => Console.WriteLine(args.Vtq.Value), null);
No other product can do this in such a clear and concise code, in a single statement! The programming is straightforward, and the developer can focus on getting the work done and not on fighting the intricacies of OPC protocols.
The same code simplicity is maintained in other programming languages, such as Visual Basic (VB.NET).
Supported OPC XML-DA OperationsWith QuickOPC, you can perform following OPC Data Access operations:
- Browse the address space of the OPC server.
- Read one or more values/items/node attributes.
- Write one or more values/items/node attributes.
- Subscribe to changes of a value/item/node attribute, and possibly later change the parameters of the subscription, or unsubscribe.
- Browse OPC properties of an item.
- Get value of one or more OPC properties of an item.
Most developers use the procedural coding model to create their applications. You can also:
- Display ready-made browsing dialogs with rich user interface, or create forms with flexible OPC browsing controls..
- Use Live Binding to enrich visual controls by OPC data without writing a code.
- Use Live Mapping to create .NET objects that represent connected OPC entities.
- Use Reactive Programming for high-level abstraction and complex operations on streaming data.
Public Demo OPC XML-DA Server
OPC Labs runs a public demonstration OPC XML-DA server that you can use for your explorations and tests. The server's URL is http://opcxml.demo-this.com/XmlDaSampleServer/Service.asmx . Our example code also refers to this server, so that the examples can be run without having to set up a server locally.