FB_BA_BaseStateMV

FB_BA_BaseStateMV 1:

The function block FB_BAStateMV enables the display of states. Each referenced object is seen as state.
It is represented as multi-state object.

The state texts of this multi-state object are automatically the names of all commanded references.

The PresentValue is automatically the highest active state, or reference.

FB_BA_BaseStateMV 2:

Abstract

The FB serves as a base (ABSTRACT) for providing described functionalities for inheriting FBs.

Inheritance hierarchy

FB_BA_Base

    FB_BA_BasePublisher

        FB_BA_Object

Illustration

FUNCTION_BLOCK ABSTRACT FB_BA_BaseStateMV EXTENDS FB_BA_Object IMPLEMENTS I_BA_MultistateObject
VAR_INPUT CONSTANT PERSISTENT
  {region 'Fixed Parameters'}
    eStateTextDeterminationMode    : E_BA_NodeTypeTarget := E_BA_NodeTypeTarget.eFunction;
    aStateText                     : T_BA_StateTextArray;
  {endregion}
END_VAR
VAR
  {region 'Informational'}
    stActiveInfo                   : ST_BA_ActiveInfo;
  {endregion}
  {region 'Output-Properties'}
    nPresentValue                  : UDINT := 1;
    nStateCount                    : UDINT;
{endregion}
END_VAR

FB_BA_BaseStateMV 3: Inputs CONSTANT PERSISTENT

Name

Type

Description

eStateTextDeterminationMode

E_BA_NodeTypeTarget

Defines the reference to the object whose description is displayed to represent the state.

aStateText

T_BA_StateTextArray

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

VAR

Name

Type

Description

stActiveInfo

ST_BA_ActiveInfo

Description of the object.

nPresentValue

UDINT

Current value for multi-stage outputs.

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