FB_BA_BV

FB_BA_BV 1:

The function block FB_BA_BV represents a binary value object.

It has a priority array and can therefore be commanded.

Inheritance hierarchy

FB_BA_Base

    FB_BA_BasePublisher

        FB_BA_Object

            FB_BA_EventObject

                FB_BA_EventObjectEx

Syntax

FUNCTION_BLOCK FB_BA_BV EXTENDS FB_BA_EventObjectEx IMPLEMENTS I_BA_BinaryPrioObject, I_BA_AnyValue
VAR_INPUT
  bEnSfty              : BOOL;
  bValSfty             : BOOL;
  bEnCrit              : BOOL;
  bValCrit             : BOOL;
  bEnManLoc            : BOOL;
  bValManLoc           : BOOL;
  bEnPgm               : BOOL;
  bValPgm              : BOOL;
END_VAR
VAR_OUTPUT
  bPresentValue        : BOOL;
  eActivePrio          : E_BA_Priority;
END_VAR
VAR_INPUT CONSTANT PERSISTENT
  {region 'Variable Parameters'}
    {attribute 'parameterCategory':='General'}
    {attribute 'parameterUnit':= 's'}
    nMinimumOffTime    : UDINT;
    {attribute 'parameterCategory':='General'}
    {attribute 'parameterUnit':= 's'}
    nMinimumOnTime     : UDINT;
    
    {attribute 'parameterCategory':='Value'}
    bDefaultValue      : BOOL;
    {attribute 'parameterCategory':='Value'}
    bEnOutOfService    : BOOL;
    {attribute 'parameterCategory':='Value'}
    {attribute 'TcEncoding':='UTF-8'}
    sInactiveText      : T_BA_StateText;
    {attribute 'parameterCategory':='Value'}
    {attribute 'TcEncoding':='UTF-8'}
    sActiveText        : T_BA_StateText;
    
    {attribute 'parameterCategory':='EventConfig'}
    bAlarmValue        : BOOL := TRUE;
  
    {attribute 'parameterCategory':='StateChange'}
    nStateChangeCount  : UDINT;
    
    {attribute 'parameterCategory':='ActiveTime'}
    {attribute 'parameterUnit':= 's'}
    nActiveTimeElapsed : UDINT;
  {endregion}
  {region 'Operational Parameters'}
    {attribute 'parameterCategory':='Manual'}
    bEnManualRm        : BOOL;
    {attribute 'parameterCategory':='Manual'}
    bValManualRm       : BOOL;
  {endregion}
END_VAR

FB_BA_BV 2: Inputs

Name

Type

Description

bEnSfty

BOOL

Enabling the "Safety" priority.

bValSfty

BOOL

Binary value for the "Safety" priority.

bEnCrit

BOOL

Enabling the "Critical" priority.

bValCrit

BOOL

Binary value for the "Critical" priority.

bEnManLoc

BOOL

Enabling the "Manual Local" priority.

bValManLoc

BOOL

Binary value for the "Manual Local" priority.

bEnPgm

BOOL

Enabling the "Program" priority.

bValPgm

BOOL

Binary value for the "Program" priority.

FB_BA_BV 3: Outputs

Name

Type

Description

bPresentValue

BOOL

Current binary output value of the object.

eActivePrio

E_BA_Priority

Active priority.

FB_BA_BV 4: Inputs CONSTANT PERSISTENT

Name

Type

Description

nMinimumOffTime

UDINT

Minimum time [s] in which the Present Value should remain in the INACTIVE state after a write operation to Present Value has assumed the INACTIVE state.

This can be used to implement protection against too fast restarting.

nMinimumOnTime

UDINT

Minimum time [s] in which the Present Value is to remain in the ACTIVE state after a write operation to Present Value has assumed the ACTIVE state.

This can be used to implement protection against premature, renewed switch-off.

bDefaultValue

BOOL

Value that is assumed if all 16 priorities of the Priority array of a commandable object have no entry or are NULL.

bEnOutOfService

BOOL

This variable sets an object out of service. It is thus OutOfService.

sInactiveText

T_BA_StateText

Text output when the object is inactive.

sActiveText

T_BA_StateText

Text output when the object is active.

bAlarmValue

BOOL

Value in the event of an alarm.

nStateChangeCount

UDINT

The variable indicates how often the state of the Present Value has changed since the date and the last reset.

nActiveTimeElapsed

UDINT

Time [s] in which the Present_Value of the object had the value ACTIVE. The time is valid from the last reset by the property Time_Of_Active_Time_Reset.

bEnManualRm

BOOL

Enabling the "Manual Remote" priority.

bValManualRm

BOOL

Binary value for the "Manual Remote" priority.

Requirements

Development environment

Required PLC library

TwinCAT from v3.1.4024.35

Tc3_XBA from v5.3.0.0