FB_BA_Button2Way

The template is used to directly link the inputs of a dual push button. The states are represented on a hierarchy level with two objects and made available to the project via the outputs bPresentValue1 and bPresentValue2. This template is used, for example, for the integration of blind buttons.
![]() | The initialization of the template takes place within the method FB_Init. |
Syntax
FUNCTION_BLOCK FB_BA_Button2Way EXTENDS FB_BA_VIEW
VAR_INPUT
END_VAR
VAR_INPUT CONSTANT
Swi1 : FB_BA_BI_Raw;
Swi2 : FB_BA_BI_Raw;
END_VAR
VAR_OUTPUT
bPresentValue1 : BOOL;
bPresentValue2 : BOOL;
END_VAR
Inputs CONSTANT
Name | Type | Description |
---|---|---|
Swi1 | Binary input object for switch1. | |
Swi2 | Binary input object for switch2. |
Outputs
Name | Type | Description |
---|---|---|
bPresentValue1 | BOOL | Output: state switch 1. |
bPresentValue2 | BOOL | Output: state switch 2. |
Requirements
Development environment | Necessary function |
---|---|
TwinCAT from v3.1.4024.35 | TF8040 | TwinCAT Building Automation from V5.0.0.0 |