FB_BA_MV

FB_BA_MV 1:

The function block FB_BA_MV represents the Multi-State_Value object.
It has a priority array and can therefore be commanded (see Commanding objects).

The Multi-State_Value object specifies an object type whose properties represent externally visible characteristics of a virtual data point for a "Multi-State Value". The Multi-State_Value has no I/O hardware in the associated Device object, it is stored in memory.

Inheritance hierarchy

FB_BA_Base

    FB_BA_BasePublisher

        FB_BA_Object

            FB_BA_EventObject

                FB_BA_EventObjectEx

Illustration

FUNCTION_BLOCK FB_BA_MV EXTENDS FB_BA_EventObjectEx IMPLEMENTS I_BA_MultistatePrioObject, I_BA_AnyValue
VAR_INPUT
  bEnSfty              : BOOL;
  nValSfty             : UDINT := 1;
  bEnCrit              : BOOL;
  nValCrit             : UDINT := 1;
  bEnManLoc            : BOOL;
  nValManLoc           : UDINT := 1;
  bEnPgm               : BOOL;
  nValPgm              : UDINT := 1;
END_VAR
VAR_OUTPUT
  nPresentValue        : UDINT := 1;
  eActivePrio          : E_BA_Priority;
END_VAR
VAR_INPUT CONSTANT PERSISTENT
  {region 'Variable Parameters'}
    nDefaultValue      : UDINT:= 1;
    bEnOutOfService    : BOOL;
  {endregion}
  {region 'Fixed Parameters'}
    aStateText         : T_BA_StateTextArray;
    aAlarmValues       : ARRAY[1 .. BA_Param.nMultistate_StateCount] OF UDINT;
    aFaultValues       : ARRAY[1 .. BA_Param.nMultistate_StateCount] OF UDINT;
  {endregion}
  {region 'Operational Parameters'}
    bEnManualRm        : BOOL;
    nValManualRm       : UDINT:= 1;
  {endregion}
END_VAR
VAR
  {region 'Output-Properties'}
    nStateCount        : UDINT;
  {endregion}
END_VAR

FB_BA_MV 2: Inputs

Name

Type

Description

bEnSfty

BOOL

Enabling the "Safety" priority.

nValSfty

UDINT

Analog value for the "Safety" priority.

bEnCrit

BOOL

Enabling the "Critical" priority.

nValCrit

UDINT

Analog value for the "Critical" priority.

bEnManLoc

BOOL

Enabling the "Manual Local" priority.

nValManLoc

UDINT

Analog value for the "Manual Local" priority.

bEnPgm

BOOL

Enabling the "Program" priority.

nValPgm

UDINT

Analog value for the "Program" priority.

FB_BA_MV 3: Outputs

Name

Type

Description

nPresentValue

UDINT

Current value for multi-stage outputs.

eActivePrio

E_BA_Priority

Active priority

FB_BA_MV 4: Inputs CONSTANT PERSISTENT

Name

Type

Description

nDefaultValue

UDINT

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.

aStateText

T_BA_StateTextArray

The array is used to declare the state texts of a multi-state object.

aAlarmValues

ARRAY [1..BA_Param.nMultistate_StateCount] OF UDINT

Within the array the states of the multi-state object are described for which an alarm is present.

aFaultValues

ARRAY [1..BA_Param.nMultistate_StateCount] OF UDINT

Within the array the states of the multi-state object are described where an error is present.

bEnManualRm

BOOL

Enabling the "Manual Remote" priority.

nValManualRm

UDINT

Variable for writing a value to the "Manual Remote" priority.

VAR

Name

Type

Description

nStateCount

UDINT

Number of states of a multi-state object.

Requirements

Development environment

Required PLC library

TwinCAT from v3.1.4024.35

Tc3_XBA from v5.3.0.0