FB_Light

FB_Light 1:

A rising edge at the bOn input sets the bLight output. The output is reset by a rising edge at the bOff input. If a rising edge is presented to bToggle, the output is negated; i.e., if On it goes Off, and if Off it goes On.

VAR_INPUT

bOn          : BOOL;
bOff         : BOOL;
bToggle      : BOOL;

bOn: Switches the output on.

bOff: Switches the output off.

bToggle: Negates the state of the output.

VAR_OUTPUT

bLight       : BOOL;

bLight: A rising edge at the bOn input sets the output.

Example 1

In the following example a light is operated by two switches.

FB_Light 2:

If either the bSwitchA or the bSwitchB button is pressed, then the state of the light, as represented by the bLight output, is changed.

Example 2

In the following example the bSwitchMasterOff switch is used to switch the bLampKitchen and bLampGarage lights off together. This function can be used, for instance, for central control of an area of a building.

FB_Light 3: