FB_BA_AC_OpModAggBinary
The template serves as a link between steps within the step sequence control of an air conditioning system.
The function block Step is the core of the template and represents the binary receive block of a step sequence controller.
The connected aggregate receives its commands via the command structure stCmd.
The data exchange to the control block of the step sequence control (StepCtrlAgg) takes place via the data and command structure stStep.
The four multiplexers OpModVal, DelayOn, DelayOff and IgnoreFdb define the switch-on and switch-off conditions of the plant step based on the plant operation mode eOpMode. Each of these multiplexers has an array to be parameterized for the output value of the multiplexers (arrOpModVal, arrIgnoreDelayOnVal, arrIgnoreDelayOffVal, arrIgnoreFdbVal).
The resulting values of the multiplexers bVal, _bFdb, nDelayOn and nDelayOff are transmitted to the receive block of the step sequence controller Step, see block diagram part 02.
The parameterization of the arrays can be found in an air conditioning system in the methods below the example template FB_BA_AC_PlantCmd_AHU_1st_10, see Methods.
Block diagram
Part 01
Part 02
Syntax
FUNCTION_BLOCK FB_BA_AC_OpModAggBinary
VAR_INPUT
stPriorityEn : ST_BA_PriorityEn;
eOpMode : E_BA_AC_OpMod01;
bFdb : BOOL;
fDlyOn : REAL;
fDlyOff : REAL;
END_VAR
VAR_OUTPUT
stCmd : ST_BA_Binary;
nRemSecStepUp : UDINT;
nRemSecStepDown : UDINT;
END_VAR
VAR_IN_OUT
stStep : ST_BA_Step;
END_VAR
VAR_INPUT CONSTANT
OpModVal : FB_BA_MMUX_B16;
DelayOn : FB_BA_MMUX_B16;
DelayOff : FB_BA_MMUX_B16;
IgnoreFdb : FB_BA_MMUX_B16;
Step : FB_BA_StepBinary;
END_VAR
VAR_INPUT CONSTANT PERSISTENT
bInit : BOOL := TRUE;
arrOpModVal : ARRAY [1..16] OF BOOL;
arrIgnoreDelayOnVal : ARRAY [1..16] OF BOOL;
arrIgnoreDelayOffVal : ARRAY [1..16] OF BOOL;
arrIgnoreFdbVal : ARRAY [1..16] OF BOOL;
END_VAR
VAR
bVal : BOOL;
_bFdb : BOOL;
nDelayOn : UDINT;
nDelayOff : UDINT;
END_VAR
Inputs
Name | Type | Description |
---|---|---|
stPriorityEn | ST_BA_PriorityEn | Input of the current command structure stPriorityEn. This includes the system enable for the step sequence control of an air conditioning system and the associated enables for the priorities "Safety", "Critical" and "Program". |
eOpMode | E_BA_AC_OpMod01 | Input of the current operation mode. |
bFdb | BOOL | Feedback from the connected aggregate of the step sequence controller. The feedback is required for switching to the next step. bFdb is only considered if the aggregate is the active one in the step sequence control. By parameterizing the individual elements of the array arrIgnoreFdbVal with a TRUE, the feedback from the aggregate can be ignored for the different operation modes eOpMode. |
fDlyOn | REAL | Time specification of the start-up delay [s]. The time specification is required for switching to the next step. By parameterizing the individual elements of the array arrIgnoreDelayOnVal with a TRUE, the start-up delay of the step can be ignored for the different operation modes eOpMode. |
fDlyOff | REAL | Time specification of switch-off delay [s]. The time specification is needed to switch off the active step. By parameterizing the individual elements of the array arrIgnoreDelayOffVal with a TRUE, the switch-off delay of the step can be ignored for the different operation modes eOpMode. |
Outputs
Name | Type | Description |
---|---|---|
stCmd | The command structure stCmd transmits the enables and switching values of the priorities to the connected aggregate. | |
nRemSecStepUp | UDINT | Countdown to switch on the next step [s]. |
nRemSecStepDown | UDINT | Countdown to switching off the active step [s]. |
Inputs/outputs
Name | Type | Description |
---|---|---|
stStep | Data and command structure between the step sequence function block FB_BA_StepBinary and the control block of the step sequence FB_BA_StepCtrlAgg16. |
Inputs CONSTANT
Name | Type | Description |
---|---|---|
OpModVal | The multiplexer determines the switch-on value of the connected aggregate. The resulting value is sent to the output bVal. | |
DelayOn | The multiplexer and the connected network of functions determine the switching delay to the next step. The resulting value is sent to the output nDelayOn. | |
DelayOff | The multiplexer and the connected network of functions determine the switch-off delay of the current step. The resulting value is sent to the output nDelayOff. | |
IgnoreFdb | The multiplexer and the connected network of functions determine the feedback of the aggregate. The resulting value is sent to the output _bFdb. | |
Step | The function block represents the binary receive block of a step sequence controller and controls the connected aggregate via the command structure stCmd. The data exchange to the control block of the step sequence control (FB_BA_StepCtrlAgg16) takes place via the data and command structure stStep. |
Inputs CONSTANT PERSISTENT
Name | Type | Description |
---|---|---|
bInit | BOOL | The variable is used to initialize the arrays arrOpModVal, arrIgnoreDelayOnVal, arrIgnoreDelayOffVal, arrIgnoreFdbVal in the methods below the template FB_BA_AC_PlantCmd_AHU_1st_10. After starting the controller, the variable is set to FALSE after a PLC cycle and this state is saved persistently. |
arrOpModVal | ARRAY [1..16] OF BOOL | By parameterizing the individual elements of the array, the switch-on value of the connected aggregate can be defined on the step sequence function block for the different operation modes eOpMode. |
arrIgnoreDelayOnVal | ARRAY [1..16] OF BOOL | By parameterizing the individual elements of the array with a TRUE, the switching delay to the next step within the step sequence control can be ignored for the different operation modes eOpMode. |
arrIgnoreDelayOffVal | ARRAY [1..16] OF BOOL | By parameterizing the individual elements of the array with a TRUE, the switch-off delay of the current step within the step sequence control can be ignored for the different operation modes eOpMode. |
arrIgnoreFdbVal | ARRAY [1..16] OF BOOL | By parameterizing the individual elements of the array with a TRUE, the feedback from the aggregate bFdb can be ignored for the different operation modes eOpMode. |
Variables
Name | Type | Description |
---|---|---|
bVal | BOOL | The variable is the result of the operation mode eOpMode, the multiplexer OpModVal and the array arrOpModVal. bVal defines the switch-on value at the step sequence function block Step. |
_bFdb | BOOL | The variable is the result of the operation mode eOpMode, the multiplexer IgnoreFdb and the array arrIgnoreFdbVal. _bFdb defines the switching condition to the next step in the step sequence function block Step. |
nDelayOn | UDINT | The variable is the result of the operation mode eOpMode, the multiplexer DelayOn and the array arrIgnoreDelayOnVal. nDelayOn defines the switching delay to the next step on the step sequence function block Step. |
nDelayOff | UDINT | The variable is the result of the operation mode eOpMode, the multiplexer DelayOff and the array arrIgnoreDelayOffVal. nDelayOff defines the switch-off delay of the current step on the step sequence function block Step. |
Requirements
Development environment | Necessary function |
---|---|
TwinCAT from v3.1.4024.35 | TF8040 | TwinCAT Building Automation from V5.0.0.0 |