×
Siemens Industry Online Support
Siemens AG
Entry type: Application example Entry ID: 21576581, Entry date: 09/03/2014
(1)
Rate

PC-Based Automation: Connection of Databases via open Interfaces Using OPC-Client, Programmed with the SIMATIC NET.NET OPC Client API in C#

  • Entry
  • Associated product(s)
Task Data are to be transferred between a database and a SIMATIC controller via OPC. SIMATIC WinAC RTX is to be used as controller. ...
Task
Data are to be transferred between a database and a SIMATIC controller via OPC. SIMATIC WinAC RTX is to be used as controller.

The specific task is to transfer recipe data from a database to WinAC RTX. Quality data are then to be written back to the database. This solution must be flexible enough to ensure that the database can be located on any networked computer.

Solution
A solution with WinAC RTX in connection with the SIMATIC NET OPC server is predestined to solve such tasks. WinAC RTX provides the PC with the control functionality. The OPC server offers the option to exchange data between Windows applications and the controller. This works on a local as well as on a distributed basis with other computers.

Topics of this application

  • Options for creating a dynamic recipe control in WinAC RTX

  • Basics required for individual data exchange between databases and WinAC using an OPC server

    •  Programming a database link using ADO.NET

    •  Programming an OPC client with the SIMATIC NET .NET OPC Client API

Functional structure

The figure below shows the basic interaction of the components described in this example.

Hardware and software configuration
The hardware configuration realized for this application and the installed software are shown in the following figure.

Downloads

Content of Downloads

Download

Documentation
Connection of Databases via open Interfaces Using OPC-Client, Programmed in C# .net
21576581_WinAC_SO_DOKU_V2_en.pdf ( 2847 KB )
Code
STEP 7 Project, Database File and Source Code
21576581_WinAC_SO_CODE_V2.zip ( 3339 KB )

Further Information
Eight applications are available in the Applications & Tools portal to round off and extend the required expert knowledge on “ PC-based automation”. We have developed and described one example for each of the four typical automation tasks (controlling, communication, visualization, technology). The respective links are listed in the table below.
 

Title

Link

Controlling: Basics for the Solution of Automation Tasks Based on WinAC RTX 21004765
Controlling: Connection of Databases via open Interfaces Using OPC-Client 21576581
Visualization: Configuration and Operation of WinCC and Tuning of WinAC RTX 21004855
Visualization: Plant Visualization with Visual Basic .NET via OPC XML 21004994
Technology: Positioning with WinAC RTX, Easy Motion Control and Micromaster 4xx 21004767
Technology: Linking Windows Applications to WinAC RTX Using WinAC ODK 21572937
Communication: S7 Communication with BSEND/BRCV for WinAC RTX and S7-300 20987361
Communication: Reporting Process Values via E-Mail with WinAC RTX and WinAC ODK 20987360


Last Modification
Rearrangement to OPC UA and TIA portal