---
title: "Siemens S7 to MQTT — ConnectMQ Edge Connector | ConnectMQ"
description: "Read Siemens S7-1200, S7-1500, S7-300/400 and LOGO! PLCs over ISO-on-TCP with ConnectMQ Edge and publish the tags to MQTT over TLS in an ISA-95 topic tree."
url: "https://connectmq.com/connectmq-edge/siemens-s7/"
language: "en"
---

ConnectMQ Edge · Siemens S7

# Your Siemens S7 PLCs, live in the cloud

Getting production data out of S7 PLCs usually means custom code, an extra OPC server or another SCADA licence. ConnectMQ Edge reads S7-1200/1500, S7-300/400, S7-200 SMART and LOGO! directly over ISO-on-TCP and streams every tag to your ConnectMQ broker as clean ISA-95 data, ready for dashboards, alerts and the Digital Twin. If the internet drops, the values wait on disk and nothing is lost.

-   ISO-on-TCP · port 102
-   S7-1200 / 1500
-   S7-300 / 400
-   S7-200 SMART
-   LOGO!

[Try it free](https://app.connectmq.com/signup) [See pricing](https://connectmq.com/pricing/)

No card required

-   Siemens S7 PLCs
-   OMRON PLCs
-   Modbus meters
-   IEC 104 RTUs
-   IEC 61850 IEDs
-   OPC UA servers

**ConnectMQ Edge**Windows service`ISA-95 · JSON``offline buffer`SCADA / HMI · OPC UA :48010 · MQTT :1883

**ConnectMQ Cloud**`broker.connectmq.com`Dashboards · Alerts · Digital Twin · API

## Why connect Siemens S7 to ConnectMQ

### No code, no extra OPC server

Pick the Siemens S7 template, enter the IP address and tags, and press Save and apply. The channel starts right away, without restarting the service.

### Data ready for dashboards and alerts

Every tag arrives as an ISA-95 topic with value, quality, unit and timestamp, so you can build dashboards, rules and the Digital Twin in ConnectMQ straight away.

### Local SCADA and write-back included

Edge serves the same tags on its local OPC UA server, and tags marked Writable can be written back to the PLC from there.

## What it reads and does

-   S7-1200, S7-1500, S7-300/400, S7-200 SMART and LOGO!
-   ISO-on-TCP (port 102), many tags packed into a few requests
-   Data blocks, markers, inputs and outputs: DB10.DBX0.0, M20.3, I0.1, Q0.0
-   Booleans, integers and reals with unit and deadband per tag
-   Write-back for tags marked Writable via the local OPC UA server

What arrives in ConnectMQ Cloud`connectmq/site1/production/line1/press/Press1/Speed`

```
{ "value": 1493.2, "quality": "good", "unit": "rpm", "dataType": "Float32", "tag": "Speed", "device": "Press1", "channel": "PressLine" }
```

## Up and running in three steps

1.  1
    
    ### Install ConnectMQ Edge
    
    Download Edge from your ConnectMQ account and sign in — the Windows service and desktop app come in one installer.
    
2.  2
    
    ### Add the Siemens S7 channel
    
    Pick the Siemens S7 template, enter the address of your device and the tags you need, and press Save and apply.
    
3.  3
    
    ### Use the data
    
    The tags appear in your ConnectMQ broker as ISA-95 topics, ready for dashboards, alerts and the Digital Twin.
    

## Where teams use it

### OEE and downtime dashboards

Stream run state, speed and part counts from press or packaging lines and build live OEE and downtime dashboards in ConnectMQ.

### Machine alarms to maintenance

Turn PLC alarm bits into ConnectMQ rules and alerts, so maintenance hears about a stop before the shift report.

### Energy per machine

Collect the energy and counter values your PLCs already calculate and track consumption per machine, line and part.

## Siemens S7: frequently asked questions

How do I connect a Siemens S7-1200 PLC to MQTT?

In TIA Portal, enable PUT/GET access in the CPU protection settings, turn off “Optimized block access” on the data blocks you want to read and download to the PLC. Then add a Siemens S7 channel in ConnectMQ Edge, set the IP address, CpuType S71200 and Slot 1, and list the tags with absolute addresses such as DB10.DBX0.0. Edge publishes them to your ConnectMQ broker over MQTT and TLS (port 8883) in an ISA-95 topic tree.

Can ConnectMQ Edge read optimized data blocks?

Not over S7: optimized (symbolic) data blocks cannot be read with the Siemens S7 connector. On an S7-1500, read them through the PLC’s OPC UA server with the OPC UA Client connector, or turn off “Optimized block access” on the data blocks and use absolute addresses.

Can I write values back to the PLC?

Yes. Mark the tag "Writable": true in the channel configuration. OPC UA clients connected to the Edge local OPC UA server (opc.tcp://<edge-pc>:48010/ConnectMQ) can then write it, and Edge passes the value to the PLC through the S7 driver.

Technical details: step-by-step setup and example configuration

### Set it up step by step

1.  1
    
    Prepare the PLC in TIA Portal (S7-1200/1500): enable “Permit access with PUT/GET communication from remote partner” in the CPU protection settings and turn off “Optimized block access” on the data blocks you want to read. Download to the PLC.
    
2.  2
    
    In ConnectMQ Edge, open Connectors in the left menu, click + Add channel and pick the Siemens S7 template.
    
3.  3
    
    The channel is added with sample addresses. In the editor on the right, change the IP address, device settings and tags to match your equipment; Validate project checks the configuration.
    
4.  4
    
    Press Save and apply. The channel starts right away without restarting the service. Add as many channels as you need, including several of the same type.
    
5.  5
    
    Set CpuType (S71500, S71200, S7300, S7400, S7200Smart, Logo0BA8), Rack and Slot (1 for S7-1200/1500, 2 for S7-300/400).
    
6.  6
    
    Use absolute addresses: DB10.DBX0.0 (bool), DB10.DBW2 (int), DB10.DBD4 (real, with "DataType": "Float32"), M20.3, I0.1, Q0.0.
    
7.  7
    
    Check the result: on Overview, the devices show Reading data under Field devices, and problems (wrong address, timeout, rejected login) appear in the Last problem column. The values themselves are in Local OPC UA Server › Live tag values; details are in Windows Service Settings › Logs.
    
8.  8
    
    Open the ConnectMQ portal: the tags appear in the topic tree as <enterprise>/<site>/<area>/<line>/<cell>/<device>/<tag> with a JSON payload (value, quality, unit, timestamp), ready for dashboards, alerts and the Digital Twin.
    

Example configuration

```
{
  "Name": "PressLine",
  "Driver": "SiemensS7",
  "Devices": [{
    "Name": "Press1",
    "ScanRateMs": 500,
    "Isa95": { "Cell": "press" },
    "Settings": { "Host": "192.168.0.10", "CpuType": "S71500", "Rack": 0, "Slot": 1 },
    "Tags": [
      { "Name": "Running", "Address": "DB10.DBX0.0", "DataType": "Boolean" },
      { "Name": "Speed", "Address": "DB10.DBD2", "DataType": "Float32", "Unit": "rpm", "Deadband": 0.5 },
      { "Name": "PartCount", "Address": "DB10.DBD6", "DataType": "UInt32" },
      { "Name": "TargetSpeed", "Address": "DB10.DBD10", "DataType": "Float32", "Writable": true }
    ]
  }]
}
```

### Good to know

-   Optimized (symbolic) data blocks cannot be read over S7. Read them through the S7-1500 OPC UA server with the OPC UA Client connector instead.
-   PUT/GET access and “Optimized block access” are CPU and data block settings: they only take effect after you download the changes to the PLC.
-   Tags marked "Writable": true (like TargetSpeed in the example) can be written from an OPC UA client on the Edge local OPC UA server; the value is passed to the PLC through the S7 driver.

## Other connectors

[**Modbus TCP / RTU**Energy meters, drives and PLCs over Modbus TCP, UDP or RS-485 RTULearn more](https://connectmq.com/connectmq-edge/modbus/) [**OMRON FINS / NJ-NX**CJ/CP/CS memory areas over FINS and NJ/NX variables by nameLearn more](https://connectmq.com/connectmq-edge/omron/) [**OPC UA Client**Subscribe to any OPC UA server: S7-1500, Beckhoff, B&R, KEPServerEXLearn more](https://connectmq.com/connectmq-edge/opc-ua-client/) [**IEC 60870-5-104**RTUs and substation gateways as controlling station, port 2404Learn more](https://connectmq.com/connectmq-edge/iec-104/) [**IEC 61850 (MMS)**Protection relays, bay controllers and IEDs over MMS with SCL importLearn more](https://connectmq.com/connectmq-edge/iec-61850/) [**Sparkplug B**Ignition, Node-RED and Sparkplug gateways via the local brokerLearn more](https://connectmq.com/connectmq-edge/sparkplug-b/) [**Local OPC UA server**Every tag Edge collects on one OPC UA endpoint for SCADA and MESLearn more](https://connectmq.com/connectmq-edge/opc-ua-server/)

[ConnectMQ Edge](https://connectmq.com/connectmq-edge/)

## Connect your first PLC this week

Create your ConnectMQ account, download ConnectMQ Edge from the portal and add your first connector in minutes.

[Get started](https://app.connectmq.com/signup) [See pricing](https://connectmq.com/pricing/)

## Articles

[All articles](https://connectmq.com/blog/)

Industrial IoT

### [Sparkplug B and the Unified Namespace: Structuring Industrial IoT Data on MQTT](https://connectmq.com/blog/mqtt-sparkplug-b-unified-namespace/)

Sparkplug B gives industrial MQTT a strict session and payload model, while a Unified Namespace gives your plant data a single, readable home. Here is how they fit together, with topic design tips and live examples.

August 26, 20269 min read

Managed MQTT Cloud

### [How to Choose an IoT MQTT Broker: 12 Criteria and the Questions to Ask Your Vendor](https://connectmq.com/blog/how-to-choose-an-iot-mqtt-broker/)

A practical 12-point checklist for choosing an IoT MQTT broker, a table of questions to ask every vendor, and a five-minute hands-on test you can run against broker.connectmq.com.

September 21, 20269 min read

MQTT Security

### [MQTT Security Best Practices: A 12-Point Checklist for IoT Teams](https://connectmq.com/blog/mqtt-security-best-practices/)

A hands-on MQTT security checklist covering TLS, credentials, client IDs, topic design, payload validation, rate limits and certificate checks, plus how ConnectMQ handles each point.

September 28, 202611 min read
