FB_BA_CnvtTiSt

Assembling a time structure

FB_BA_CnvtTiSt 1:

Functional description

The function block FB_BA_CnvtTiSt can be used to consolidate the different components of a time structure.

FB_BA_CnvtTiSt 2:

The function block does not check for incorrect inputs, e.g. a value of 99 for the hour, since it make sense for this verification to take place in the connected function blocks, which have to verify the time structure in any case. The limit values are shown as part of the variable explanations.

VAR_INPUT

wYear         : WORD;
wMonth        : WORD;
wDay          : WORD;
wHour         : WORD;
wMinute       : WORD;
wSecond       : WORD;
wMilliseconds : WORD;

nYear: year (1970...2106)

wMonth: month (1..12)

wDay: day of the month (1…31)

wHour: hour (0..23)

wMinute: minutes (0..59)

wSecond s: seconds (0..59)

wMillisecond: milliseconds (0..999)

VAR_OUTPUT

stTi      : TIMESTRUCT;

stTi: output: time structure

Requirements

Development environment

Target system

required library

required supplement

TwinCAT 2.11 R3/x64

PC/CX

TcBA library from V1.0.0

TS8040 | TwinCAT Building Automation from V1.0.0