FB_BA_AI_IO

FB_BA_AI_IO 1:

The function block represents the object for an analog input.

It is used to map a measured value within the project structure.
The process variables for linking the function block to the bus terminal are available within the function block.

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_IO EXTENDS FB_BA_BaseAI IMPLEMENTS I_BA_RawAI
VAR_INPUT CONSTANT PERSISTENT
  {region 'Variable Parameters'}
    {attribute 'parameterCategory':='Hardware'}
      fResolution           : REAL := XBA_Param.fInput_DefResolution;
    {attribute 'parameterCategory':='Hardware'}
      fScaleOffset          : REAL := XBA_Param.fInput_DefScaleOffset;
  {endregion}
END_VAR
VAR
  {region 'Raw I/O'}
    nRawState       AT %I*  : USINT;
    nRawDataIn      AT %I*  : INT;
  {endregion}
END_VAR

FB_BA_AI_IO 2: Inputs CONSTANT PERSISTENT

Name

Type

Description

fResolution

REAL

Default value for the Resolution parameter of inputs (XBA_Param.fInput_DefResolution).

fScaleOffset

REAL

Default value for the Offset parameter of outputs(XBA_Param.fInput_DefScaleOffset).

VAR

Name

Type

Description

nRawState

USINT

Variable for linking the status information of a terminal.

nRawDataIn

INT

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

Requirements

Development environment

Required PLC library

TwinCAT from v3.1.4024.35

Tc3_XBA from v5.3.0.0