FB_BA_SubTrend

FB_BA_SubTrend 1:

The function block allows to subscribe to a trend object.

Inheritance hierarchy

FB_BA_Base

    FB_BA_Subscriber

Syntax

FUNCTION_BLOCK FB_BA_SubTrend EXTENDS FB_BA_Subscriber
VAR_INPUT
  sTarget                   : T_BA_MedString;
  tReadInterval             : TIME;
  tReadTolerance            : TIME;
  bClearOnReadError         : BOOL;
END_VAR

VAR_OUTPUT
  bError                    : BOOL;
  bEvent                    : BOOL;
  nRecordCount              : UDINT;
  nTotalRecordCount         : UDINT;
END_VAR

FB_BA_SubTrend 2: Inputs

Name

Type

Description

sTarget

T_BA_MedString

AMS NetId of the Publisher.

tReadInterval

TIME

Read interval [s].

tReadTolerance

TIME

Waiting time until a pending error is output [ms].

bClearOnReadError

BOOL

If TRUE, the data is deleted if an error occurs.

FB_BA_SubTrend 3: Outputs

Name

Type

Description

bError

BOOL

Displays the current error state of the subscription.

Details can be found in the corresponding error message in the event of an error.

bEvent

BOOL

The variable signals an abnormal event of an object.

The type of event, e.g. an alarm, a maintenance message, etc., is described within the event class associated with the object.

nRecordCount

UDINT

Number of records.

nTotalRecordCount

UDINT

Absolute number of records.

FB_BA_SubTrend 4: Properties

Name

Type

Access

Description

Enable

BOOL

Get, Set

Enable of the subscription.

FB_BA_SubTrend 5: Methods

Name

Description

GetData

Contains the subscribed data.

Requirements

Development environment

Required PLC library

TwinCAT from v3.1.4024.35

Tc3_XBA from v5.3.0.0