FB_BAFLampStandard

Function-block for controlling a Standard Lamp 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;
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 lamp will be set to the previously stored lrResettingValue.
If iResettingMode = 0: The lamp will be set to lrMaxControlValue.
bOff: If iResettingMode = 1: The lamp will be turned 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 control value of the lamp will be set to lrMinControlValue.
bCallMaxControlValue: The control value of the lamp will be set to lrMaxControlValue.
bSetControlValueDirect: The control value of the lamp will be set to lrSetControlValueDirect.
lrSetControlValueDirect: The value (0% - 100%) to which the lamp is set after the command bSetControlValueDirect was given. Sending the value "0" to the lamp will turn the device directly off. All other given control-values below lrMinControlValue will be automatically increased to lrMinControlValue, values above lrMaxControlValue will automatically decreased to lrMaxControlValue.
bFadeUp: Lets the control value be increased by lrFadeSteps. If the lamp is turned off, this command will not be executed.
bFadeDown: Lets the control value be decreased by lrFadeSteps. It is not possible to turn off the lamp with this command.
bStepUp: Steps the lamp up by the entered step range.
bStepDown: Steps the lamp down by the entered step range.
bChangeMaximumControlValue: The maximum control value of the lamp will be set to lrChangeMaximumControlValue.
lrChangeMaximumControlValue: Level (0% - 100%) to which the lamps maximum control level will be set, depending on the state of bChangeMaximumControlValue.
bChangeMinimumControlValue: The minimum control value of the lamp will be set to lrChangeMinimumControlValue.
lrChangeMaxMinControlValue: Level (0% - 100%) to which the lamps minimum control level will be set, depending on the state of 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;
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.