TIME/LTIME
The time data type TIME is handled internally like a UDINT (32-bit). This leads to a resolution in milliseconds.
The time data type LTIME is internally handled like a ULINT (64-bit). You can use this data type as a time base for high-resolution timers with a resolution in nanoseconds.
Data type | Lower limit | Upper limit | Storage space | Resolution |
---|---|---|---|---|
TIME | 0 | 4294967295 | 32-bit | Milliseconds |
LTIME | 0 | 213503d23h34m33s709ms551us615ns | 64-bit | Nanoseconds |
The time declaration can contain the time units that are valid for TIME or LTIME constants.
Sample:
VAR
tTime : TIME := T#1d2h30m40s500ms
tLTime : LTIME := LTIME# 100d2h30m40s500ms600us700ns
END_VAR
See also: