Syntax
<long time keyword> # <length of high resolution time> <long time keyword> : LTIME | ltime <length of high resolution time> : <length of time> ( <number of microseconds>us )? ( <number of nanoseconds>ns )? // ( ...)? Optional
You can use the same units for LTIME
constants as for TIME
constants. You can also specify microseconds and nanoseconds because the specified
time is calculated in higher time resolution. LTIME
literals are treated internally as data type LWORD
and therefore the value resolved in nanoseconds.
Additional time units
-
US | us
: Microseconds -
NS | ns
: Nanoseconds
Examples of correct usage of an ST assignment
PROGRAM PLC_PRG VAR ltimLength := LTIME#1000d15h23m12s34ms2us44ns; ltimLength1 := LTIME#3445343m3424732874823ns; END_VAR
For more information, see: ⮫ “Time Data Types ” and ⮫ “Constant: Date and Time ”