FB_StairwellDimmer

FB_StairwellDimmer 1:

A rising edge at the input bSwitch sets the analog output nOut to the value nPresenceValue. A falling edge on bSwitch starts or restarts a timer with the runtime tPresenceDuration. Following the expiry of this timer, nOut is dimmed to the value nProlongValue over the time period tFadeOffDuration. This value is maintained for the time period tProlongDuration. After that, nOut is set to 0. A rising edge at the input bOff switches the output nOut to 0 immediately. The digital output value bLight is always set when nOut is greater than 0.

FB_StairwellDimmer 2:
FB_StairwellDimmer-Time-nOut

VAR_INPUT

bSwitch             : BOOL;
bOff                : BOOL;
nPresenceValue      : UINT := 32767;
nProlongValue       : UINT := 10000;
tPresenceDuration   : TIME := t#120s;
tFadeOffDuration    : TIME := t#10s;
tProlongDuration    : TIME := t#20s;

bSwitch: Upon a rising edge: nOut is set to nPresenceValue. Upon a falling edge: start of the presence time (see diagram).

bOff: Switches nOut off immediately.

nPresenceValue: Value to which nOut should be set during the presence time. (Preset value: 32767).

nProlongValue: Value to which nOut should be set during the dwell time. (Preset value: 10000).

tPresenceDuration: Duration of the presence time in which nOut is set to nPresenceValue following a falling edge on bSwitch. (Preset value: 120 seconds).

tFadeOffDuration: Duration over which nOut is faded down to the dwell time following the presence time. (Preset value: 10 seconds).

tProlongDuration: Duration of the dwell time. (Preset value: 20 seconds).

VAR_OUTPUT

nOut        : UINT;
bLight      : BOOL;

nOut: Output of the momentary light value.

bLight: This output is set if nOut is greater than 0.