FB_Dimmer2SwitchEco

FB_Dimmer2SwitchEco 1:

Description

The function-block FB_Dimmer2SwitchEco is the memory-saving variation on the FB_Dimmer2Switch(). It operates without the extra-functions "Set-Value" and "Memory-mode-off", which are not needed in many cases. In addition the values nOutMin and nOutMax of the FB_Dimmer2Switch() are set to 0 and 32767 internally. The resulting output range is exactly the range of an analogue-output-terminal. The input tPLCCycle is very important for the calculation of increments per cycle for the output nOut . This method saves additional time-calculations.

Operation by means of the bSwitchDimmUp and bSwitchDimmDown inputs

The light is switched on or off by a short signal at the bSwitchDimmUp or bSwitchDimmDown inputs. Dimmer mode will be activated if the signal remains for longer than tSwitchOverTime (typical recommended value: 200ms). The output signal goes to nOutMin or nOutMax. When the signal is once more removed, the output signal being generated at that time is retained. Another pulse at one of the inputs will set the output to 0.

Operation by means of the bOn and bOff inputs

The light is immediately switched on or off if a rising edge is applied to the bOn or bOff inputs. This may, for instance, be used for global on/off functions. The output value is set to 0 when switching off.

The memory function

Unlike the function-block FB_Dimmer2Switch(), which can operate with or without memory-function, this function is always activated in this variation. This means, that the light will, when turned on, always be set to the last on-level. How the light was turned on, either with the input bSwitchDimmUp / bSwitchDimmDown or with the input bOn , doesn´t matter.

FB_Dimmer2SwitchEco 2:

Comment on the tSwitchOverTime parameter

If a duration of 0 is specified for the parameter tSwitchOverTime, the bSwitchDimmUp and bSwitchDimmDown inputs can only be used to dim the light. Switching on and off is only possible with the bOn and bOff inputs.

VAR_INPUT

bSwitchDimmUp    : BOOL;
bSwitchDimmDown  : BOOL;
bOn              : BOOL;
bOff             : BOOL;
tSwitchOverTime  : TIME := t#500ms;
tDimmTime        : TIME := t#5s;
tPLCCycle        : TIME := t#10ms;

bSwitchDimmUp: Switches or dims the output Up.

bSwitchDimmDown: Switches or dims the output Down.

bOn: Sets the output to the last output value.

bOff: Sets the output to 0.

tSwitchOverTime: Time for switching between the light on/off and dimming functions for the bSwitchDimm input.

tDimmTime: Time required for dimming to go from its minimum value to its maximum value.

tPLCCycle: PLC-Cycletime.

VAR_OUTPUT

nOut            : UINT;
bLight          : BOOL;

nOut: Analogue output-value.

bLight: Digital output-value. This bit is set if nOut is above 0.