4 Hardware-Independent Programming
4.1 Data types of S7-300/400 and S7-1200/1500
4
Hardware-Independent Programming
To make sure that a block can be used on all controllers without any further
adjustments, it is important not use hardware-dependent functions and properties.
4.1
Data types of S7-300/400 and S7-1200/1500
Below is a list of all elementary data types and data groups.
Recommendation
Only use the data types that are supported by the controllers on which the
program is to run.
Table 4-1: Elementary data types correspond to standard EN 61131-3
Bit data types
Character type
Numerical data
types
Time types
Table 4-2: Data groups that are made up of other data types
Time types
Programming Guideline for S7-1200/1500
V1.2, Entry ID: 81318674
Description
BOOL
BYTE
WORD
DWORD
LWORD
CHAR (8 bit)
INT (16 bit)
DINT (32 bit)
REAL (32 bit)
SINT (8 bit)
USINT (8 bit)
UINT (16 bit)
UDINT (32 bit)
LREAL (64 bit)
LINT (64 bit)
ULINT (64 bit)
TIME
DATE
TIME_OF_DAY
S5TIME
LTIME
L_TIME_OF_DAY
Description
DT
(DATE_AND_TIME)
DTL
S7 -
S7-1200
300/400
S7 -
S7-1200
300/400
S7-1500
S7-1500
69