EasyManua.ls Logo

Siemens SIMATIC S7-1200 - Page 337

Siemens SIMATIC S7-1200
1614 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
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
LAD / FBD
SCL
Description
out := T_DIFF(
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
Parameter and type
Data type
Description
IN1
IN
DTL
DTL value
IN2
IN
DTL
DTL value to subtract
OUT
OUT
Time
Time difference
Condition codes:
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
LAD / FBD
SCL
Description
out :=
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.
1
Note that the T_COMBINE instruction in the Extended Instructions equates to the CONCAT_DATE_TOD function in
SCL.
Table 9- 8 Data types for the T_COMBINE parameters
Parameter and type
Data type
Description
IN1 IN Date Date value to be combined must be between DATE#1990-
01-01 and DATE#2089-12-31
IN2
IN
Time_of_Day
Time_of_Day values to be combined
OUT
OUT
DTL
DTL value

Table of Contents

Other manuals for Siemens SIMATIC S7-1200

Related product manuals