Skip to main content

Siemens S7-300/400

Device Production Ethernet

Siemens S7 ISO-TCP via the Site Runtime s7comm-for-300 (S7-300/400).

PropertyValue
Console protocol idsiemens-s7-legacy
Site Runtime plugins7comm-for-300
TransportEthernet (TCP/UDP)
Readyes
Writeyes — through approved writes
Subscribe—
Device familiesS7-300, S7-400
Default group interval1000 ms
MaturityProduction: complete driver (connection handling, address forms, batching, read and write)

Create the device​

  1. Open Connectivity → Devices and click Add device.
  2. Pick Siemens S7-300/400 in the protocol list.
  3. Choose the Site Runtime that can reach the device, fill the connection parameters below and click Create & connect.
  4. Add a group (poll interval) and tags with the address formats below. See Devices and Groups and tags for the full walk-through.

Connection parameters​

Every field the Console shows for this protocol. Required fields must be set before the device can be saved.

ParameterTypeDefaultRange / optionsRequiredDescription
Target PLC IP Address
host
string—max 30 charsyes
Target PLC Port
port
int1021 – 65535yes
PDU Size
pdu_size
int960100 – 960yes
Connection Type
connection_type
mapPGPG, OP, PCyes
CPU Rack
rack
int00 – 15yes
CPU Slot
slot
int20 – 15yes
Interval
interval
int30030 – 60000yesinterval
t1
t1
int10000100 – 20000yest1
t2
t2
int101 – 200yest2
t3
t3
int11 – 200yest3

Tag addresses and data types​

Supported data types: INT8, UINT8, INT16, UINT16, INT32, UINT32, INT64, UINT64, FLOAT, DOUBLE, BIT, STRING, ARRAY_CHAR, ARRAY_INT8, ARRAY_UINT8, ARRAY_INT16, ARRAY_UINT16, ARRAY_INT32, ARRAY_UINT32, ARRAY_INT64, ARRAY_UINT64, ARRAY_FLOAT, ARRAY_DOUBLE. The Console validates each tag address against the pattern for its data type before it is saved:

Data typesAddress pattern (regular expression)
INT8 UINT8(^DB[0-9]+.DB(W|B)[0-9]+|^(I|O|F|Q|M)(|W)[0-9]+)$
INT16 UINT16 INT64 UINT64 DOUBLE(^(I|O|F|Q|M|T|C)(|W)[0-9]+|^DB[0-9]+.DBW[0-9]+)(#B|#L|)$
INT32 UINT32 FLOAT(^(I|O|F|Q|M|T|C)(|W)[0-9]+|^DB[0-9]+.DB(W|D)[0-9]+)(#BB|#BL|#LL|#LB|)$
BIT(^(I|O|F|Q|M|T|C)(|X|W)[0-9]+|^DB[0-9]+.DB(W|X)[0-9]+)\.([0-9]|1[0-5])$
STRING ARRAY_CHAR ARRAY_INT8 ARRAY_UINT8 ARRAY_INT16 ARRAY_UINT16 ARRAY_INT32 ARRAY_UINT32 ARRAY_INT64 ARRAY_UINT64 ARRAY_FLOAT ARRAY_DOUBLE(^(I|O|F|Q|M|T|C)(|W)[0-9]+|^DB[0-9]+.DBW[0-9]+)\.[0-9]+

Addressing and notes​

Address syntax and examples​

The address syntax is the same as for S7-200/1200/1500: an area and a byte offset.

FormMeaningTypes
DB1.DBX0.0Bit 0 of byte 0 of DB1BOOL, BIT
DB1.DBB0Byte 0 of DB1INT8, UINT8
DB1.DBW0Word at byte 0INT16, UINT16, WORD
DB1.DBD4Double word at byte 4INT32, UINT32, FLOAT, DWORD
DB1.DBW0.1010 bytes (even, at most 128)STRING
IW0, QW0, MW0Input, output and marker wordsINT16, UINT16
M10.3, I0.0, Q0.1Marker, input and output bitsBOOL, BIT
T0, C0Timer (32 bit), counter (16 bit)INT32/UINT32, INT16/UINT16

Examples: DB1.DBW0, DB1.DBD4 (FLOAT), MW20, DB10.DBX2.5, M10.3, IW0.

Endianness​

Big endian on the wire. A suffix changes one tag: #L swaps the bytes of a 16-bit tag or the words of a 32-bit tag, #BL gives BADC, #LL gives DCBA, #LB gives CDAB, #B and #BB leave the order unchanged.

Typical settings​

SettingTypical
Target PLC IP AddressIP of the CPU or of its Ethernet CP
Target PLC Port102
CPU Rack, CPU Slot0 and 2 for an S7-300. For an S7-400 use the slot of the CPU in the rack.
Connection TypePG (default), OP or PC
PDU Size960 (100 to 960). A CPU may negotiate a smaller PDU.
Interval300 ms (30 to 60000)
t1, t2, t310000, 10, 1

The default poll group interval is 1000 ms. S7-300 CPUs have few connection resources, so use one device for each CPU and few groups.

Common errors​

SymptomCauseFix
Cannot connectWrong rack or slot.S7-300 is rack 0, slot 2. For an S7-400 check the hardware configuration.
Connects and dropsNo free connection resource on the CPU or CP.Close other clients (HMI, programming device).
All tags badThe DB does not exist or is too short.Check the DB number and size in STEP 7.
Value is garbageWrong type or a word number used as offset.Use the byte offset.
Bit address refusedBit above 7.Use 0 to 7.
Timeouts on large groupsPDU too small, too many tags.Split the group.