Choose an explicit data path
Connect the Unit 101 tank-and-pump example to SCADA and a reporting application without confusing the protocols. TIA Portal configures the controller. WinCC Explorer configures the Classic SCADA project. A broker distributes MQTT messages. An edge gateway can translate controller data into MQTT payloads or an application-facing REST API.
Use three named paths in your design: Path A: S7-1500 OPC UA server → WinCC OPC UA client. Path B: S7-1500 OPC UA server → edge client → MQTT broker. Path C: S7-1500 OPC UA or supported Web API → edge gateway → REST client. A fourth optional path uses Siemens LMQTT_Client in a compatible PLC project to publish directly to a broker.
The S7-1500 Web API is JSON-RPC over HTTPS, not a native REST resource such as /api/tanks/101. The REST route in these lessons is an original gateway design. Likewise, do not assume every WinCC Explorer version has the same native MQTT or REST facilities.
Lab scope: use an isolated training CPU/network, TIA Portal compatible with its firmware and a supported WinCC Classic release where required. Check the exact CPU order number, firmware, license and installed software before following configuration steps. Examples use read-only telemetry; no example writes a motor command. The addresses, tag names and values are teaching choices.
Use the same five values in every protocol
| PLC DB member | TIA type | Example | Meaning |
|---|---|---|---|
DB_IIoT.LevelPct | Real | 50.0 | Tank level, % |
DB_IIoT.Flow_m3h | Real | 12.0 | Discharge flow, m³/h |
DB_IIoT.PumpRunning | Bool | true | Confirmed pump feedback |
DB_IIoT.PumpFault | Bool | false | Fault indication |
DB_IIoT.SampleSeq | UDInt | 42 | Sample counter for detecting frozen data |
Create the DB in a training TIA project. Record the five tag types and engineering units. For the test sequence, hold level at 50 %, flow at 12 m³/h and pump feedback true, then change one value at a time. Increment SampleSeq from a deliberate sampling routine. Reading several tags separately does not guarantee a coherent snapshot; use a designed snapshot/sequence scheme when that matters.
For each exported sample, record source identity, value, source/collection time, quality and sequence. Do not label a gateway collection timestamp as the PLC source timestamp.
Assign each protocol a practical job
| Path | Good first exercise | Where to configure | Success evidence |
|---|---|---|---|
| OPC UA | Browse typed PLC values and display them in WinCC | TIA CPU/server interface; WinCC client channel | Expected value, type and good quality |
| MQTT | Send named telemetry to a subscriber | Edge gateway or compatible PLC library; broker | Topic, payload, sequence and receipt time |
| REST API | Read latest equipment state from a business application | Gateway HTTP service and data mapping | Defined JSON response and meaningful error states |
Choose a gateway for the first combined exercise so protocol translation and application credentials are separate from screen graphics. Keep the tested WinCC-to-PLC path available when the broker or REST client is offline.
Build the lab in an order that isolates faults
- Record CPU model/firmware, TIA version, WinCC version and needed licenses.
- Create DB_IIoT, compile the training PLC project and verify the values in a watch table.
- Complete the S7-1500 OPC UA server lesson and read the five nodes with one client.
- Complete the WinCC client lesson and compare its display to the watch table.
- Publish the same data through the MQTT bridge; inspect it with a separate subscriber.
- Expose a read-only REST representation through the gateway. Check stale/error responses as well as success.
- Disconnect one path at a time and record which displays should remain available.
Keep network endpoints, certificates, namespaces and topic names in a worksheet. Use placeholders in shared learning notes; store actual credentials in the appropriate runtime configuration.
Acceptance and troubleshooting
- Every arrow has a named source, destination, protocol and authentication method.
- WinCC level and MQTT/REST level match the PLC after allowing for their different update intervals.
- A stopped sample counter results in a stale indication, not a healthy frozen value.
- Broker failure does not silently turn a pump indication to STOPPED.
- REST errors are distinguishable from a legitimate zero process value.
- No example depends on exposing the CPU directly to the public internet.
Deliver: one architecture sheet and five-value mapping. Continue with OPC UA server configuration, then the WinCC client. This article is the roadmap; the remaining lessons contain the practical configuration and test steps.
Official technical references
- Siemens: S7-1500 OPC UA server configuration example
- Siemens: LMQTT_Client V3.1 application example
- Siemens: S7-1500 Web API and JSON-RPC endpoint
The workflows use these references for the named software/protocol features. Unit 101 data, diagrams, payloads and acceptance criteria are original training examples. Confirm release-specific settings in the matching Siemens documentation.
Connect the data to your factory screen
Use the five P&ID lessons to create the tank, pump and valve display, then apply the tested controller connection.
Factory screen learning seriesOPC UA manualDiscuss practical training