Extended Instructions; Date And Time-Of-Day; Date And Time Instructions - Siemens SIMATIC S7 System Manual

Hide thumbs Also See for SIMATIC S7:
Table of Contents

Advertisement

Extended instructions

8.1

Date and time-of-day

8.1.1

Date and time instructions

Use the date and time instructions to program calendar and time calculations.
● T_CONV converts the data type of a time value: (Time to DInt) or (DInt to Time)
● T_ADD adds Time and DTL values: (Time + Time = Time) or (DTL + Time = DTL)
● T_SUB subtracts Time and DTL values: (Time - Time = Time) or (DTL - Time = DTL)
● T_DIFF provides the difference between two DTL values as a Time value: DTL - DTL =
● T_COMBINE combines a Date value and a Time_and_Date value to create a DTL value
For information about the structure of the DTL and Time data, refer to the section on the
Time and Date data types (Page 89).
Table 8- 1
T_CONV (Time Convert) instruction
LAD / FBD
SCL
out := T_CONV(
in:=_variant_in);
For LAD and FBD: Click the "???" and select the data types from the drop-down menu.
1
Table 8- 2
Data types for the T_CONV parameters
Parameter and type
IN
IN
OUT
OUT
S7-1200 Programmable controller
System Manual, 11/2011, A5E02486680-05
Time
Data type
DInt, Time
DInt, Time
Description
T_CONV converts a Time data type to a DInt data type, or the reverse
conversion from DInt data type to Time data type.
Description
Input Time value or DInt value
Converted DInt value or Time value
8
233

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-1200

Table of Contents