DTMake

 Function Block - Builds the date and time stamps according to DT conventions.

The DT conventions are used in VSI functions to manage variable date and time stamps.

Inputs

Input

Data Type

Range

Unit

Default

Description

Year

DINT

1900 to 32767

Year

No default

Year specification.

Example: 2024.

Month

DINT

1 to 12

Month

No default

Month in interval.

Day

DINT

1 to 31

Day

No default

Day of the month in interval.

Hour

DINT

0 to 23

Hour

No default

Hour of the day.

Minute

DINT

0 to 59

Minute

No default

Minute of the day.

Second

DINT

0 to 60

Second

No default

Second of the day.

MSec

DINT

0 to 999

N/A

No default

Milliseconds of the day.

Outputs

Output

Data Type

Range

Unit

Description

Ddate

DINT

No range

N/A

DT-like date stamp or 0 (zero) if some inputs are invalid.

Dtime

DINT

No range

N/A

DT-like date stamp or 0 (zero) if some inputs are invalid.

Figure 1: DTMake

Remarks

None

FBD Language Example

Not available.

FFLD Language Example

IL Language Example

Not available.

ST Language Example

Inst_DTMake1(2024, 7, 10, 6, 37, 30, 525);
dDate := Inst_DTMake1.Ddate;
dTime := Inst_DTMake1.Dtime;