FB_BA_OpMod1StExt01

The template maps a single-stage plant selector switch with the operating modes Auto, Manual Off and Manual On.
The variable bSelector can be used to parameterize a plant in "Auto" mode so that the plant is switched on or off either via the input bValPgm or via the time schedule Sched.
![]() | The initialization of the template takes place within the method FB_Init. |
Block diagram

Syntax
FUNCTION_BLOCK FB_BA_OpMod1St EXTENDS FB_BA_View
VAR_INPUT
bValPgm : BOOL;
END_VAR
VAR_INPUT CONSTANT PERSISTENT
bSelector : BOOL;
END_VAR
VAR_INPUT CONSTANT
OpModMan : FB_BA_MV_Op;
Sched : FB_BA_SchedM;
OpModPr : FB_BA_MV_Op;
END_VAR
VAR_OUTPUT
eOpMod : E_BA_OnOff;
bCmd : BOOL;
END_VAR
VAR
PrioSwiOpMod : FB_BA_PrioSwi_UDI04;
END_VAR
Inputs
Name | Type | Description |
---|---|---|
bValPgm | BOOL | A plant can be switched on or off via the input in the operating mode "Auto". |
Inputs CONSTANT
Name | Type | Description |
---|---|---|
bSelector | BOOL | The variable can be used to parameterize a system in the "Auto" operating mode so that the system is switched on or off either via the input bValPgm or via the schedule Sched. |
Inputs CONSTANT
Name | Type | Description |
---|---|---|
OpModMan | The Multistate-Value object represents an operating mode switch with the operating modes "Auto", "Manual Off" and "Manual On". | |
Sched | A plant can be switched on or off by the schedule in the operating mode "Auto" and the parameter bSelector = TRUE. | |
OpModPr | The Multistate-Value object indicates the state of the currently valid plant operating mode. |
Outputs
Name | Type | Description |
---|---|---|
eOpMod | Displays the state of the currently valid plant operating mode. | |
bCmd | BOOL | The output shows the state of the currently valid plant operating mode. |
Variables
Name | Type | Description |
---|---|---|
PrioSwiOpMod | The priority switch detects the operating modes, prioritizes them and forwards the result to OpModPr. |
Requirements
Development environment | Necessary function |
---|---|
TwinCAT from v3.1.4024.35 | TF8040 | TwinCAT Building Automation from V5.0.0.0 |