101BExtended instructions
8.1 Date and time-of-day
S7-1200 Programmable controller
System Manual, 11/2011, A5E02486680-05
239
Table 8- 16 Data types for the parameters
Parameter and type
Data type
Description
REQ
IN
Bool
REQ=1: execute function
Timezone
IN
TimeTransformationRule
Rules for the transformation from system time to
local time
DONE
OUT
Bool
Function complete
BUSY
OUT
Bool
Function busy
ERROR
OUT
Bool
Error detected
STATUS
OUT
Word
Function result / error message
1
The REQ input is not used for SCL.
To manually configure the time zone parameters for the CPU, use the "Time of day"
properties of the "General" tab of the device configuration.
Use the SET_TIMEZONE instruction to set the local time configuration programmatically.
The parameters of the "TimeTransformationRule" structure specify the local time zone and
timing for automatic switching between standard time and daylight saving time.
Table 8- 17 "TimeTransformationRule" structure
Parameter
Data type
Description
Bias
Int
Time difference between UTC and local time [min]
DaylightBias
Int
Time difference between winter and summer time [min]
DaylightStartMonth
USInt
Month of daylight saving time
DaylightStartWeek
USInt
Week of daylight saving time:
1 = First occurrence of the weekday in the month
...
5 = Last occurrence of the weekday of the month
DaylightStartWeekday
USInt
Weekday of daylight saving time:
1 = Sunday
...
7 = Saturday
DaylightStartHour
USInt
Hour of daylight saving time
StandardStartMonth
USInt
Month of switching to winter time
StandardStartWeek
USInt
Week of the changeover to winter time:
1 = First occurrence of the weekday in the month
...
5 = last occurrence of the weekday of the month
StandardStartWeekday
USInt
Weekday of winter time:
1 = Sunday
...
7 = Saturday