---
title: Siemens S7 collector
slug: reference/siemens-s7-collector
docTags: w56nvEoTA2xAb2x1X3JPc,GOo15ntkoXThxPf_Z8vVm
createdAt: 2025-09-10T15:44:06.419Z
---

## Basic settings

These settings are used by the collector to successfully connect to the Siemens S7 device or gateway.

### Host

**Description**: Hostname or IP address of the S7 device or gateway.
**Required**: yes
**Example**: 192.168.0.10

This defines the network address of the Siemens PLC or gateway that the collector connects to.

### Port

**Description**: TCP port of the S7 device or gateway.
**Required**: no
**Default**: 102

:::hint{type="info"}
Port 102 is the standard ISO-on-TCP (RFC 1006) communication port for Siemens S7 controllers.
:::

### Rack

**Description**: The rack number of the S7 CPU.
**Required**: no
**Default**: 0

### Slot

**Description**: The slot number of the S7 CPU.
**Required**: no
**Default**: 2

For most Siemens S7-300, S7-400, S7-1200, and S7-1500 systems, the CPU is located in slot 2.

## Advanced settings

These settings are specific to the S7 communication layer and not part of the shared base collector configuration.

### Timeout

**Description**: TCP connect and read timeout in milliseconds.
**Required**: no
**Default**: 10000

### IdleTimeout

**Description**: TCP idle timeout in milliseconds. It cannot be disabled: the settings form enforces a minimum of 1000.
**Required**: no
**Default**: 60000
**Minimum**: 1000

### RetryInitialBackoffMs

**Description**: Initial backoff time for connection retries in milliseconds.
**Required**: no
**Default**: 500

### RetryMaxBackoffMs

**Description**: Maximum backoff time for connection retries in milliseconds.
**Required**: no
**Default**: 5000

## Measurement settings

The measurement settings define how the collector reads data points from Siemens PLC memory.

### MemoryAddress

**Description**: Absolute S7 memory address in **STEP-7 (dot)** or **Kepware (comma)** syntax.
**Required**: yes

**Examples:**

- **Bit**: `DB1.DBX0.1` or `I0.3`. A bit address always needs a bit index from 0 to 7.
- **Byte**: `DB1.DBB2`&#x20;
- **Word**: `DB1.DBW4`
- **Double word**: `DB1.DBD8`
- **Array**: `DB1.DBW0..DBW8`
- **STRING**: `DB2,STRING100.20`

Use **non-optimized data blocks (DBs)** for consistent addressing.
Ranges must stay within one DB and align to element size. Bit ranges are not supported.

### PLCDatatype

**Description**: The datatype of the PLC value.
**Required**: yes
**Options**: BOOL | BYTE | WORD | DWORD | INT | UINT | DINT | UDINT | REAL | STRING
**Example**: REAL

**Rules:**

- `BOOL` requires a bit index in the address.&#x20;
- `STRING` length must come from the address.&#x20;
- Ranges must align with element size (`WORD=2`, `DWORD/DINT/REAL=4`).&#x20;
- For STEP-7 `DBD* `addresses, this determines whether to interpret as `DWORD`, `DINT`, or REAL.&#x20;

### CollectionInterval

**Description**: Poll interval in milliseconds.
**Required**: yes
**Default**: 1000

### CollectionOffset

**Description**: Offset in milliseconds relative to the 0th second.
**Required**: yes
**Default**: 0

## Collector health

S7-specific collector health messages. See for all generic collector health messages.

You can find the collector health and collector history in the detail view on the right when selecting a collector in the Historian admin webpage.

### Error initializing collector

An error occurred when initializing the Siemens S7 collector.
This indicates that a setting is misconfigured or the S7 device/gateway is unreachable during initialization.

### Reconnecting

The collector lost its connection to the S7 device or gateway and is retrying. This covers both a failed connection attempt and a connection dropped by a TCP timeout or communication failure.

## Siemens S7 communication notes

### Firmware compatibility

**Siemens S7 PLC firmware upgrades can impact data collection.**
&#x20;Please contact **Factry support** before performing firmware upgrades.

Firmware updates may change the protocol behavior or security model of the PLC.

### Optimized block access (S7-1200 / S7-1500)

Newer Siemens PLCs (especially **S7-1200** and **S7-1500**) use *Optimized block access*, which dynamically changes the memory layout.
The **S7 collector uses static memory addressing**, reading data directly from fixed PLC memory regions. When “Optimized block access” is enabled, these addresses can change after PLC program modifications, causing measurements to fail.&#x20;

**To ensure compatibility:**

1. In **TIA Portal**, disable “Optimized block access”.
   &#x20;DB → Properties → General → Optimized block access → OFF&#x20;
2. In **CPU Properties → Protection**, enable
   &#x20;"Permit access with PUT/GET" ✔️&#x20;
3. Only **non-optimized data blocks (DBs)** are supported by the S7 collector.&#x20;

[More information here](https://flows.nodered.org/node/node-red-contrib-s7)

Older PLCs (S7-300, S7-400) do not have optimized block access and are fully compatible.

### Block reads

Siemens S7 devices read multiple tags in blocks.
The collector automatically groups measurements together and reads **as many tags as possible in one request** to reduce communication overhead.

This block-read optimization minimizes PLC communication load and improves performance.
