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

Syntax

FUNCTION_BLOCK FB_BA_Trend EXTENDS FB_BA_EventObject IMPLEMENTS I_BA_Trend
VAR_INPUT
  bTrigPgm                  : BOOL;
END_VAR
VAR_OUTPUT
  nRecordCount              : UDINT;
  nTotalRecordCount         : UDINT;
END_VAR
VAR_INPUT CONSTANT PERSISTENT
  {region 'Fixed Parameters'}
    {attribute 'parameterCategory':='Value'}
    nBufferSize             : UDINT := XBA_Param.nTrend_BufferSize;
  {endregion}
  {region 'Variable Parameters'}
    {attribute 'parameterCategory':='Value'}
    aLogBuffer              : ARRAY [1 .. 1] OF ST_BA_TrendEntry
    {attribute 'parameterCategory':='State'}
    bEnable                 : BOOL;

    {attribute 'parameterCategory':='Config'}
    stStartTime             : ST_BA_DateTime := XBA_Param.stTrend_DefStartTime;
    {attribute 'parameterCategory':='Config'}
    stStopTime              : ST_BA_DateTime := XBA_Param.stTrend_DefStopTime;
    {attribute 'parameterCategory':='Config'}
    bStopOnFull             : BOOL := XBA_Param.bTrend_DefStopOnFull;
    {attribute 'parameterCategory':='Config'}
    {attribute 'parameterUnit':= 's'}
    nLogInterval            : UDINT := XBA_Param.nTrend_DefLogInterval;
    {attribute 'parameterCategory':='Config'}
    nNotificationThreshold  : UDINT := XBA_Param.nTrend_DefNotificationThreshold;
    {attribute 'parameterCategory':='Config'}
    eLoggingType            : E_BA_LoggingType := XBA_Param.eTrend_DefLoggingType;
    {attribute 'parameterCategory':='Config'}
    stReferencedParam       : ST_BA_ObjectParameter;
  {endregion}
END_VAR

FB_BA_Trend 2: Inputs

Name

Type

Description

bTrigPgm

BOOL

Trigger to start trending.

FB_BA_Trend 3: VAR_OUTPUT

Name

Type

Description

nRecordCount

UDINT

Number of records.

nTotalRecordCount

UDINT

Absolute number of records.

FB_BA_Trend 4: 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