OPC and .NET

Note: recent OPC standards, including Unified Architecture (UA) and Express Interface (Xi) were designed to natively support .NET. The content of this page largely relates to techniques for using the older COM-based OPC specifications from .NET applications.

Using .NET for client development

Using .NET for server development

.NET Resources

XML and SOAP (link to separate page)


Using .NET for client development

Microsoft doesn't expect us to throw out all our COM code just yet. In fact there are well defined mechanisms for bridging from the .NET virtual machine (the Common Language Runtime) to the old world of COM servers.

An early option, using the OPC Automation interfaces, was to add a reference to the Automation server or DLL directly to a .NET project. Coding with C# or another .NET language then became reasonably straightforward. However, see this discussion (via Google Groups) about problems with the OPC Automation wrapper.

OPC Foundation .NET API and Runtime Callable Wrappers

OPC Foundation supplies a set of Runtime Callable Wrappers (RCWs), allowing OPC custom interfaces to be accessed from .NET clients.

These .NET wrappers are available to all as part of the OPC Core Components set. RCWs are provided for all published specifications, but still leave much COM interop work to be done by the developer.

A better option for Foundation members is to download the OPC .NET API, which supports DA 2 and 3, DX and HDA. The .NET API provides a unified set of interfaces for accessing both COM and SOAP/XML servers, and also includes C# and VB.NET clients which exploit these interfaces.

See this thread from the OPC Foundation Message Board for a comparison of the Runtime Callable Wrappers and the .NET API. This article from Advosol, outlining the requirements of a .NET API, may also be useful.

The Message Board also has this interesting thread on the background to the OPC .NET API. Note that the .NET API does not have the status of a full OPC specification - it is simply an implementation provided as a convenience to OPC Foundation members.

The .NET API requires the .NET Framework version 2.0.

For the low-down on the techniques involved in interfacing COM with .NET, take a look at Adam Nathan's book .NET and COM: The Complete Interoperability Guide.

Advosol

Advosol OPC DA.NET, OPC HDA.NET, OPC AE.NET Client Components

Advosol's OPC Data Access .NET Wrapper (OPC DA.NET) provides .NET wrappers for the OPC Data Access and Common custom interfaces. Comprehensive documentation is included, as well as source for client programs (C#, VB.NET and Delphi 2005), and wizards for simplified application creation.

OPC DA.NET supports Data Access 3.0, and includes a DA 3.0 test client as well as a customizable simulation server supporting both DA 2.0x and 3.0.

Data binding to Windows Forms controls is possible. Callback subscriptions refresh the item values directly in Windows controls, with no user callback handlers required.

OPC DA.NET is sold for 495 USD (single seat license) or 1195 USD (site license). A free trial download is available: this runs for 30 minutes at a time.

Advosol also offers a Professional Edition of OPC DA.NET. Additional capabilities include the ability to emulate DA 3.0 features when connected to DA 2 server. Pricing is 695 USD (single seat license) or 1695 USD (site license, or 2495 USD with source).

OPC DA.NET now supports both 32- and 64-bit platforms. Visual Studio 2005 compiled applications run in 64-bit mode on 64-bit systems.

OPC DA.NET is used within Advosol's OPC XML-DA server (see our XML page).

Advosol also offers the OPC HDA .NET Client Development Component and OPC Alarm & Event .NET Client Development Component, providing .NET wrappers for the HDA and AE custom interfaces. OPC AE.NET includes an EventView control to handle event subscriptions without user code.

Each of Advosol's .NET client components supports .NET 2.0 and Visual Studio 2005 (including Express editions).

Advosol XMLDA.NET

Advosol's XMLDA.NET is described as a .NET wrapper which provides an XML-DA application interface. Using this component, applications developed as XML-DA client programs are able to access (COM) DA servers. Unlike an XML-DA gateway, this is achieved without XML serialization. XMLDA.NET is particularly recommended for ASP client applications which need to access DA servers.

Version 2.0 adds data binding to user objects, Windows controls and ASP.NET controls.

XMLDA.NET is sold for 695 USD for a single seat license, or 1995 USD for a site license (currently reduced to 495 and 1495 USD respectively). A 30-minute free trial download is available.

OPC Process Calculator

Somewhat different from the other products listed here, OPC Process Calculator is an OPC calculation engine for advanced and complex calculations. It allows for easy creation of process calculations that use OPC tags as equation inputs and outputs.

OPC DA and HDA specifications are supported. A free trial download is available.

Industrial DOT NET "Local IO"

IDN Local IO allows rapid development of OPC clients by encapsulating all OPC functionality in a single .NET assembly. Communication to remote servers is supported via DCOM, with a built-in watchdog function to monitor connections.

A free trial download is available, including C# and VB.NET samples, while the website does a good job of explaining the development process. A single developer license is priced at 485 USD.

Local IO includes Quick Data, a DA client built using Local IO. Quick Data is also available separately as a free download.

Local IO version 1.4 supports .NET 2.0 and Visual Studio 2005, and includes source code for the Quick Data client.

KineticaRT

KineticaRT OPC Client Library

KineticaRT's .NET OPC Client is available at around 90 USD per developer license with no runtime charges. It supports OPC DA connectivity using an architecture based on connectable .NET components.

The product also integrates well with KineticaRT's range of .NET visualization components. For more information, see the online help file (Windows HTML Help format).

KineticaRT Studio .NET

Developers looking for a more complete framework may be interested in KineticaRT Studio .NET. This product integrates KineticaRT's .NET OPC client and other components into a full Rapid Application Development GUI- and SCADA-builder system. An evaluation copy may be requested, and full documentation is available for download.

Northern Dynamic SLIK-DAC

Northern Dynamic's SLIK-DAC provides a Windows Forms Control to enable rapid development of DA client applications. This product is covered in more detail on our Toolkits page.

Open Automation Software OPC Systems.NET

Open Automation Software offers OPC Systems.NET, a collection of native .NET components. Each component is also available separately:

OPC Web Controls.NET
ASP.NET Web Forms components, compatible with ASP.NET 1.1 or 2.0. AJAX technology is used to provide real-time data updates without the need for page refreshes.
OPC Controls.NET
Windows Forms controls providing real-time OPC data access. Includes labels, buttons, text boxes, checkboxes etc.
OPC Trend.NET
For real-time and historical trending. Supports 3D graphics with rotation, allowing viewing from any axis position. Now also includes an ActiveX control version.
OPC Alarm.NET
For real-time and historical alarming. Also includes Alarm Logging that runs as a Windows Service. Now also includes an ActiveX control version.
OPC Database.NET
A Windows Service OPC Client that provides data logging to SQL Server, MSDE, Oracle, ODBC, and CSV files.
OPC Report.NET
Report generation service for any database source including OPC Alarm.NET and OPC Database.NET. Supports various report types including PDF, Word, HTML.
OPC Route.NET
A Windows Service allowing transfer of data between local and remote OPC servers.

Open Automation Software also offers OPC Mobile.NET. Containing similar functionality to OPC Controls.NET, this product targets Pocket PCs running Windows Mobile 2003 or Windows Mobile 5.0.

All products implement .NET Remoting for communications, eliminating the need for DCOM configuration.

Pricing for the entire OPC Systems.NET suite starts at 1995 USD. Individual components start at 795 USD, although OPC Controls.NET and OPC Mobile.NET are cheaper at 295 USD. Help files may be freely downloaded.

Softing OPC Toolbox

Softing's OPC Toolbox is a family of high-end toolkits for the quick and easy development of OPC clients and servers. Support is provided for DA (1.0 through 3.0), AE and XML-DA 1.01. Comprehensive documentation integrates with Visual Studio (2003 or 2005), and commented examples are available for both VB.NET and C#.

Software Toolbox

Software Toolbox Extender for Visual Studio

OPC Extender is a rapid development tool for Visual Studio 2003 and 2005 that takes the drag-drop, point-click concepts of Software Toolbox's OPC ActiveX and brings them to VB.NET and C# developers building OPC client applications.

The Extender allows the developer to OPC-enable any .NET WinForms component: adding the OPC Extender to a .NET project extends all the .NET components on a form with additional properties. Through those properties, a point and click interface allows setup of subscriptions, one-time reads, and writes. The Extender may be used to write a value from a text box to an OPC item, without writing any code. It also takes the complexities of OPC group and item management and bundles them up into simple one-line methods for reading and writing data.

OPC Extender has been interoperability tested to ensure it will work with a wide range of OPC Servers. It is priced at 1195 USD.

Software Toolbox OPC Web Client: OPCData.NET

OPC Web Client is a major initiative from Software Toolbox. It comprises two main product lines, OPCData.NET and OPC Web Service, which may also be purchased as a bundle. In all, OPC Web Client offers a broad range of routes to developing OPC client solutions.

OPCData.NET includes both .NET and ActiveX components, allowing OPC clients to be built using either .NET technology or "legacy" environments such as VB6 and VBScript. OPC clients developed with these components communicate directly with OPC servers using COM and DCOM.

The programming API is simple and easy to learn, hiding the complexity of OPC. The product has completed OPC Interoperability testing as part of OPC Foundations's Certification program.

OPCData.NET is priced at 995 USD for a royalty free license.

Software Toolbox OPC Web Client: OPC Web Service

OPC Web Service is a new feature of OPC Web Client Version 3.0. Typically installed on a web server running IIS, this product allows OPC data to be accessed directly through a browser, or using any web service consumer. No software need be installed on the client computer.

OPC Web Service is licensed per server computer, but each instance will support any number of clients and may acquire data from an unrestricted number of OPC servers. Pricing starts at 495 USD.

The complete OPC Web Client bundle may be purchased for 1395 USD. A free demo may be downloaded - this runs for a limited time before needing to be restarted. Comprehensive documentation and online demos are also available.

Technosoftware OPC Client Developer Studio .NET

Technosoftware's OPC Client Developer Studio .NET supports Data Access 2.05 and 3.0, XML-DA 1.01, Alarms & Events 1.10, and HDA 1.20. Support is provided for .NET 2.0 and Visual Studio 2005 or 2008.

Pricing starts at 995 EUR (around 1200 USD).

Visavi Visual OPC .NET

Visual OPC .NET is designed to enable rapid development of OPC DA clients using any .NET language. Classes are included which wrap the OPC COM interfaces, as well as Windows Forms controls which support direct binding to OPC data items.

The cost of a development license is 499 USD, or 799 USD including an auto-archiving trend control. A number of sample C# and VB.NET projects is included, and a useful online reference is available along with a 30-day trial download.

Using .NET for server development

While it easy to understand why developers might choose .NET for OPC client development, it is harder to see the benefit of using .NET for the custom element of (COM-based) OPC servers. Indeed, many of the APIs needed to interface with control equipment do not yet exist in the .NET world. The obvious exceptions would be where the data source is either a database or an Ethernet device; .NET may be well suited in many such cases.

Anyone who opts to take the .NET route could, in theory, choose from many of the existing server toolkits, as long as they were prepared to deal with the interop issues themselves. These interop issues should be manageable when using any of the 'rapid development' toolkits.

Advosol .NET Server Toolkits

Advosol's DANSrv (OPC DA .NET Server Toolkit) provides .NET developers with the ability to build their own Data Access servers using exclusively .NET languages (VB.NET and C# are supported). Support for Data Access 3 is included.

OPC DA .NET Server Toolkit is priced at 1695 USD for a site license, or 2995 USD for an enhanced 'Professional' edition. A free trial download is available - this allows servers to run for 30 minutes before having to be restarted.

OPC DA .NET Server Toolkit now supports both 32- and 64-bit platforms. No special customization is required to support 64-bit mode.

Advosol has now released an OPC AE .NET Server Toolkit (aka DANSrvAE). This product extends the OPC DA .NET Server Toolkit, adding support for OPC AE 1.1. Pricing is set at 1495 USD for a site license.

HDANSrv (OPC HDA .NET Server Toolkit) is a Historian server toolkit, allowing the HDA server logic to be fully implemented using C# or VB.NET. Full source is included, along with sample servers which have been validated to HDA 1.2 using the OPC Foundation Compliance Test.

Each of Advosol's .NET Server Toolkits supports .NET 2.0 and Visual Studio 2005 (including Express editions).

Free evaluation versions of the AE and HDA .NET Server Toolkits are available upon request.

Northern Dynamic SLIK-DA

Northern Dynamic's SLIK-DA provides the core functionality of a Data Access server encapsulated as a Windows Forms Control. This product is covered in more detail on our Toolkits page.

Softing OPC Toolbox

Softing's OPC Toolbox is a family of high-end toolkits for the quick and easy development of OPC clients and servers. Support is provided for DA (1.0 through 3.0), AE and XML-DA 1.01. Comprehensive documentation integrates with Visual Studio (2003 or 2005), and commented examples are available for both VB.NET and C#.

Technosoftware OPC Server Developer Studio .NET

Technosoftware's OPC Server Developer Studio .NET provides all common code as a single supplied EXE file, while the part which must be adapted resides in a .NET assembly DLL; this provides an elegant and straightforward development route.

Only five custom functions need to be defined by the user. The server supports all versions od OPC DA and AE, and both 32- and 64-bit operation.

A free download is available, enabling payment of fees to be deferred until server development is complete.

Pricing starts at 995 EUR (around 1200 USD).

.NET Resources