FB_BAFLampGroupStandard

Function-block for controlling a Standard Lamp Group directly out of the PLC-program.
VAR_INPUT
uiId : UINT;
bStartExecution : BOOL;
bStopExecution : BOOL;
bOn : BOOL;
bOff : BOOL;
bCallMinControlValue : BOOL;
bCallMaxControlValue : BOOL;
bSetControlValueDirect : BOOL;
lrSetControlValueDirect : LREAL;
bFadeUp : BOOL;
bFadeDown : BOOL;
bStepUp : BOOL;
bStepDown : BOOL;
bStartFunctionTest : BOOL;
bStartDurationTest : BOOL;
bChangeMaximumControlValue : BOOL;
lrChangeMaximumControlValue : LREAL;
bChangeMinimumControlValue : BOOL;
lrChangeMinimumControlValue : LREAL;
uiId: Object id of the instance (see object id).
bStartExecution: Starts the instance of the lamp group.
bStopExecution: Stops the instance of the lamp group.
bOn : The bOn-command of all lamps in this group will be executed.
bOff : The bOff-command of all lamps in this group will be executed.
bCallMinControlValue: The bCallMinControlValue-command of all lamps in this group will be executed.
bCallMaxControlValue: The bCallMaxControlValue-command of all lamps in this group will be executed.
bSetControlValueDirect: The bSetControlValueDirect-command of all lamps in this group will be executed.
lrSetControlValueDirect: If bSetControlValueDirect is set, the value of this variable (0% - 100%) will be put through to all lamps of the group.
bFadeUp: The bFadeUp-command of all lamps in this group will be executed.
bFadeDown: The bFadeDown-command of all lamps in this group will be executed.
bStepUp: The bStepUp-command of all lamps in this group will be executed.
bStepDown: The bStepDown-command of all lamps in this group will be executed.
bStartFunctionTest: A function-test will be started at all DALI-Emergency-devices. All other lamps in this group will simply ignore this command.
bStartDurationTest: A duration-test will be started at all DALI-Emergency-devices. All other lamps in this group will simply ignore this command.
bChangeMaximumControlValue: The bChangeMaximumControlValue-command of all lamps in this group will be executed.
lrChangeMaximumControlValue: If bChangeMaximumControlValue is set, the value of this variable (0% - 100%) will be taken as the lamps´ maximum value.
bChangeMinimumControlValue: The bChangeMinimumControlValue-command of all lamps in this group will be executed.
lrChangeMinimumControlValue: If bChangeMinimumControlValue is set, the value of this variable (0% - 100%) will be taken as the lamps´ minimum value.
VAR_OUTPUT
uiErrorId : UINT;
iErrorParameter : INT;
eExecutionState : E_BAF_ExecutionState;
udiAmountOfLamps : UDINT;
udiAmountOfFaultyLamps : UDINT;
udiAmountOfActiveLamps : UDINT;
lrAverageControlValue : LREAL;
lrAverageResettingValue : LREAL;
udiAmountOfLampsWithMinControlValue : UDINT;
udiAmountOfLampsWithMaxControlValue : UDINT;
uiErrorId: Contains the error code of the last executed command (see Error codes).
iErrorParameter: Contains the specific parameter of the error code (see Error codes).
eExecutionState: Contains the actual execution-state of the instance of the lamp group.
udiAmountOfLamps: The amount of all lamps in this group.
udiAmountOfFaultyLamps: The amount of all faulty lamps in this group (uiErrorId > 0).
udiAmountOfActiveLamps: The amount of all active lamps in this group. The control-value has to be greater than 0 and the nErrorId has to be 0.
lrAverageControlValue: The average control-value of all lamps in this group, which are not in an error-state.
lrAverageResettingValue: The average resetting-value of all lamps in this group, which are not in an error-state.
udiAmountOfLampsWithMinControlValue: The amount of all lamps in this group which are not in an error-state and have the bReachedMinControlValue-output set.
udiAmountOfLampsWithMaxControlValue: The amount of all lamps in this group which are not in an error-state and have the bReachedMaxControlValue-output set.