Skip to content

Siemens S7 ISO TCP ​

Siemens S7 ISOTCP is a protocol developed by Siemens for communication with Siemens S7 series PLCs. This protocol is based on the TCP/IP protocol stack and uses the ISO-TSAP protocol for handling connections and data transmission. It enables read and write operations on various data types of the PLC, including bits, bytes, word, double word, timers, and counters.

For the generic steps, see Create a Southbound Driver and Groups and Tags.

For measured tag counts and polling intervals, see Siemens S7 Driver Performance.

The implementation of S7 ISOTCP in EMQX Neuron is divided into two drivers.

  • The Siemens S7 ISOTCP driver is mainly used to connect to PLC modules such as Siemens S200, S200smart, S1200, and S1500.
  • The Siemens S7 ISOTCP for 300/400 driver is mainly used to connect to PLC modules such as Siemens S300 and S400 that have an Ethernet module.

Add Driver ​

On Data Collection → South Devices, click Add Device.

  • Name: The name of this device node.
  • Driver: Select the Siemens S7 ISOTCP driver or Siemens S7 ISOTCP for 300/400.
DriverDescription
Siemens S7 ISOTCPFor Siemens S200, S200smart, S1200, S1500 PLC
Siemens S7 ISOTCP for 300/400For Siemens S300, S400 PLC

Connection Parameters ​

Click the driver card to open the Device Configuration page and fill in:

ParameterDescription
PLC IP AddressTarget PLC IPv4 Address
PLC PortTarget PLC port, default 102
PDU SizePDU size, default 960
PLC ModuleTarget PLC module, S7-200/300/400/1200/1500
Connection TypeOnly for S7-300/400/1200/1500, Connection type, default PG
CPU RackOnly for S7-300/400/1200/1500, PLC CPU rack, default 0
CPU SlotOnly for S7-300/400/1200/1500, PLC CPU slot, default 1
Local TSAPOnly for S7-200, local TSAP
Remote TSAPOnly for S7-200, remote TSAP
T1write request batch size
T2wait time after send request
T3read request batch size

TIP

When interfacing with Siemens S7 1200/1500 PLC using the Siemens S7 ISOTCP driver, certain modifications are required in the Siemens software (TIA16) settings:

  • The optimized block access must be turned off.
  • The access level must be full and the connection mechanism must allow GET/PUT.

For detailed operating steps, please refer to Tailor S7 1200/1500 PLC for Effective ISOTCP Driver Use.

Tag Configuration ​

The data types and address formats supported by this driver are listed below.

Data types ​

  • INT8
  • UINT8
  • INT16
  • UINT16
  • INT32
  • UINT32
  • FLOAT
  • DOUBLE
  • BIT
  • STRING
  • ARRAY_CHAR

Address Format ​

AREA ADDRESS[.BIT][.LEN][STR_TYPE]

AREA ADDRESS ​

AREADATA TYPEATTRIBUTEREMARKPLC Area
Iint8/uint8/int16/uint16/bit/int32/uint32/floatreadinputInput I, E
O/Qint8/uint8/int16/uint16/bit/int32/uint32/floatread/writeoutputOutput Q, A
F/Mint8/uint8/int16/uint16/bit/int32/uint32/floatread/writeflagFLAG Memory M
Tint32/uint32/floatread/writetimerTimer T
Cint16/uint16read/writecounterCounter C
DBint8/uint8/int16/uint16/bit/int32/uint32/float/double/stringread/writeglobal DB blockVariable Memory V, DB index 1

TIP

For the global data block DB, in the PLC side of the address such as DBX, DBW, DBB, etc., directly converted to DBW can be, do not need to do byte conversion, such as DBX1.0 -> DBW1.0 .

Example:

AddressData TypeDescription
I0int16I area, address is 0
I1uint16I area, address is 1
O2int16O area, address is 2
O3uint16O area, address is 3
Q4uint16Q area, address is 4
F4int16F area, address is 4
F5int16F area, address is 5
M6int16M area, address is 6
T6int32T area, address is 6
T7int32T area, address is 7
C8uint16C area, address is 8
C9uint16C area, address is 8
DB10.DBW10int16In a data block of 10, the starting data word is 10
DB12.DBW10uint16In a data block of 12, the starting data word is 10
DB10.DBW10floatIn a data block of 10, the starting data word is 10
DB11.DBW10doubleIn a data block of 11 , the starting data word is 10

.BIT ​

Optional, referring to a bit of an address, range 0 - 7.

.LEN ​

When the data type is a string or char array type, it is required and indicates the length of the string.

STR_TYPE ​

Optional, indicates the string type, default is single-byte character, option value is 'D', indicating double-byte character.

Example Addresses ​

AddressData TypeDescription
I0.0bitI area, address 0, bit 0
I0.1bitI area, address 0, bit 1
O1.0bitO area, address 1, bit 0
O1.2bitO area, address 1, bit 2
F2.1bitF area, address 2, bit 1
F2.2bitF area, address 2, bit 2
DB1.DBW10.0bitIn a data block of 1, the starting data word is 10, bit 0
DB2.DBW1.7bitIn a data block of 2, the starting data word is 1, bit 7
DB1.DBW12.20stringIn a data block of 1, the starting data word is 12, string length is 20
DB1.DBW12.20DwstringIn a data block of 1, the starting data word is 12, string length is 20, double-byte character
DB1.DBW100.20ARRAY_CHARIn a data block of 1, the starting data word is 100, char array length is 20

ARRAY_CHAR displays and writes in the form of a string.

Use Case ​

This chapter also provides practical examples to facilitate a quick start.

Siemens S7-1200 PLC