FB_BA_SensorAnalog
![FB_BA_SensorAnalog 1:](Images/png/9007211436101259__Web.png)
The function block MV, within the template, records an analog input value from an I/O bus terminal and converts it into a real process value.
![]() | The initialization of the template takes place within the method FB_Init. |
Block diagram
![FB_BA_SensorAnalog 3:](Images/png/14410480395__Web.png)
Syntax
FUNCTION_BLOCK FB_BA_SensorAnalog EXTENDS FB_BA_View
VAR_INPUT CONSTANT
MV : FB_BA_AI_Raw;
END_VAR
VAR_OUTPUT
fPresentValue : REAL;
bEvent : BOOL;
eEventState : E_BA_EventState;
END_VAR
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. |
eEventState | E_BA_EventState | Outputs the event state of the analog input object MV. |
Requirements
Development environment | Necessary function |
---|---|
TwinCAT from v3.1.4024.35 | TF8040 | TwinCAT Building Automation from V5.0.0.0 |