Set_Timezone (Set Timezone) Instruction - Siemens S7-1200 System Manual

Hide thumbs Also See for S7-1200:
Table of Contents

Advertisement

Extended instructions
8.1 Date, time-of-day, and clock functions
8.1.4

SET_TIMEZONE (Set timezone) instruction

Table 8- 11
SET_TIMEZONE instruction
LAD / FBD
In the SCL example, "SET_TIMEZONE_DB" is the name of the instance DB.
1
Table 8- 12
Data types for the parameters
Parameter and type
REQ
IN
Timezone
IN
DONE
OUT
BUSY
OUT
ERROR
OUT
STATUS
OUT
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 (Page 289)" structure assign the local time
zone and timing for automatic switching between standard time and daylight saving time.
Condition codes: ENO = 1 means no error occurred. ENO = 0 means an execution error
occurred, and a condition code is provided at the STATUS output.
STATUS
Description
(W#16#....)
0
No error
7000
No job processing active
7001
Start of job processing. Parameter BUSY = 1, DONE = 0
7002
Intermediate call (REQ irrelevant): Instruction already active; BUSY has the value "1".
808x
Error at x-th component: For example 8084 indicates that DaylightStartWeekif is not a value from 1to 5.
290
SCL
"SET_TIMEZONE_DB"(
REQ:=_bool_in,
Timezone:=_struct_in,
DONE=>_bool_out_,
BUSY=>_bool_out_,
ERROR=>_bool_out_,
STATUS=>_word_out_);
Data type
Bool
TimeTransformationRule
Bool
Bool
Bool
Word
Description
Sets the local time zone and daylight
saving parameters that are used to
transform the CPU system time to local
time.
Description
REQ=1: execute function
Rules for the transformation from system time to
local time
Function complete
Function busy
Error detected
Function result / error message
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG

Advertisement

Table of Contents
loading

Table of Contents