BinaryTime

Initializes the data elements of the structure: T_BinaryTime.

Namespace: Tc3_Collections
Library: Tc3_Collections (Tc3_Collections.compiled-library)

FUNCTION BinaryTime : T_BinaryTime
VAR_INPUT
    timeOfDay : TOD;
    day       : WORD;
END_VAR

BinaryTime 1: Inputs

Name

Type

Description

timeOfDay

TOD

Number of milliseconds since midnight of the current day.

day

WORD

Number of days since January 1, 1984.

BinaryTime 2: Return value

Name

Type

Description

BinaryTime

T_BinaryTime

Structure with initialized data elements.

Example

METHOD FINAL Sample_BinaryTime : BOOL
VAR
    t: T_BinaryTime;
END_VAR
t:=BinaryTime(timeOfDay:=TOD#12:00:00.000, day:=DATE_To_BinaryTime6Day(in:=D#2023-01-01));
Sample_BinaryTime:=(t.timeOfDay = TOD#12:00:00.000) AND (t.day = 14245);