FB_BA_SensorAnalogTLog

FB_BA_SensorAnalogTLog 1:

The FB_BA_SensorAnalogTLog function block logs an analog input value from an I/O bus terminal and converts it into a real process value.

The process value is logged by a Trend object.

Each template is available in 2 different configurations regarding the connection to the I/O process level, see I/O mapping. This documentation refers to the RAW variant.

FB_BA_SensorAnalogTLog 2:

The initialization of the template takes place within the method FB_Init.

Block diagram

FB_BA_SensorAnalogTLog 3:

Syntax

FUNCTION_BLOCK FB_BA_SensorAnalog EXTENDS FB_BA_View
VAR_INPUT CONSTANT
  MV                       : FB_BA_AI_Raw;  
  TLogMV                   : FB_BA_Trend;
END_VAR
VAR_OUTPUT
  fPresentValue            : REAL;
  bEvent                   : BOOL;
  eEventState              : E_BA_EventState;
END_VAR

FB_BA_SensorAnalogTLog 4: Inputs CONSTANT

Name

Type

Description

MV

FB_BA_AI_Raw

Analog input object for displaying a process value.

TLogMV

FB_BA_Trend

Trend logging of the measured value of the MV object.

FB_BA_SensorAnalogTLog 5: Outputs

Name

Type

Description

fPresentValue

REAL

Current value of the analog input object MV for displaying a process value.

bEvent

BOOL

A TRUE indicates that an event is pending. The eEventState enum indicates the state of the event.

eEventState

E_BA_EventState

Outputs the state of the event of the analog input object MV.