S7 Variables

Add variables to the S7 data source

Assign a name for the variable under “Name” and select the “Data type“.

By selecting the data type, the creation mask and the specific area are automatically adjusted.

Once all the entries have been made, click on “Add” to create the variable.

The window remains open so that you can create further variables. Once this has been done,“Close” the window.

The variable for the S7 data source has been successfully created and can now be used.


S7 address syntax for quick entry

S7 variables can also be added with a quick entry.

A variable with a single field entry can be created here using the correct syntax.


In general, the following syntax applies to S7 addresses:

  • [Area][Data Type][Start Address]

For variables from the data block and instance data block areas, the number of the data block must be separated from the data type by a dot (.):

  • [DB/DI][Number].[DataType][StartAddress]

However, if it is a string or Boolean variable, the length of the string or the position of the bit must be specified at the end:

  • [Area][DataType][StartAddress].[BitPositionOrLength]

Areas:

AbbreviationAbbreviation – alternativeDescription
DBData module
DIInstance module
MFMarker
TTimer
ZCCounter
EIEntrance
AOOutput
PE/PAPI/POPeripheral input / output

Data types:

AbbreviationDescription
XBoolen
IInt
DDInt
BByte
WWord
DWDWord
RFloat
SString
BCDBBCD8
BCDWBCD16
BCDDWBCD32
BCDLWBCD64
DTDateTime
S5TS5Time
GS7String
TTime
TODTimeOfDay
DDate