FB_BA_CnvtTiSt

FB_BA_CnvtTiSt 1:

The function block FB_BA_CnvtTiSt can be used to combine the individual components of a time structure into a single structure.

FB_BA_CnvtTiSt 2:

The function block does not check for incorrect entries, such as an hour entry of 99. It makes sense to check this in the connected function blocks, which have to check the time structure in any case. The limit values are shown as part of the variable explanations.

FB_BA_CnvtTiSt 3: Inputs

VAR_INPUT
  nYear         : WORD;
  nMonth        : WORD;
  nDay          : WORD;
  nHour         : WORD;
  nMinute       : WORD;
  nSecond       : WORD;
  nMilliseconds : WORD;
END_VAR

Name

Type

Description

nYear

WORD

The year (1970...2106).

nMonth

WORD

The month (1...12).

nDay

WORD

The day of the month (1...31).

nHour

WORD

The hour (0...23).

nMinute

WORD

The minute (0...59).

nSecond

WORD

The second (0...59).

nMilliseconds

WORD

The millisecond (0...999).

FB_BA_CnvtTiSt 4: Outputs

VAR_OUTPUT
  bNewData  : BOOL;
  tTi       : TIMESTRUCT;
END_VAR

Name

Type

Description

bNewData

BOOL

The output is TRUE in the cycle in which the input variables have changed.

tTi

TIMESTRUCT

Output time structure

Requirements

Development environment

Required PLC library

TwinCAT from v3.1.4024.22

Tc3_BA2 from v5.2.5.0