4 date constants, 5 time_of_day constants, 6 date-and-time-konstanten – Lenze DDS v2.3 User Manual

Page 286: Date constants, Time_of_day constants, Date_and_time-konstanten, Drive plc developer studio

Advertising
background image

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

Use this type to specify a date.

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

Use this type to save a time of day.

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

Show/Hide Bookmarks

Advertising