FB_BA_Trend

FB_BA_Trend 1:

The function block FB_BA_Trend represents a trend within the project structure of TF8040.

Information about inherited elements

FB_BA_Base

    FB_BA_BasePublisher

        FB_BA_Object

            FB_BA_EventObject

Illustration

FUNCTION_BLOCK FB_BA_Trend EXTENDS FB_BA_EventObject IMPLEMENTS I_BA_Trend
VAR_OUTPUT
  nRecordCount                : UDINT;
  nTotalRecordCount           : UDINT;
END_VAR
VAR_INPUT CONSTANT PERSISTENT
  {region 'Fixed Parameters'}
    nBufferSize               : UDINT := BA_Param.nTrend_BufferSize;
  {endregion}
  {region 'Variable Parameters'}
    aLogBuffer                : T_BA_TrendLogBuffer;
    bEnable                   : BOOL;
    stStartTime               : ST_BA_DateTime := BA_Param.stTrend_DefStartTime;
    stStopTime                : ST_BA_DateTime := BA_Param.stTrend_DefStopTime;
    bStopOnFull               : BOOL := BA_Param.bTrend_DefStopOnFull;
    nLogInterval              : UDINT := BA_Param.nTrend_DefLogInterval;
    nNotificationThreshold    : UDINT := BA_Param.nTrend_DefNotificationThreshold;
    eLoggingType              : E_BA_LoggingType := BA_Param.eTrend_DefLoggingType;
    stReferencedParam         : ST_BA_ObjectParameter;
  {endregion}
END_VAR

FB_BA_Trend 2: VAR_OUTPUT

Name

Type

Description

nRecordCount

UDINT

Number of records.

nTotalRecordCount

UDINT

Absolute number of records.

FB_BA_Trend 3: VAR_INPUT CONSTANT PERSISTENT

Name

Type

Description

nBufferSize

UDINT

Size of the buffer.

aLogBuffer

ST_BA_TrendEntry

Ring buffer for values with timestamp.

bEnable

BOOL

Recording enable.

stStartTime

ST_BA_DateTime

Start time.

stStopTime

ST_BA_DateTime

Stopping time.

bStopOnFull

BOOL

A TRUE stops the recording when the buffer is full.

nLogInterval

UDINT

Interval for saving the parameters.

nNotificationThreshold

UDINT

Limit value at which notifications are triggered.

eLoggingType

E_BA_LoggingType

Setting the type of saving.

stReferencedParam

ST_BA_ObjectParameter

Parameter object.

Requirements

Development environment

Required PLC library

TwinCAT from v3.1.4024.35

Tc3_XBA from v5.3.0.0