Skip to content

OPC UA

Antti Haaraniemi

From Siemens data to reports: WinCC, PCS 7 and S7-1500 as the OPC UA server

Summary

In a Siemens plant the OPC UA server is often already there: in the S7-1500 controller, in WinCC or on the PCS 7 operator station server. This article covers where to find the server, what it needs, and how measurements and alarms become reports without any change to the PLC program.

In many plants Siemens is the backbone of the automation: PLCs are programmed in TIA Portal, WinCC is the control room and process plants run PCS 7. Reports are still often compiled by hand. The data exists, and current Siemens systems can hand it out through a standard interface: OPC UA.

Where is the OPC UA server in a Siemens plant?

Data can be read either straight from the PLC or from the control room system. Which is better depends on where the measurements and alarms you need already exist.

The OPC UA server in Siemens systems
SourceWhat you getThings to note
S7-1500 (TIA Portal)PLC variables directly, with no control room system in betweenThe server is switched on in the CPU properties and needs a runtime licence. A variable must be accessible to OPC UA, which is usually on by default.
WinCCControl room variables and, depending on the version, alarms and archivesServer features and licensing vary by product and version (WinCC V7, WinCC Unified). WinCC OA is a product line of its own, with an OPC UA server component of its own.
PCS 7Process values and alarms from the operator station (OS) serverAvailability depends on the PCS 7 version and the options installed; check with the system supplier.

This is an overview, not a substitute for Siemens documentation. Version, licence and configuration details are always checked in your own system's documentation or with your automation supplier.

Read from the PLC or from the control room?

From the PLC (S7-1500) when there is no control room system, or when you need values that were never taken into it. The PLC's OPC UA server takes CPU capacity, so the number of subscriptions and the sampling interval are worth sizing, and a change to the PLC project, such as marking a variable visible, means a download to the PLC.

From the control room (WinCC or the PCS 7 OS) when the measurements, units and alarms are already named there. Alarms in the control room are often in exactly the form an incident review needs: source, severity, message and the timestamp the automation gave. The PLC is not touched at all.

Practical steps to the first connection

  1. Server on. Make sure the OPC UA server is licensed and running, and note its address, for example opc.tcp://wincc-server:4840.
  2. Security policy and account. Choose a strong policy for production, such as Basic256Sha256, and create a dedicated account for the reading client.
  3. Certificate approval. On the first connection attempt the server usually rejects the unknown client's certificate. An administrator marks it trusted in the server's certificate store or in the TIA Portal settings.
  4. Choosing measurements. The client browses the server's node tree and the measurements are picked from there. From a PLC, the variables accessible to OPC UA appear.
  5. Alarms and history. Check whether the server offers alarms through Alarms & Conditions and history through history reads, if you need them.

How does the data become reports?

DataPortia™ joins the Siemens system's OPC UA server as a client. It subscribes to the chosen measurement points, stores them in a time-series database on the plant's own server and turns them into scheduled PDF, CSV and Excel reports. The PLC program and the control room displays are not touched, and DataPortia writes nothing to the automation system.

  • Several servers in parallel: for example a WinCC control room and a separate S7-1500 line as connections of their own, each with its own measurement points.
  • Alarms with their original timestamp: Alarms & Conditions events are stored with the timestamp the automation server gave them. Milliseconds can be shown with a setting in the alarm view.
  • Old history included: if the server offers history, DataPortia reads it over the same connection and fetches only the missing periods.
  • Calculated values: consumptions, efficiencies and energies are calculation points in DataPortia, so no new counters have to be added to the PLC.

More on automated reports and on incident reviews in alarms and events. The OPC UA roles are explained in OPC UA client vs. server.

The most common pitfalls

  • The server is installed but not licensed. The connection may open in a test and drop later, or some features are missing.
  • A variable is missing from the node tree. In a PLC the reason may be that the variable's OPC UA access has been switched off, or that the change has not been downloaded to the PLC yet.
  • Clocks out of step. When alarms are read from several systems, their order relative to each other can be trusted only if the servers' clocks are synchronised.
  • An unencrypted connection in production. The None policy makes testing easier, but production uses an encrypted connection.

Atorcom has long experience of Siemens environments and is glad to help with setting up the server. Try DataPortia for 30 days against your own Siemens system: the trial includes every feature except the HA add-on and commits you to nothing.

Request a 30-day trial Get in touch