FB_BA_TrendLogging

FB_BA_TrendLogging 1:

The template logs the values from a data source and records them in the Trendlog memory. The connection to the Trendlog objects (data sources, e.g. FB_BA_BO_IO, FB_BA_AO_IO) is made via references.

The variable TrendCount defines the size of the field of trendlog objects.

FB_BA_TrendLogging 2:

The initialization of the template takes place within the method FB_Init.

Syntax

FUNCTION_BLOCK FB_BA_TrendLogging EXTENDS FB_BA_View
VAR_INPUT CONSTANT
  Trends         : ARRAY[1..TREND_COUNT] OF FB_BA_Trend;
END_VAR
VAR
  i              : UDINT;
END_VAR
VAR CONSTANT
  TREND_COUNT    : UDINT := 30;
END_VAR

FB_BA_TrendLogging 3: Inputs CONSTANT

Name

Type

Description

Trends

FB_BA_Trend

Field with 30 entries for trend log objects.

Variables

Name

Type

Description

i

UDINT

Counter for the FOR loop to call the trendlog field Trends.

Variables

Name

Type

Description

TrendCount

UDINT

Constant to define the set of trendlog objects to be logged. Preset to 30.

Requirements

Development environment

Necessary function

TwinCAT from v3.1.4024.35

TF8040 | TwinCAT Building Automation from V5.0.0.0