The Xentara Siemens S7 Driver v1.1.2
User Manual
S7 Address Strings

Address Format

An S7 address string is a string formatted with certain rules to address a specific location in a certain offset of a particular memory area of an S7 compatible PLC. The address, is formatted as follows:

Data Block Number Memory Area Marker Type Indicator Byte Offset Bit Offset
optional required optional required only for booleans
Address Fields
Data Block NumberDefines the number of the data block the variable is located in. The field must start with “DB”, followed by a number in range [1-65535] as the data block number, followed by a “.”. For example “DB54.”.
Note
The data block number field is supported to keep consistency with S7 addresses. It can be omitted but if used, it must define the same data block number as the data block number configured for the data item’s parent data block
Memory Area MarkerDefines the memory area that the variable is located in. This field must be one of the memory area markers.
Type IndicatorDefines the type of the variable. This field must be one of the Type Indicators.
Note
The type indicator field is supported to keep consistency with S7 addresses. In Xentara S7 driver data items, the type is configured explicitly.
Byte OffsetDefines the offset of the variable’s memory location in the given memory area. This field must be a number in the range [0-65535].
Bit OffsetDefines the bit number of a boolean variable’s bit in the given byte determined by the byte offset. This field must consist of a “.” followed by a number in the range [0-7].

Address Examples

Address Description
"DB1.DBX25.6" A bit sized variable located in the 6th bit of the 25th byte of data block number 1
"MW14" A word sized variable starting from the 14th byte of the memory area “M”
"Q0" A variable starting from the first byte of the memory area “Q”.
"I0.1" A boolean variable located the 2nd bit of the 1st byte of the memory area “I”

Memory Area Markers

One of the following memory area markers can be used in the address:

Marker Description
C S7 counters
T S7 timers
I Inputs
Q Outputs
P Direct peripheral access
M Flags (German “Merker”)
L Local data
DB Data blocks
DI Instance data blocks
IecT IEC timers (200 family of PLCs)
IecC IEC counters (200 family of PLCs)

Type Indicators

One of the following type indicators can be used in the address:

Indicator Description
X Bit
B Byte
W Word
D Double