Siemens SIMATIC S7 System Manual page 134

Hide thumbs Also See for SIMATIC S7:
Table of Contents

Advertisement

Programming instructions
6.2 Extended instructions
Parameter
IN1
IN2
OUT
Select the IN1 data type from the drop-down list available below the instruction name. The IN1 data
Parameter
IN1
IN2
OUT
Condition codes: ENO = 1 means no error occurred. ENO = 0 and parameter OUT = 0
errors:
● Invalid DTL value
● Invalid Time value
Clock instructions
You use the clock instructions to set and read the PLC system clock. The data type DTL is
used to provide date and time values.
DTL structure
Year: UInt
Month: USInt
Day: USInt
Weekday: USInt
Hour: USInt
Minute: USInt
Second: USInt
Nanoseconds: UDInt
134
Parameter
type
IN
IN
OUT
type selection also sets the data type of parameter OUT.
T_DIFF (Time Difference) subtracts the IN2 DTL value from IN1 DTL value.
Parameter OUT provides the difference value as a Time data type.
 DTL - DTL = Time
Parameter
type
IN
IN
OUT
WR_SYS_T (Write System Time) sets the PLC 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.
Data type
Description
DTL, Time
DTL or Time value
Time
Time value to subtract
DTL, Time
DTL or Time difference
Data type
Description
DTL
DTL value
DTL
DTL value to subtract
Time
Time difference
Size
16 bits
8 bits
8 bits
8 bits
8 bits
8 bits
8 bits
32 bits
Valid ranges
1970 to 2554
1 to 12
1 to 31
1=Sunday to 7=Saturday
0 to 23
0 to 59
0 to 59
0 to 999,999,999
S7-1200 Programmable controller
System Manual, 11/2009, A5E02486680-02

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-1200

Table of Contents