
Drive PLC Developer Studio
IEC 61131-3 Operands
13-2
l
DDS EN 2.3
Examples of incorrect TIME constants:
TIME1 := t#5m68s; (*Overflow in lower-order component*)
TIME1 := 15ms; (*T# is missing*)
TIME1 := t#4ms13d; (*Wrong sequence of time units*)
Maximum size: DWORD 2
32
-1ms ≈ 49days
13.1.4 DATE constants
Usethistypetospecifyadate.
A DATE constant is declared by a leading d, D, DATE or date followed by a #.
Any year-month-day dates can then be entered.
Examples:
DATE#1996-05-06
d#1972-03-29
13.1.5 TIME_OF_DAY constants
Usethistypetosaveatimeofday.
A TIME_OF_DAY declaration starts with tod#, TOD#, TIME_OF_DAY# or time_of_day# followed
by any hour:minute:second time.
Seconds may be specified as real numbers; fractions of a second are also allowed.
Examples:
TIME_OF_DAY#15:36:30.123
tod#00:00:00
13.1.6 DATE_AND_TIME-Konstanten
Date constants and time of day may also be combined into so-called DATE_AND_TIME constants.
DATE_AND_TIME constants start with dt#, DT#, DATE_AND_TIME# or date_and_time#.
Dates are followed by a hyphen and the time of day.
Examples:
DATE_AND_TIME#1996-05-06-15:36:30
dt#1972-03-29-00:00:00
Comentários a estes Manuais