Exporting SIMATIC PCS 7 Process Data to External Relational Databases - WinCC IndustrialDataBridge vs OpenPCS 7

Exporting SIMATIC PCS 7 Process Data to External Relational Databases - WinCC IndustrialDataBridge vs OpenPCS 7

To reliably export real-time and historical process data from a SIMATIC PCS 7 system into an external relational database (such as Microsoft SQL Server, Oracle, or MySQL) or custom enterprise software, Siemens provides two standardized, non-intrusive integration options: WinCC/IndustrialDataBridge (IDB) and OpenPCS 7. WinCC/IndustrialDataBridge establishes configurable, script-free bidirectional data synchronization between WinCC tag/archive databases and external SQL databases triggered cyclically or on process events. Alternatively, OpenPCS 7 acts as an industrial gateway exposing OPC UA, OPC DA, and OPC HDA interfaces for custom-coded applications. Directly querying internal WinCC SQL runtime tables with external SQL commands is strictly prohibited by Siemens as it causes database locks, runtime corruption, and system instability.

Table of Contents

Architectural Guidelines for PCS 7 Database Integration

Software developers unfamiliar with industrial control systems often attempt to connect enterprise applications directly to the Microsoft SQL Server instance running on a SIMATIC PCS 7 OS Server. In SIMATIC PCS 7, Microsoft SQL Server functions as an embedded real-time database manager optimized for high-speed segment circular archiving (Fast and Slow Tag Logging).

To bridge this operational technology (OT) domain with enterprise information technology (IT) relational databases, Siemens provides engineered interface software that decouples enterprise database queries from real-time process control:
1. WinCC / IndustrialDataBridge (IDB): A turnkey configurable software bridge that transfers process values, alarms, and user archive records to standard database tables, CSV/XML files, or OPC servers without writing code.
2. OpenPCS 7: A standardized OPC communications server providing OPC UA, OPC DA (Data Access), OPC HDA (Historical Data Access), and OPC A&E (Alarms & Events) interfaces to external client software.
3. WinCC Connectivity Pack: An OLE-DB / OPC HDA interface enabling external client applications to execute standardized read queries against WinCC long-term archives.

Why Direct Access to Internal WinCC SQL Tables is Prohibited

Under no circumstances should external enterprise software connect directly to the internal WinCC SQL Server instance using standard SQL queries (SELECT, INSERT, UPDATE) against runtime tables:

  • Segment Swapping Mechanics: WinCC stores Tag Logging data in dynamically attached circular database segments (<Project>_TLG_F_YYYYMMDDHHMM...). Tables are created, detached, compressed, and deleted dynamically. Direct queries will fail when segments roll over.
  • Table Locking and Deadlocks: External queries running extensive SELECT statements lock table pages. When the WinCC runtime data manager attempts to write cyclic process samples into a locked table, buffer overruns occur, leading to data loss and potential OS Server crash.
  • Database Corruption: Performing any write (INSERT / UPDATE) operation directly on internal WinCC database tables corrupts the cryptographic signing and segment index structures, rendering the runtime project unrecoverable and voiding Siemens technical warranty.

Step-by-Step Procedure: Configuring IndustrialDataBridge with MS SQL

Follow this procedure to export PCS 7 process variables to an external Microsoft SQL database using IndustrialDataBridge:

Step 1: Prepare the External SQL Database

  1. On the external enterprise database server, create a target database (e.g., Plant_Data_History).
  2. Execute a SQL script to create the destination table:
    sql CREATE TABLE Process_Telemetry ( RecordID INT IDENTITY(1,1) PRIMARY KEY, Timestamp DATETIME DEFAULT GETDATE(), TagName NVARCHAR(50), ProcessValue FLOAT, QualityCode INT );
  3. Create an authenticated SQL login with INSERT and SELECT permissions on this table.

Step 2: Configure IndustrialDataBridge Link

  1. Launch IndustrialDataBridge Configuration Center on the PCS 7 Engineering Station or OS Server.
  2. In the project tree, right-click Links and select Add Link. Name the link Telemetry_Sync.
  3. Configure the Source Consumer:
    - Provider: Select WinCC OLE-DB or WinCC Tag Management.
    - Select the project path of the active WinCC OS project.
    - Choose the desired process variables (e.g., TIC_101/PV_Out.Value, FIC_102/PV_Out.Value).
  4. Configure the Destination Consumer:
    - Provider: Select Database (ODBC / OLE-DB).
    - Specify the connection string to the external SQL Server (Server=IT_SQL_SRV;Database=Plant_Data_History;...).
    - Select the target table Process_Telemetry.
  5. Map Source fields to Destination columns:
    - Source Tag Name -> TagName
    - Source Value -> ProcessValue
    - Source Status -> QualityCode
  6. Set the Trigger Condition:
    - Select Timer Trigger (e.g., Cycle time = 10 seconds), or configure an event trigger linked to a boolean handshake tag.
  7. Save the configuration and start the IDB Runtime Service.

Technical Comparison Matrix: PCS 7 Database Integration Methods

The following table compares the primary methods for extracting PCS 7 process data to external databases:

Feature / MethodWinCC / IndustrialDataBridgeOpenPCS 7 (OPC UA)WinCC Connectivity PackDirect SQL AccessPrimary Use CaseAutomated DB Logging (No-code)Custom Software APIsCustom SQL OLE-DB ClientsSTRICTLY PROHIBITEDProgramming RequiredNone (Visual Configuration)Yes (C#, Python, REST Client)Yes (SQL / OLE-DB queries)N/AReal-Time Data (DA)YesYes (Native OPC UA)No (Archive only)Unstable / CorruptsHistorical Data (HDA)YesYesYesDestroys SegmentsTarget DatabasesMS SQL, Oracle, MySQL, CSVAny (handled by client app)Any application with OLE-DBN/ASiemens ApprovedYes (Certified Option)Yes (Standard DCS Gateway)Yes (Certified Option)NO (Voids Support)

Verification

To confirm that data logging to the external database is operating reliably:
1. Service Execution Check: In Windows Services, verify that the IndustrialDataBridge Service is running and set to Automatic startup.
2. Database Record Inspection: Open Microsoft SQL Server Management Studio (SSMS) on the external database server; execute SELECT TOP 20 * FROM Process_Telemetry ORDER BY Timestamp DESC; and verify that new timestamped rows appear every cycle.
3. Value Accuracy Audit: Compare the ProcessValue in the SQL table with the actual live reading on the WinCC OS runtime faceplate; verify numeric parity.
4. Trigger Handshake Test: If using event-triggered logging, toggle the PLC trigger bit; verify that the database table receives the exact record and the PLC handshake bit resets.

Limitations and Operational Precautions

Take note of the following architectural rules:
- Always validate final license quantities and MLFBs against the applicable Siemens catalog and authorized distributor quotation. IndustrialDataBridge tag licenses must cover the total quantity of mapped tags.
- Never place the external enterprise database on the industrial plant bus; route database connections across a secondary network interface connected to the corporate LAN or DMZ.
- Heavy SQL queries against WinCC historical archives via Connectivity Pack can introduce disk I/O bottlenecks; schedule high-volume historical extractions during off-peak operational hours.

Engineer FAQ

What license is required to use WinCC/IndustrialDataBridge?

IndustrialDataBridge requires a dedicated base license on the host PC (e.g., 6AV6371-1DX07-0AX0), scaled according to the number of configured tags/data points (e.g., 100, 1000, 10000 tags).

Can IndustrialDataBridge write data back from SQL into PCS 7?

Yes. IndustrialDataBridge supports bidirectional data exchange. It can read recipe parameters or production schedules from an external ERP/MES database and write them into WinCC tags or User Archives.

Does OpenPCS 7 require a dedicated PC station?

OpenPCS 7 can be installed on an existing OS Server in small-to-medium plants. However, in enterprise architectures with high OPC query volumes, Siemens recommends hosting OpenPCS 7 on a dedicated PC station connected to the terminal bus to prevent CPU starvation on the OS Server.

Technical References

Related Articles

Related Tags

  • IndustrialDataBridge
  • OpenPCS 7
  • Database Export
  • Microsoft SQL Server
  • OPC UA
6 respuestas