Use the TIME_OF_DAY
keyword (TOD
) to specify a time.
Syntax
<time keyword>#<time value> <time keyword> : TIME_OF_DAY | time_of_day | TOD | tod <time value> : <hour>:<minute>:<second> <hour> : 0-23 <minute> : 0-59 <second> : 0.000-59.999
You can also specify fractions of a second. TIME_OF_DAY
literals are treated internally as DWORD
and the value is resolved in milliseconds.
Examples
PROGRAM POU VAR todClockTime : TIME_OF_DAY := TIME_OF_DAY#15:36:30.123; todEarliest : TIME_OF_DAY := TIME_OF_DAY#0:0:0.000; todLatest : TOD := TOD#23:59:59.999; END_VAR