L-force | plc designer – Lenze PLC Designer PLC Designer (R2-x) User Manual

Page 520

Advertising
background image

L-force | PLC Designer

Data types in PLC Designer

518

DMS 3.2 EN 02/2011 TD29



TIME constants:

always made up of an initial "t" or "T" (or "time" or "TIME" spelled out) and a number
sign "#".

This is followed by the actual time declaration which can include days (identified by
"d"), hours (identified by "h"), minutes (identified by "m"), seconds (identified by "s")
and milliseconds (identified by "ms"). Please note that the time entries must be given

in this order according to length (d before h before m before s before m before ms) but
you are not required to include all time increments.

Maximum value: 49d17h2m47s295ms (4194967295 ms)

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*)

DATE Constants:

A date constant begins with a "d", "D", "DATE" or "date" followed by "#". You can then
enter any date with format Year-Month-Day. Possible values: 1970-00-00 to 2106-02-
06.

Examples:

DATE#1996-05-06

d#1972-03-29

TIME_OF_DAY Constants, for storing times of the day:

begin with "tod#", "TOD#", "TIME_OF_DAY#" or "time_of_day#" followed by a time
with the format: Hour:Minute:Second. Seconds can be entered as real numbers or you
can enter fractions of a second. Possible values: 00:00:00 bis 23:59:59.999.

Advertising