Extended instructions
9.1 Date, time-of-day, and clock functions
S7-1200 Programmable controller
System Manual, V4.2, 09/2016, A5E02486680-AK
337
Table 9- 5 T_DIFF (Time difference) instruction
in1:=_DTL_in,
in2:=_DTL_in);
T_DIFF subtracts the DTL value (IN2) from the DTL value (IN1). Pa-
rameter OUT provides the difference value as a Time data type.
• DTL - DTL = Time
Table 9- 6 Data types for the T_DIFF parameters
ENO = 1 means no error occurred. ENO = 0 and parameter OUT = 0
errors:
● Invalid DTL value
● Invalid Time value
Table 9- 7 T_COMBINE (Combine times) instruction
CONCAT_DATE_TOD(
In1 := _date_in,
In2 := _tod_in);
T_COMBINE combines a Date value and a Time_of_Day
value to create a DTL value.
Note that the T_COMBINE instruction in the Extended Instructions equates to the CONCAT_DATE_TOD function in
Table 9- 8 Data types for the T_COMBINE parameters
IN1 IN Date Date value to be combined must be between DATE#1990-
01-01 and DATE#2089-12-31
Time_of_Day values to be combined