101BExtended instructions
8.1 Date and time-of-day
S7-1200 Programmable controller
236
System Manual, 11/2011, A5E02486680-05
Table 8- 10 Data types for the parameters
Parameter and type
Data type
Description
IN
IN
DTL
Time of day to set in the CPU system clock
RET_VAL
OUT
Int
Execution condition code
OUT
OUT
DTL
RD_SYS_T: Current CPU system time
RD_LOC_T: Current local time. including any adjustment for
daylight saving time, if configured
●
The local time is calculated by using the time zone and daylight saving time offsets that
you set in the device configuration general tab "Time of day" parameters.
●
Time zone configuration is an offset to UTC or GMT time.
●
Daylight saving time configuration specifies the month, week, day, and hour when
daylight saving time begins.
●
Standard time configuration also specifies the month, week, day, and hour when standard
time begins.
●
The time zone offset is always applied to the system time value. The daylight saving time
offset is only applied when daylight saving time is in effect.
Note
Daylight saving and standard start time configuration
The "Time of day" properties for "Start for daylight saving time" of the CPU device
configuration must be your local time.
Condition codes: ENO = 1 means no error occurred. ENO = 0 means an execution error
occurred, and a condition code is provided at the RET_VAL output.
Table 8- 11 Condition codes
RET_VAL (W#16#....)
Description
0000
The current local time is in standard time.
0001
Daylight saving time has been configured, and the current local time is in daylight saving
time.
8080
Local time not available
8081
Illegal year value
8082
Illegal month value
8083
Illegal day value
8084
Illegal hour value
8085
Illegal minute value
8086
Illegal second value
8087
Illegal nanosecond value
80B0
The real-time clock has failed.