OPCDA.NET
OPC DA .Net Client Development Component
OPCDA.NET is a .NET component for the development of OPC DA client applications with C# or VB.NET. It provides classes, controls and tools for the efficient development of high quality .NET (C# or VB) OPC DA client applications.
OPCDA.NET is the only .Net wrapper that supports 32-bit and 64-bit operation on Windows XP, Vista and Windows-7 systems. The .Net wrapper assembly and the utilities are provided in a version for .Net Framework 4, 2 and 1.1. Many samples applications are provided with projects for Visual Studio 2010, 2008, 2005 and 2003.
OPCDA.NET has a multi-layered class structure. The user can choose the interface layer according the application requirements and the personal preferences.
The Professional Edition offers features that improve the application quality without increasing the development effort.
See more details in the Feature Comparison.
Classes and Features | Standard Edition | Professional Edition |
The OpcServer class is the base class that reflects one OPC DA server instance. | yes | yes |
OPC DA V3 specified Browse and GetProperties methods. | Only for DA V3 servers | Emulated for DA V2 servers. |
The OpcGroup class is the base class for the OPC DA group interface and reflects one group instance in the OPC DA server. | yes | yes |
The BrowseTree class browses the OCP DA server into a TreeNode structure or displays the browse result in a Forms/WPF TreeView control. | yes | yes |
The SyncIOGroup class provides methods for simple synchronous read/write access for individual OPC server items. | yes | yes |
The RefreshGroup class provides methods for simple asynchronous read/write access and data change callbacks for individual OPC server items. | yes | yes |
The OpcDataBind class links OPC server items to Windows/WPF controls and handles the updating. | yes | yes |
The BGServer, BGGroup, BGDataBind, BDBrowseTree classes handle the server access in background classes to prevent the application from becoming unresponsive due to server communiction issues. | NA | yes |
The ItemListLoader class and ItemListBuilder utility manage item definitioin lists in XML files. | NA | yes |
The DAServer component can be dragged from the Visual Studio toolbox and configured in the Visual Studio Designer. It handles the server access with extensive error checking. | NA | yes |
The DAGroup component can be dragged from the Visual Studio toolbox and configured in the Visual Studio Designer. Asynchronous server access is made simple and the data change callbacks can be configured to update Windows controls. | NA | yes |
Support for the Express Interface (Xi / OPC .NET 3.0) option that enables the application to access DA and Xi servers through the same API. | NA | yes |
Access to UA Servers
OPCDA.NET with the OPCDA.NET-UA option enables clients to access OPC DA and OPC UA servers through the same API. No external converters are required. DCOM is completely eliminated.
Access to OPC .NET (Xi) Express Interface Servers
OPCDA.NET with the OPCDA.NET-Xi option enables clients to access OPC DA and OPC .NET (Xi) through the same API. No external converters are required. DCOM is completely eliminated.
Other OPC DA clients can access Xi servers through the DAEtoXi converter.
OPC Server Access Controls
The OCP Server Access controls are easy to use and handle the OPC server access efficiently and with extensive error checking. The controls are invisible, doing the background work. |
|
QuickUse Classes
Browse functions display the items directly in a TreeView control. Items can be read or written with a single, very simple method call using either synchronous or asynchronous access. For asynchronously accessed items the QuickUse class maintains a data buffer and handles the data change callbacks. The user can read the current value from the buffer or request a notification.
OPCDA.NET V4 added support for data binding subscriptions that refresh the item values directly in Windows controls and user classes, no user callback handlers are required.
Private Sub btnConnect_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles btnConnect.Click
ListView1.Items.Clear()
ListView1.Items.Add("")
ListView1.Items.Add("")
Try
tbStatus.Text = "Connected"
OpcBind= New OpcDataBind(Me, cbOPCServers.Text)
OpcBind.Subscribe("SimulatedData.Signal", CheckBox1)
OpcBind.Subscribe("SimulatedData.Ramp", ProgressBar1)
OpcBind.Subscribe("Dynamic.Analog Types.Double[]", _
ListView1.Items(1).SubItems, 0)
Catch ex As OPCException
tbStatus.Text = ex.Message
End Try
End Sub
Private Sub btnDisconnect_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles btnDisconnect.Click
OpcBind.Disconnect()
tbStatus.Text = "Disconnected"
End Sub
OPC DA Methods
This interface layer provides access to all OPC DA server functions including functions such as item properties and server management. User with some OPC experience will find this layer easy to use, all data is passed in .Net data types. The project creation wizards create functional sample code with the features selected in the wizard dialog. The OPCDA.NET Professional Edition does emulate some OPC DA V3 methods for OPC DA V2 servers.
Documentation and Support
Extensive documentation is provided as a Help2 Visual Studio plug-in that offers context sensitive help. Phone/email support is free and questions are answered with short response times.
OPCDA.NET overview:
|
the OPC DA V2/V3 functions are provided as methods with easy to use .NET interface. |
|
.NET 1.1 - 4.5 versions provided that work on Windows XP and newer systems including Windows Vista in 32-bit and 64-bit mode. |
|
the Visual Studio 2003/2005/2008/2010/2012 project wizards create VB or C# application projects with a functional client that connects to an OPC server and browses the items. |
|
the Visual Studio 2005/2008/2010/2012 class wizards add an OPC server access class to an existing project. |
|
Visual Studio 2005/2008/2010/2012 code snippets speed the client coding. |
|
Many sample applications in VB and C# source code illustrate the server access |
|
the OPC DA V2 and OPC V3 test clients can be used to check the server behavior |
|
the OPC DA V2/V3 simulation test server can be used as a reference |
|
the extensive reference documentation plugs into Visual Studio 2005, 2008 2010, 2012. Context sensitive help displays the needed information without long searches. |
|
extra classes are provided for typical tasks like browsing servers or items. These methods return the result in Windows control compatible lists that can be directly displayed. |
|
classes for background server access prevent applications becoming unresponsive. |
|
ItemListBuilder tool and ItemListLoader class for clients that use a pre-defined set of items. |
|
OpcSecurityAnalyzer tool helps resolve DCOM settings issues. |
|
the .NET interface is wrapped directly to the custom interface with custom marshalers, offerering top performance |
OPCDA.NET is a top performance .Net wrapper that marshals .Net calls directly to the OPC custom interface, without an ActiveX or OPC Automation layer. All OPC DA V2/V3 defined functions are supported. Additional classes for browsing and item access simplify the the client development considerably.
Wizard
The project generation wizard generates the OPC server access code according the user selections. The generated code is fully functional, easy to understand and an excellent starting point for any OPC client application.
Browse Support
OPCDA.NET provides excellent browse support, making the interactive selection of items real simple. With one method call the server can be browsed into an in-memory TreeNode structure or directly into a TreeView control.
The BrowseShowTree class shows branches and items in a single TreeView control. Only single nodes can be selected in a TreeView control. |
The BrowseShowTreeList class shows the branches in a TreeView control and the items of the selected branch in a ListView control. Multiple items can be selected in the ListView control.
Browsing a single branch is also made simple. The convenient OPC DA V3 Browse and GetProperties methods can be used with OPC DA V3 and V2 servers.
Background Server Access
Each OPC server access can possibly take seconds or even minutes due to either long DCOM communications timeouts or due to long server processing times that may be caused e.g. by slow device access.
The OPCDA.NET background server access classes handle all server access in background threads and prevent the application becoming unresponsive during the server access. The application quality can be greatly enhanced without additional develoment effort. The application becomes also highly robust, all server access is time limit checked and the server connection is monitored even without the application making a server access.
View the C# sample code to see how short and simple a high quality OPC DA client application can be.
Visual Studio 2005 code snippets are provided for all methods.
ItemListBuilder / ItemListLoader |
Visual Studio integrated Help
Comprehensive help documentation integrates into Visual Studio offering context sensitive help. A utility is provided to view the Help2 documentation outside of Visual Studio.
Error Lookup Utility
The OPC error codes and OPC related Windows error codes are explained. The utility also explains OPC quality codes.
OPC DA V2 Test Client
Easy to use test client that uses OPCDA.NET for the server access.
The server access can be tested with the same .Net wrapper as used in the OPCDA.NET based application.
OPC DA V3 Test Client
Test client that uses OPCDA.NET for the server access. Most OPC DA3 features can be interactively tested.
Sample Applications
Many sample applications are provided for C# and VB.NET, complete with Visual Studio 2003 projects. The projects are tested to convert and compile with Visual Studio 8 (2005).
The samples show how the many OPCDA.NET features can be used and the samples can be used as the starting point for user applications.
Browse |
Shows how the OPC server can be browsed and items displayed and selected. The high-level BrowseTree classes are used. |
BrowseV3 |
Shows how the OPC DA V3 Browse method can be used to browse the items in a branch and reading all item properties. Only the Professional Edition supports these Browse methods for OPC DA V2 servers. |
BrowseLowLevel |
Shows how the OPC server can be browsed using the OPC DA V2 defined Browse support functions. This application can also be used to find eventual non-compliances in the server browse interface. |
Background Server Access |
Shows the usage of the Professional Edition background server access classes. All server access is handled in background threads to ensure that the application never freezes, even with the OPC access hanging in a DCOM timout due to communication failure. |
DataBind |
Shows how the DataBind class can be used to display OPC item values in different types of Windows controls without the user having to code callback handlers. |
Item Lists |
OPC calls are made with item lists that are loaded from an XML file. The XML ItemList definition file was created with the ItemListBuilder utility. This feature is available only in the OPCDA.NET Professional Edition. |
Properties |
This sample client shows how the OPC server can be browsed and items properties queried and read. |
Read |
This client uses the RefreshGroup class to asynchronously read the values of two items. Server and item names are hard coded into the program. |
Update |
This sample client uses the OPCDA.NET QuickUse RefreshGroup class to periodically update one item through data change callbacks. |
Windows Service |
This sample shows how a Windows service can access OPC servers. The values of three items are transferred to other items in the same server. Multiple OPC servers can be accessed by creating multiple OpcServer objects. |
Sample Client |
Simple test client application with browse, read, write, subscribe features. |
Many additional sample Windows applications can be created with the project wizards. The features added to the code can be selected in a dialog. With only the code for the selected features the created application are easy to understand and extend to meet the user requirements.
|
Alternate Approaches
OPCDA.NET is strutured according the OPC DA interface specification. OPC DA servers can also be accessed thru components with a different application interface.
XML-DA application interface |
OPC .NET (Xi) application interface
The PaXi client base implements the OPC .NET (Xi) specified interface. OPC .NET combines the functionality of the classic OPC DA, AE and HDA in to single, WCF (Windows Communication Foundation) based interface.
PaXi based applications can access Xi servers thru WCF comunication and classic OPC DA, AE, HDA server thru DCOM communinication, without external converter servers.
OPCDA.NET based clients can access Xi servers with WCF communication thru the DAEToXi converter server.
Performance is similar but with PaXi no external converter servers need to be installed, configured and maintained.
Some rarely used OPC DA features are not accessible thru the OPC .NET (Xi) interface.
Product | SKU | Description |
Evaluation License | DANW-EV |
The Evaluation License grants the non-exclusive right to use the enclosed software and accompanying documentation for internal evaluation and testing purposes only. It may be used on multiple computers and by multiple users but may not be distributed. |
Single Developer License Professional Edition | DANWP-DL |
PROFESSIONAL EDITION
The Single Developer License grants a single developer the non-exclusive right to use the software on computers within a single software development site owned by the licensee. The license can be transferred on a permanent basis to another developer within the same organization The software may be distributed as part of the licensee's products, free of run-time royalties. Please read the full license agreement. The license includes a subcription for 90 days. |
Company Site License Professional Edition | DANWP-SL |
The Professional Edition provides additional features for the quick development of high quality client applications. The Company Site License grants multiple users the non-exclusive right to use the enclosed software and accompanying documentation on computers, workstations or terminals in a single software development site owned by the licensee. The software may be distributed in binary form as part of the licensee's products, free of run-time royalties. Please read the license agreement. The license includes a subcription for 90 days. |
Company Site License with Professional Edition Source | DANWP-SC |
The Professional Edition provides additional features for the quick development of high quality client applications. The Company Site License with Source grants multiple users the non-exclusive right to use the enclosed software and accompanying documentation on computers, workstations or terminals in a single software development site owned by the licensee. The software may be distributed in binary form as part of the licensee's products, free of run-time royalties. Please read the license agreement. The license includes a subscription for 90 days. |
Service Subscription Single Developer Prof. Edition License | DANWP-SVD |
The Service Subscription entitles the owner to download product updates released within the subscription period and get free phone/email product support. The service subscription extends the subscription period for 12 month from the expiring date of the previous subscription respectively 15 month from the product purchase date. |
Service Subscription Site License Professional Edition | DANWP-SV |
The Service Subscription entitles the owner to download product updates released within the subscription period and get free phone/email product support. The service subscription extends the subscription period for 12 month from the expiring date of the previous subscription respectively 15 month from the product purchase date. |
Service Subscription Professional Edition Source License | DANWP-SVS |
The Service Subscription entitles the owner to download product updates released within the subscription period and get free phone/email product support. The service subscription extends the subscription period for 12 month from the expiring date of the previous subscription respectively 15 month from the product purchase date. |
Single Developer License | DANW-DL |
STANDARD EDITION
The Single Developer License grants a single developer the non-exclusive right to use the software on computers within a single software development site owned by the licensee. The license can be transferred on a permanent basis to another developer within the same organization The software may be distributed as part of the licensee's products, free of run-time royalties. Please read the full license agreement. The license includes a subcription for 90 days. |
Company Site License | DANW-SL |
The Company Site License grants multiple users the non-exclusive right to use the enclosed software and accompanying documentation on computers, workstations or terminals in a single software development site owned by the licensee. The software may be distributed in binary form as part of the licensee's products, free of run-time royalties. Please read the license agreement. The license includes a subcription for 90 days. |
Service Subscription Single Developer License | DANW-SVD |
The Service Subscription entitles the owner to download product updates released within the subscription period and get free phone/email product support. The service subscription extends the subscription period for 12 month from the expiring date of the previous subscription respectively 15 month from the product purchase date. |
Service Subscription Site License | DANW-SV |
The Service Subscription entitles the owner to download product updates released within the subscription period and get free phone/email product support. The service subscription extends the subscription period for 12 month from the expiring date of the previous subscription respectively 15 month from the product purchase date. |