FB_BA_SensorAnalogTLog

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.
![]() | The initialization of the template takes place within the method FB_Init. |
Block diagram

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
Inputs CONSTANT
Name | Type | Description |
|---|---|---|
MV | Analog input object for displaying a process value. | |
TLogMV | Trend logging of the measured value of the MV object. |
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 | Outputs the state of the event of the analog input object MV. |
