101BExtended instructions
8.1 Date and time-of-day
S7-1200 Programmable controller
238
System Manual, 11/2011, A5E02486680-05
Your program can also use RTM execution mode 7 to save the run-time meter values in a
memory card. The states of all timers at the instant RTM mode 7 is executed are stored in
the memory card. These stored values can become incorrect over time as the hour timers
are started and stopped during a program run session. You must periodically update the
memory card values to capture important run-time events. The advantage that you get from
storing the RTM values in the memory card is that you can insert the memory card in a
substitute CPU where your program and saved RTM values will be available. If you did not
save the RTM values in the memory card, then the timer values would be lost (in a substitute
CPU).
Note
Avoid excessive program calls for memory card write operations
Minimize flash memory card write operations to extend the life of the memory card.
Table 8- 14 Condition codes
RET_VAL (W#16#....)
Description
0
No error
8080
Incorrect run-time meter number
8081
A negative value was passed to the parameter PV
8082
Overflow of the operating hours counter
8091
The input parameter MODE contains an illegal value.
80B1
Value cannot be saved to MC (MODE=7)
8.1.4
SET_TIMEZONE instruction
Table 8- 15 SET_TIMEZONE instruction
LAD / FBD
SCL
Description
"SET_TIMEZONE_DB"(
Timezone:=_struct_in,
DONE=>_bool_out_,
BUSY=>_bool_out_,
ERROR=>_bool_out_,
STATUS=>_word_out_);
Sets the local time zone and daylight
saving parameters that are used to
transform the CPU system time to local
time.
2
In the SCL example, "SET_TIMEZONE_DB" is the name of the instance DB.