TIME_OF_DAY

Time of day value.

Size

32 bits (millisecond resolution)

Default

TOD#00:00:00

IEC 61131-3

Section 2.3.1

Support

Supported

A time of day is stored as a count of milliseconds since midnight. The seconds of a literal may have a fraction: TOD#10:00:00.250 is 250 milliseconds past ten. A fraction finer than a millisecond is truncated, so TOD#10:00:00.0009 is TOD#10:00:00.

Literals

TOD#14:30:00
TIME_OF_DAY#08:00:00
TOD#23:59:59.999

Example

shift_start := TOD#08:00:00;
now := TOD#09:30:00;
started := now > shift_start;  (* started = TRUE *)

See Also