Skip to main content

S7

S7 is a polling based protocol over tcp. This is not ideal for high resolution logging, as it takes a certain time to complete a read request. These are the datatypes we support:

TypeExample mappingConverts to type (.net)
Word (Db 1, offset 1)DB1,DBW1UInt16
DWordDB1,DBD1UInt32
LWordDB1,DBL1UInt64
Bit (Offset 0 bit 0)DB1,X0.0Bool
IntDB1,I1Int16
DintDB1, DI1Int32
LINTDB1,DBLI1Int64
RealDB1,REAL1Single
LrealDB1,LREAL1Double
BYTEDB1,BYTE1Byte
SBYTEDB1,SBYTE1SByte
String (Offset 1 length 10)DB1,STRING1.10String
Inputs, for example bit (no comma needed!)IX0.2
Output, for example bit (no comma needed!)QX0.2

To set up an s7 connection, you need a CPU type, Rack and Slot number.

CPU typeDefault RackDefault Slot
S7-30002
S7-40002 or 3
S7-120001
S7-150001

PLC requirements

In order to be able to communicate with your target, "Permit access with PUT/GET communication from remote partner" should be checked: (S7-1200 & S7-1500 => due to the built-in firewall)   In order to be able to log data from datablocks, optimized block access should be disabled: