FB_StairwellLight
A positive edge at the bSwitch input sets the bLight output. The output is reset once the tLightDuration time has elapsed. If a signal is presented again to the bSwitch input before this time has elapsed, the timer is restarted. When tPreWarningStart has elapsed, the light is switched off (as a prewarning) for the period tPreWarningDuration. If this prewarning is not to be given, the parameter tPreWarningStart must be set to 0. A positive edge at the bOff input switches the output off immediately.
VAR_INPUT
bSwitch : BOOL;
bOff : BOOL;
tLightDuration : TIME := t#120s;
tPreWarningStart : TIME := t#110s;
tPreWarningDuration : TIME := t#500ms;
bSwitch: Switches the output on for the period of time given by tLightDuration.
bOff: Switches the output off.
tLightDuration: Period of time for which the output is set.
tPreWarningStart: Warning time.
tPreWarningDuration: Duration of the prewarning.
VAR_OUTPUT
bLight : BOOL;
bLight: The output is set for the duration of tLightDuration with a positive edge at bSwitch.
Requirements
Development environment | Required PLC library |
---|---|
TwinCAT from v3.1.4020.32 | Tc2_BABasic from v3.1.0.0 |