FB_BAFLampDALIEmergencyLighting
Function-block for controlling a DALI Lamp for Emergency Lighting 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;
bSetOperatingHourCounterDirect : BOOL;
udiSetOperatingHourCounterDirect : UDINT;
uiId: Object id of the instance ( see object id).
bStartExecution: Starts the instance of the lamp.
bStopExecution: Stops the instance of the lamp.
bOn: If iResettingMode = 1: The control-value will be set to the previously stored lrResettingValue. Then this value will be internally adjusted to the DALI-Range (0 - 254) and sent to the lamp with the DALI-command DIRECT ARC POWER.
If iResettingMode = 0: The DALI-Command RECALL MAX LEVEL will be sent.
bOff: If iResettingMode = 1: The lamp will be turned off by sending the DALI-command OFF. Before, the control value will be stored in lrResettingValue.
If iResettingMode = 0: The lamp will be turned off without saving the last control value.
bCallMinControlValue: The DALI-Command RECALL MIN LEVEL will be sent.
bCallMaxControlValue: The DALI-Command RECALL MAX LEVEL will be sent.
bSetControlValueDirect: The control value of the lamp will be set to lrSetControlValueDirect.
lrSetControlValueDirect: If bSetControlValueDirect is set, the value (0% - 100%) will be internally adjusted to the DALI-Range (0 - 254) and then sent to the lamp with the DALI-command DIRECT ARC POWER.
bFadeUp: Increases the light value by the entered fade-rate.
bFadeDown: Decreases the light value by the entered fade-rate.
bStepUp: Steps the lamp up by the entered step range.
bStepDown: Steps the lamp down by the entered step range.
bStartFunctionTest: A function test will be started.
bStartDurationTest: A duration test will be started.
bChangeMaximumControlValue: The maximum control-value of the lamp will be set to lrChangeMaxMinControlValue.
bChangeMinimumControlValue: The minimum control-value of the lamp will be set to lrChangeMaxMinControlValue.
lrChangeMaxMinControlValue: Level (0% - 100%) to which the lamps minimum- or maximum control level will be set, depending on the states of bChangeMaximumControlValue and bChangeMinimumControlValue.
bSetOperatingHourCounterDirect: The operating hours counter for the lamp is set to udiSetOperatingHourCounterDirect.
udiSetOperatingHourCounterDirect: The value to which the operating hours counter for the lamp is set by the input bSetOperatingHourCounterDirect set. Unit is seconds.
VAR_OUTPUT
uiErrorId : UINT;
iErrorParameter : INT;
eExecutionState : E_BAF_ExecutionState;
lrControlValue : LREAL;
lrResettingValue : LREAL;
bReachedMinControlValue : BOOL;
bReachedMaxControlValue : BOOL;
udiOperatingHourCounter : UDINT;
tElapsedTestTime : TIME;
byEmergencyMode : BYTE;
byEmergencyStatus : BYTE;
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.
lrControlValue: The control-value (0% - 100%) of the lamp.
iResettingValue: The resetting-value (0% - 100%) of the lamp.
bReachedMinControlValue: The control value of the lamp lrControlValue is equal to the parameter lrMinControlValue.
bReachedMaxControlValue: The control value of the lamp lrControlValue is equal to the parameter lrMaxControlValue.
udiOperatingHourCounter: operating hours counter for the lamp. Unit is seconds.
tElapsedTestTime: If a test is actually running, this output will show the elapsed test-time. This output will maintain its contents after the test is finished.
byEmergencyMode: Shows the Emergency-mode during a test. If not in test-mode, this DALI-specific state-byte will not be automatically updated.
byEmergencyState: Shows the Emergency-state during a test. If not in test-mode, this DALI-specific state-byte will not be automatically updated.