Basics
43
resolution amounts to 10 ms.
Default for 16 and 32 values = T#0 (corresponds to 0 seconds)
NOTE
Duration data must be delimited on the left by the prefix T# or TIME#.
The units of duration literals can be separated by the character "_".
Time units, e.g., seconds, milliseconds, etc., can be represented in upper- or lower- case letters.
"Overflow" of the most significant unit of a duration literal is permitted, e.g., the notation T#25h_15m
is permitted.
Description Examples
Duration literals without underlines:
short prefix
T#14ms T#-14ms T#14.7s T#14.7m
T#14.7h T#14.7d t#25h15m
t#5d14h12m18s3.5ms
long prefix
TIME#14s TIME#-14s time#14.7s
Duration literals with underlines:
short prefix
T#25h_15m
T#5d_14h_12m_18s_3.5ms
long prefix
TIME#25h_15m
time#5d_14h_12m_18s_3.5ms
1.4.1.10 DATE_AND_TIME
Variable values of the data type DATE_AND_TIME are date and time literals. The range of values for
DATE_AND_TIME values is from DT#2001-01-01-00:00:00– DT#2099-12-31-23:59:59.
Description Examples
Short prefix DT#2010-06-07-15:36:55
dt#2010-06-07-15:36:55
Long prefix DATE_AND_TIME#2010-06-07-15:36:55
date_and_time#2010-06-07-15:36:55
Internal
representation
Seconds after DT#2001-01-01-00:00:00
Advantages:
Can be used to set (SET_RTC_DT (see page 294)) or read (GET_RTC_DT (see page 289)) the
PLC's real-tim
e clock, for example
Facilitates all kinds of calculations for date and time
Well suited for solar tracking applications
- Sun's position, sunrise, sunset
- Conversions between universal time and local time
Building automation
Holidays (e.g. Easter holidays), daylight saving time
Enables better integration and adaptation of POUs created with other manufacturers' IEC 61131-3
programming software, e.g. OSCAT (Open Source Community for Automation Technology)