ButtonToggle (FB)

FUNCTION_BLOCK ButtonToggle

Functional Description

Switching element with key and central control
Typical applications: Light scanners and light output

Portrayal

../_images/ButtonToggle_FB.png

Interfaces

Inputs

Name

Datatype

Range

Init-Value

Function

xButton BOOL    

Operating key

xCentralOn BOOL    

Central switch-on

xCentralOff BOOL    

Central switch-off

Outputs

Name

Datatype

Range

Init-Value

Function

xLightHB BOOL    

Enable - output

Functional Description

General

The function block is generally used for immediate control of the enable output xQ depending on the rising edges
at the inputs xButtons (= operating key), xCentralOn (= central switch-on), and xCentralOff (= central switch-off). Each rising
edge at the input - control key xButton changes the output xQ to the opposite state, if no central operation takes place.
If no rising edges are detected, the state of the enable output xQ does not change.

Function table

xButton xCentralOn xCentralOff xQ

Notes

FALSE, TRUE, H/L FALSE, TRUE, H/L FALSE, TRUE, H/L

unchanged

Inputs inactive

L/H FALSE, TRUE, H/L FALSE, TRUE, H/L FALSE > TRUE, TRUE > FALSE

Status change at the output

FALSE, TRUE, H/L L/H FALSE, TRUE, H/L TRUE

Central switch-on

FALSE, TRUE, H/L FALSE, TRUE, H/L L/H FALSE

Central switch-off

L/H L/H FALSE, TRUE, H/L TRUE

Central switch-on (higher priority)

L/H L/H L/H FALSE

Central switch-off (highest priority)

Legend: L/H ... Rising edge, H/L ... falling edge

Visualization




Information

Element

Authors

Date

Version

Notes

Function

Adam Bartod 09.2016 1.0

Initial version

Programming

Adam Bartod 09.2016 1.0

Initial version

Test Jochen Reu 09.2017 1.0

Initial version

Documentation

Jochen Reu 10.2017 1.0

Initial version

Codesys

InOut:
Scope Name Type Comment
Input xButton BOOL

Operating key

xCentralOn BOOL

Central switch-on

xCentralOff BOOL

Central switch-off

Output xOut BOOL

Enable - output