Programming of OPC DA .NET Clients with C# for the SIMATIC NET OPC Server (COM/DCOM)
Exchanging process data between programmable logic controllers and computers via OPC is a core element of automation technology. Due to the .NET technology introduced by Microsoft, the question arises how COM interfaces specified in OPC, such as C# can be used in .NET languages. The main requirement in this application is to show the C# programmer how process variables delivered via OPC can be visualized with a simple client.
The example at hand shows two options to create individual OPC clients under .NET with the programming language C#.
The first application describes an universal OPC client that communicates with the SIMATIC NET OPC DA Server via RCW (Runtime Callable Wrapper). For the user of this application the complex RCW methods were encapsulated in a simplified, reusable and easily expandable API-DLL. This DLL contains the most important methods to communicate with the SIMATIC NET OPC server.
User interface of application 1:
The following details are dealt with in this example:
- Connection to the process data via Industrial Ethernet as well as the SIMATIC NET OPC Server V8.x.
- Use of OPC DataAccess Custom interfaces RCW.
- Symbolic and absolute addressing of process data.
- Asynchronous/synchronous reading and writing of individual process data.
- Writing and reading of large data volumes via block services.
- Implemention of a structure for error handling.
The second application shows how to handle the OPC DataControl for .NET. The Data Control was designed especially for the easiest access to the SIMATIC NET OPC Server. The user does not have to program anything in his development environment but can interconnect the OPC variables with his standard Windows controls. This method is suitable for very easy clients.
User interface of application 2:
Your opinion is important to us
Please help us with your feedback to improve our entries. Archives
|Content of Downloads||
|OPC Client (RCW) V1.0
The version 1.0 of the example deals with the .NET programming in even more detail.
Siemens provides products and solutions with industrial security functions that support the secure operation of plants, solutions, machines, equipment and/or networks. They are important components in a holistic industrial security concept. With this in mind, Siemens’ products and solutions undergo continuous development. Siemens recommends strongly that you regularly check for product updates.
For the secure operation of Siemens products and solutions, it is necessary to take suitable preventive action (e.g. cell protection concept) and integrate each component into a holistic, state-of-the-art industrial security concept. Third-party products that may be in use should also be considered. For more information about industrial security, visit
To stay informed about product updates as they occur, sign up for a product-specific newsletter. For more information, visit
Migration to STEP 7 V13 and Visual Studio 2010