FB_BA_Trend

The function block FB_BA_Trend represents a trend within the project structure of TF8040.
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
VAR_OUTPUT
Name | Type | Description |
|---|---|---|
nRecordCount | UDINT | Number of records. |
nTotalRecordCount | UDINT | Absolute number of records. |
VAR_INPUT CONSTANT PERSISTENT
Name | Type | Description |
|---|---|---|
nBufferSize | UDINT | Size of the buffer. |
aLogBuffer | Ring buffer for values with timestamp. | |
bEnable | BOOL | Recording enable. |
stStartTime | Start time. | |
stStopTime | 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 | Setting the type of saving. | |
stReferencedParam | Parameter object. |
Requirements
Development environment | Required PLC library |
|---|---|
TwinCAT from v3.1.4024.35 | Tc3_XBA from v5.3.0.0 |