FB_BA_AI_IOEx

FB_BA_AI_IOEx 1:

The function block represents the object of an analog input.

The process variables for linking the function block to the bus terminal are created within the function block. The function block also enables configuration of the analog input terminal. The function block FB_BA_KL32xx is used for this purpose.

Inheritance hierarchy

FB_BA_Base

    FB_BA_BasePublisher

        FB_BA_Object

            FB_BA_EventObject

                FB_BA_EventObjectEx

                    FB_BA_ComEventObject

                        FB_BA_BaseAI

Syntax

FUNCTION_BLOCK FB_BA_AI_IOEx EXTENDS FB_BA_BaseAI
VAR_INPUT CONSTANT PERSISTENT
  {region 'Variable Parameters'}
    eSensor               : E_BA_MeasuringElement := BA_Param.fInput_DefSensor;
  {endregion}
END_VAR
VAR_INPUT CONSTANT
  {region 'Operational Parameters'}
    bConfigurate          : BOOL := TRUE;
  {endregion}
END_VAR
VAR
  {region 'Output-Properties'}
    sTerminalType         : STRING;
  {endregion}
END_VAR
VAR
  {region 'I/O'}
    nRawState      AT %I* : USINT;
    nRawDataIn     AT %I* : INT;
    nRawCtrl       AT %Q* : USINT;
    nRawDataOut    AT %Q* : INT;
    iSrcIO                : I_BA_RawAI;
  {endregion}
END_VAR

FB_BA_AI_IOEx 2: Inputs CONSTANT PERSISTENT

Name

Type

Description

eSensor

E_BA_MeasuringElement

This input is used to set the sensor. The setting is made by selecting the type in the enumeration.

FB_BA_AI_IOEx 3: Inputs CONSTANT

Name

Type

Description

bConfigurate

BOOL

Start of the terminal configuration.

VAR

Name

Type

Description

sTerminalType

STRING

Indicates the type of bus terminal used.

nRawState

USINT

Variable for linking the status information of a terminal.

nRawDataIn

INT

Variable for linking the raw data of an analog input terminal.

nRawCtrl

USINT

Variable for linking with the control information of a terminal.

nRawDataOut

INT

Variable for linking the output value of the PLC with the process image of an output terminal.

Requirements

Development environment

Required PLC library

TwinCAT from v3.1.4024.35

Tc3_XBA from v5.3.0.0