Programming of OPC DA .NET Clients with C# for the SIMATIC NET OPC Server (COM/DCOM)
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:
Programming an OPC DA .NET Client with C# and RCW for the SIMATIC NET OPC Server (COM/DCOM) and a simple OPC DA .NET Client with SIMATIC NET OPC Data Control
Documentation for application 1 (3,0 MB)
Documentation for application 2 (2,5 MB)
Visual Studio 2010 project OPC DA Client (6,4 MB)
Visual Studio 2010 project OPC DA Connector (7,9 MB)
STEP 7 (TIA Portal) V15.1 project (732,4 KB)
OPC Client (RCW) V1.0
The version 1.0 of the example deals with the .NET programming in even more detail:
OPC-Client (RCW) V1.0 (4,5 MB)
Update with STEP 7 (TIA Portal) V15.1
- You have a technical question / problem: Ask the Technical Support
- You want to discuss in our forum and exchange experiences with other users
- You want to create CAx data for one or more products
- You would like to send us feedback on this Entry