FB_DALIV2SmartSPOT

FB_DALIV2SmartSPOT 1:

This function block cyclically reads the status of a smartSPOT sensor or MSensor 02 and scales the measured brightness and detected presence based on the received value.

FB_DALIV2SmartSPOT 2:

If the function block with MSensor 02 is to be used, it must be in slave mode.

Two different cycle times can be specified. One cycle time that is used if no presence is detected and one that is used in case of active presence. In this way access to the DALI bus can be minimized. If presence is detected a slower cycle time (e.g. 20 s) can usually be selected, because lighting control and switching off the lighting is not time-critical. If there is no presence, then a shorter cycle time (e.g. 2 s) should be selected. As a result, the lighting is switched on with the shortest possible reaction time when the room is entered.

The measured brightness of the sensor depends on the reflection of the furniture in the room. The measured value is only 20 to 40% of the actual brightness of the respective surface. Example: 500 lux on the table with a reflectivity of 30 % results in a brightness value of 150 lux. The measuring range of the sensor is designed so that the usual brightness at the workplace can be controlled from 200 lux to 1000 lux.

Further information and a description of the electrical and physical properties can be found in the product description of the smartSPOT sensor or the MSensor 02.

VAR_INPUT

bReadDirectly            : BOOL := FALSE;
tCycleTimeIfOccupancy    : TIME := t#20s;
tCycleTimeIfNoOccupancy  : TIME := t#2s;
nAddr                    : BYTE := 0;
eAddrType                : E_DALIV2AddrType := eDALIV2AddrTypeShort;
eCommandPriority         : E_DALIV2CommandPriority := eDALIV2CommandPriorityMiddle;

bReadDirectly: The actual values are read immediately by a rising edge at this input.

tCycleTimeIfOccupancy: Cycle time for the read of the actual values during active presence.

tCycleTimeIfNoOccupancy: Cycle time for the read of the actual values during inactive presence.

nAddr: The address of a participating device or of a group.

eAddrType: Short address, group address or broadcast.

eCommandPriority: The priority (high, middle, low) this command has when executed by the library.

VAR_OUTPUT

bOccupancy       : BOOL;
nBrightness      : INT;
nRawValue        : BYTE;
bBusy            : BOOL;
bError           : BOOL;
nErrorId         : UDINT;

bOccupancy: The output is set if the sensor detects presence.

nBrightness: Measured brightness in lux.

nRawValue: Raw value before conversion.

bBusy: When the block is activated the output is set, and it remains active until execution of the command has been completed.

bError: This output is switched to TRUE if an error occurs during the execution of a command. The command-specific error code is contained in nErrorId. Is reset to FALSE by the execution of an instruction at the inputs.

nErrorId: Contains the command-specific error code of the most recently executed command. Is reset to 0 by the execution of an instruction at the inputs. See Error codes.

VAR_IN_OUT

stCommandBuffer      : ST_DALIV2CommandBuffer;

stCommandBuffer: A reference to the structure for communication with the FB_DALIV2Communication() (KL6811) or FB_KL6821Communication() (KL6821) block.