FB_BA_BaseMI

FB_BA_BaseMI 1:

The FB_BA_BaseMI function block generates a multi-state input object.
It is the base of all multi-state input objects.

Inheritance hierarchy

FB_BA_Base

    FB_BA_BasePublisher

        FB_BA_Object

            FB_BA_EventObject

                FB_BA_EventObjectEx

                    FB_BA_ComEventObject

Illustration

FUNCTION_BLOCK ABSTRACT FB_BA_BaseMI EXTENDS FB_BA_ComEventObject IMPLEMENTS I_BA_MultistateInObject, I_BA_AnyValue
VAR_OUTPUT
  nPresentValue        : UDINT := 1;
END_VAR
VAR_INPUT CONSTANT PERSISTENT
  {region 'Variable Parameters'}
    eMappingMode       : E_BA_ByteMappingMode := E_BA_ByteMappingMode.eIndex1N;
    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}
END_VAR
VAR
  {region 'Output-Properties'}
    nStateCount        : UDINT;
  {endregion}
END_VAR

FB_BA_BaseMI 2: Outputs

Name

Type

Description

nPresentValue

UDINT

Analog output value.

FB_BA_BaseMI 3: Inputs CONSTANT PERSISTENT

Name

Type

Description

eMappingMode

E_BA_ByteMappingMode

Mode for configuring the terminal link.

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.

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