Date constants, L-force | plc designer – Lenze PLC Designer PLC Designer (R3-1) User Manual

Page 1095

Advertising
background image

L-force | PLC Designer

Programming Reference

DMS 4.1 EN 03/2011 TD29

1093

Examples of correct TIME constants in a ST assignment:

TIME1 := T#14ms;

TIME1 := T#100S12ms;

(*The highest component may be allowed to exceed its limit*)

TIME1 := t#12h34m15s;

the following would be incorrect:

TIME1 := t#5m68s;

(* limit exceeded in a lower component *)

TIME1 := 15ms;

(* T# is missing *)

TIME1 := t#4ms13d;

(* Incorrect order of entries *)

Syntax for LTIME constant:
LTIME#<time declaration>
The time declaration can include the time units as used with the TIME constant (see
above) and additionally:
"us" : microseconds
"ns" : nanoseconds
Example:
Examples of correct LTIME constants in a ST assignment:

LTIME1 := LTIME#1000d15h23m12s34ms2us44ns

LTIME1 := LTIME#3445343m3424732874823ns


see also: Time Data Types

DATE Constants
These constants can be used to enter dates.
Syntax:
dt#<date declaration>
Instead of "d#" also the following can be used: "D#", "date", "DATE".
The date declaration is to be entered in format "<

year-month-day

>".

DATE values are internally handled as DWORD values, containing the time span in
seconds since 01.01.1970, 00:00 clock.


Examples:

DATE#1996-05-06
d#1972-03-29

see also: Time Data Types

Advertising