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

Advertisement

Use the clock instructions to set and read the CPU system clock. The data type DTL
(Page 113) is used to provide date and time values.
Table 8- 9
System time instructions
LAD / FBD
Table 8- 10
Data types for the parameters
Parameter and type
IN
IN
OUT
OUT
LOCTIME
IN
DST
IN
RET_VAL
OUT
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
SCL
ret_val :=
WR_SYS_T(
in:=_DTL_in_);
ret_val :=
RD_SYS_T(
out=>_DTL_out);
ret_val :=
RD_LOC_T(
out=>_DTL_out);
ret_val :=
WR_LOC_T(
LOCTIME:=DTL_in_,
DST:_in_;
Data type
DTL
DTL
DTL
BOOL
Int
8.1 Date, time-of-day, and clock functions
Description
WR_SYS_T (Set time-of-day) sets the CPU time of day clock
with a DTL value at parameter IN. This time value does not
include local time zone or daylight saving time offsets.
RD_SYS_T (Read time-of-day) reads the current system time
from the CPU. This time value does not include local time zone
or daylight saving time offsets.
RD_LOC_T (Read local time) provides the current local time of
the CPU as a DTL data type. This time value reflects the local
time zone adjusted appropriately for daylight saving time (if
configured).
WR_LOC_T (Write local time) sets the date and time of the CPU
clock. You assign the date and time information as local time at
LOCTIME with DTL data type. The instruction uses the
"TimeTransformationRule (Page 289)" DB structure to calculate
the system time. The granularity of the time information for local
time and system time is product-specific and is at least one
millisecond. Input values at the LOCTIME parameter which are
less than those supported by the CPU are rounded up during
system time calculation.
Note: You must use the CPU device configuration to set the
"Time of day" properties (time zone, DST activation, DST start,
and DST stop). Otherwise, WR_LOC_T cannot interpret the DST
time change.
Description
Time of day to set in the CPU system clock
RD_SYS_T: Current CPU system time
RD_LOC_T: Current local time, including any adjustment for
daylight saving time, if configured
WR_LOC_T: Local time
WR_LOC_T: Daylight Saving Time only evaluated during the
"double hour" when the clocks change to daylight saving time.
TRUE = daylight saving time (first hour)
FALSE = standard time (second hour)
Execution condition code
Extended instructions
287

Advertisement

Table of Contents
loading

Table of Contents

Save PDF