Character And String Data Types - Siemens S7-1200 System Manual

Hide thumbs Also See for S7-1200:
Table of Contents
PLC concepts
4.4 Data types
DTL
DTL (Date and Time Long) data type uses a12 byte structure that saves information on date
and time. You can define DTL data in either the Temp memory of a block or in a DB. A value
for all components must be entered in the "Start value" column of the DB editor.
Table 4- 30
Size and range for DTL
Length
Format
(bytes)
12
Clock and calendar
Year-Month-Day:Hour:Minute:
Second.Nanoseconds
Each component of the DTL contains a different data type and range of values. The data
type of a specified value must match the data type of the corresponding components.
Table 4- 31
Elements of the DTL structure
Byte
Component
0
Year
1
2
Month
3
Day
4
Weekday
1
5
Hour
6
Minute
7
Second
8
Nanoseconds
9
10
11
The weekday is not considered in the value entry.
1
4.4.5

Character and String data types

Table 4- 32
Character and String data types
Data type
Size
Char
8 bits
String
n+ 2 bytes
114
Value range
Min.: DTL#1970-01-01-00:00:00.0
Max.: DTL#2554-12-31-23:59:59.999
999 999
Data type
UINT
USINT
USINT
USINT
USINT
USINT
USINT
UDINT
Range
ASCII character codes: 16#00 to 16#FF
n = (0 to 254 character bytes)
Value range
1970 to 2554
1 to 12
1 to 31
1(Sunday) to 7(Saturday)
0 to 23
0 to 59
0 to 59
0 to 999 999 999
Constant Entry Examples
'A', 't', '@'
'ABC'
System Manual, 03/2014, A5E02486680-AG
Example of value input
DTL#2008-12-16-20:30:20.250
1
S7-1200 Programmable controller
Table of Contents
loading

Table of Contents