FB_BA_Toggle

FB_BA_Toggle 1:

The FB_BA_Toggle function block is used to switch an actuator on or off.

The input bEn is used for enabling the function block.

A positive edge at the input bOn results in setting of output bQ. The output is reset by a positive edge at the input bOff. If a positive edge is presented to bToggle, the output is negated; i.e., if On it goes Off, and if Off it goes On.

Syntax

FUNCTION_BLOCK FB_BA_Toggle
VAR_INPUT
  bEn            : BOOL;
  bOn            : BOOL;
  bOff           : BOOL;
  bToggle        : BOOL;
END_VAR
VAR_OUTPUT
  bQ             : BOOL;
END_VAR

FB_BA_Toggle 2: Inputs

Name

Type

Description

bEn

BOOL

Function block enable.

bOn

BOOL

Switches the output on.

bOff

BOOL

Switches the output off.

bToggle

BOOL

Negates the current output state.

FB_BA_Toggle 3: Outputs

Name

Type

Description

bQ

BOOL

Control output

Requirements

Development environment

Required PLC library

TwinCAT from v3.1.4024.62

Tc3_BA2 from v5.5.17.0