FB_BA_Button2Way

FB_BA_Button2Way 1:

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.

FB_BA_Button2Way 2:

The initialization of the template takes place within the method FB_Init.

Inheritance hierarchy

FB_BA_Base

     FB_BA_BasePublisher

          FB_BA_Object

               FB_BA_View

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

FB_BA_Button2Way 3: Inputs CONSTANT

Name

Type

Description

Swi1

FB_BA_BI_Raw

Binary input object for switch1.

Swi2

FB_BA_BI_Raw

Binary input object for switch2.

FB_BA_Button2Way 4: 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