Skip to main content

General

Connect Siemens S7

Reference guide for Siemens S7 communication (S7-300, 400, 1200, 1500).

The Siemens S7 driver uses the native S7Comm protocol, allowing direct connection to controllers without requiring an intermediate OPC server.

Supported Models & Protocol Types

Select the correct ProtocolType matching your hardware generation:

Protocol TypeHardwareNotes
SiemensS7_300S7-300Classic automation
SiemensS7_400S7-400Process automation
SiemensS7_1200S7-1200Requires PUT/GET access enabled
SiemensS7_1500S7-1500Requires PUT/GET access enabled
SiemensS7_200S7-200Legacy micro PLC
SiemensS7_200_SmartS7-200 SmartCompact controller
warning
PUT/GET Access

For S7-1200 and S7-1500, you must enable PUT/GET communication in TIA Portal:

  1. Open device properties → Protection & Security
  2. Enable "Permit access with PUT/GET communication"

Connection Parameters

Basic Settings

ParameterTypeRequiredDefaultDescription
HoststringYes-PLC IP Address
PortintNo102Standard S7 Port
PollingIntervalintNo1000Read cycle interval in milliseconds
ConnectTimeoutintNo3000Connection timeout (ms)
ReceiveTimeoutintNo3000Read timeout (ms)

S7-Specific Settings

ParameterTypeDefaultDescription
Rackbyte0Rack number
Slotbyte2Slot number (1 for S7-1200/1500)
ConnectionTypebyte11=PG, 2=OP, 3=S7Basic
LocalTSAPint-Local Transport Service Access Point
DestTSAPint-Destination TSAP
PDULengthint240Protocol Data Unit size

Rack & Slot Settings

PLC TypeRackSlot
S7-300/40002
S7-1200/150001

Address Syntax

Proxus supports the standard Siemens S7 addressing format. Addresses are case-insensitive.

Memory Areas

AreaPrefixDescriptionExample
Data BlockDBUser data blocksDB1.0, DB100.50
InputIDigital/Analog inputsI0.0, IB10, IW20
OutputQDigital/Analog outputsQ0.0, QB10, QW20
Memory (Merker)MInternal memory flagsM0.0, MB100, MW50
TimerTS7 timersT1, T50
CounterCS7 countersC1, C100
Analog InputAIAnalog inputs (PIW)AI0, AIW10
Analog OutputAQAnalog outputs (PQW)AQ0, AQW10

Data Block Addressing

The most common addressing format for Data Blocks:

DB{number}.{byte offset}[.{bit}]

Examples

AddressDescription
DB1.0DB1, Byte 0 (first byte)
DB1.10DB1, Byte 10
DB1.10.0DB1, Byte 10, Bit 0 (Bool)
DB1.10.7DB1, Byte 10, Bit 7 (Bool)
DB100.50DB100, Byte 50

Extended Notation (Optional)

Proxus also supports explicit data type prefixes:

PrefixSizeDescription
DBX1 bitBit access
DBB1 byteByte access
DBW2 bytesWord access
DBD4 bytesDouble Word access
DB1.DBX10.0 → Bit 0 of Byte 10
DB1.DBB10 → Byte 10
DB1.DBW10 → Word at Byte 10
DB1.DBD10 → DWord at Byte 10

Input/Output/Memory Addressing

For I, Q, M areas:

AddressDescription
I0.0Input Byte 0, Bit 0
I0.7Input Byte 0, Bit 7
IB0Input Byte 0
IW0Input Word at Byte 0
ID0Input DWord at Byte 0
Q1.0Output Byte 1, Bit 0
M100Memory Byte 100
MW50Memory Word at Byte 50
MD100Memory DWord at Byte 100

V Memory (S7-200 Only)

For S7-200 series, V memory is mapped to DB1:

AddressDescription
V0V memory Byte 0 (maps to DB1.0)
VB10V memory Byte 10
VW100V memory Word at Byte 100
VD200V memory DWord at Byte 200

Data Types

Proxus TypeS7 EquivalentSizeNotes
BoolBool1 bitRequires bit address (e.g., DB1.10.0)
ShortInt2 bytesSigned 16-bit
UShortWord2 bytesUnsigned 16-bit
IntDInt4 bytesSigned 32-bit
UIntDWord4 bytesUnsigned 32-bit
FloatReal4 bytesIEEE 754 single precision
DoubleLReal8 bytesIEEE 754 double precision
LongLInt8 bytesSigned 64-bit
ULongULInt8 bytesUnsigned 64-bit
StringStringVariableS7 String format
BytesArray of ByteVariableRaw byte array

Performance Features

PDU Optimization

The driver automatically handles PDU splitting. You can request large data blocks, and the driver will split requests into multiple packets based on the negotiated PDU size.

Batch Reading

For optimal performance, Proxus groups registers by address range and reads entire blocks in a single request:

  • Registers in the same DB with adjacent addresses are read together
  • Reduces network round-trips significantly
  • Automatically handles S7 padding bytes in complex structures

Full DB Read Mode

When reading multiple tags from the same Data Block, Proxus can read the entire DB range in one request and parse individual values locally. This dramatically reduces communication overhead.


Industry Use Cases

The Siemens S7 driver is a cornerstone of Proxus Manufacturing Solutions. It is commonly used for:

  • OEE Tracking: Real-time production counts and downtime reasons from S7-1500 controllers.
  • Traceability: Collection of process parameters (temperatures, pressures) for quality assurance.
  • Recipe Management: Synchronizing product configurations across multiple machine lines.

Troubleshooting

ErrorCauseSolution
Connection refusedPUT/GET not enabledEnable in TIA Portal
TimeoutWrong IP/Port/Rack/SlotVerify connection parameters
Address not foundInvalid DB addressCheck DB exists and is not optimized
Access deniedDB access protectionRemove access protection in TIA Portal
lightbulb
Need More Help?

For address syntax help, see S7 Address Syntax. For common S7 errors, see S7 Error Codes.

Official Resources