FB_DALI_Steinel_Hallway_IPD

FB_DALI_Steinel_Hallway_IPD 1:

The function block represents the Hallway IPD DALI sensor from Steinel.

This outputs the measured brightness value (instance 0), three occupancy signals (instances 1 to 3), a temperature value (instance 4) and a relative humidity value (instance 5).

Further information on the supported instance types can be found here:

Part 303 (occupancy sensors) - Introduction

Part 304 (light sensors) - Introduction

The existing parameters can be overwritten by changing the properties listed below. All parameters are written to the DALI control device by a positive edge at bInitialize and stored there.

The outputs with the output values of the DALI device only contain valid values if the function block was executed without errors (bError = FALSE). If the output bError = TRUE, the outputs with the output values must not be evaluated.

The DALI sensor contains three occupancy sensors. One occupancy sensor (instance 2) is aligned in the direction "S" of the STEINEL lettering on the device, while the second occupancy sensor (instance 3) is aligned in the direction "L". The third occupancy sensor (instance 1) combines both sensors into a single instance.

Never activate all three instances at the same time, as this places an unnecessary load on the DALI bus. Either the two instances for direction "S" and "L" are active or the combined instance is active (default setting). Thus either the properties nXyzDirectionS / nXyzDirectionL or the properties nXyzCombined should be set, but not all at the same time. Setting the properties nXyzCombined overwrites the values of nXyzDirectionS / nXyzDirectionL.

The temperature measurement and humidity measurement are executed as Generic Inputs. These values can only be queried via a positive edge at the inputs bQueryTemperature and bQueryHumidity.

For the other instances, the reading can also be triggered directly via the inputs bQueryBrightness, bQueryOccupancyCombined, bQueryOccupancyDirectionS and bQueryOccupancyDirectionL, even if the corresponding instance is not enabled.

FB_DALI_Steinel_Hallway_IPD 2:

Set the times so that as few events as possible are sent. If too many events are sent, this can have a negative effect on the behavior of the application.

FB_DALI_Steinel_Hallway_IPD 3:

The function block cannot be used when using the KL6811.

FB_DALI_Steinel_Hallway_IPD 4: Inputs

VAR_INPUT
  bInitialize                         : BOOL  := FALSE;
  nShortAddress                       : BYTE  := 0;
  nOptions                            : DWORD := 0;
  bQueryOccupancyCombined             : BOOL := FALSE;
  bQueryOccupancyDirectionS           : BOOL := FALSE;
  bQueryOccupancyDirectionL           : BOOL := FALSE;
  bQueryBrightness                    : BOOL := FALSE;
  bQueryTemperature                   : BOOL := FALSE;
  bQueryHumidity                      : BOOL := FALSE;
  bCancelHoldTimerOccupancyCombined   : BOOL := FALSE;
  bCancelHoldTimerOccupancyDirectionS : BOOL := FALSE;
  bCancelHoldTimerOccupancyDirectionL : BOOL := FALSE;
END_VAR

Name

Type

Description

bInitialize

BOOL

The configuration of the DALI control device is started by a positive edge at this input. During this time no DALI commands are processed.

nShortAddress

BYTE

Short address (0…63) of the DALI control device.

nOptions

DWORD

Reserved for future extensions.

bQueryOccupancyCombined

BOOL

The value of the combined occupancy sensor is queried immediately by a positive edge at this input.

bQueryOccupancyDirectionS

BOOL

The value of the occupancy sensor for direction "S" is queried immediately by a positive edge at this input.

bQueryOccupancyDirectionL

BOOL

The value of the occupancy sensor for direction "L" is queried immediately by a positive edge at this input.

bQueryBrightness

BOOL

The brightness is queried immediately by a positive edge at this input.

bQueryTemperature

BOOL

The temperature is queried immediately by a positive edge at this input. The DALI device does not support transmission of the temperature per event.

bQueryHumidity

BOOL

The relative humidity is queried immediately by a positive edge at this input. The DALI device does not support transmission of the relative humidity per event.

bCancelHoldTimerOccupancyCombined

BOOL

A positive edge at this input prematurely ends the hold timer of the combined occupancy sensor and resets the output bOccupiedCombined.

bCancelHoldTimerOccupancyDirectionS

BOOL

A positive edge at this input prematurely ends the hold timer of the occupancy sensor for direction "S" and resets the output bOccupiedDirectionS.

bCancelHoldTimerOccupancyDirectionL

BOOL

A positive edge at this input prematurely ends the hold timer of the occupancy sensor for direction "L" and resets the output bOccupiedDirectionL.

FB_DALI_Steinel_Hallway_IPD 5: Outputs

VAR_OUTPUT
  bError                       : BOOL;
  ipResultMessage              : I_TcMessage;
  bInitializing                : BOOL;
  bReadingOccupancyCombined    : BOOL;
  bReadingOccupancyDirectionS  : BOOL;
  bReadingOccupancyDirectionL  : BOOL;
  bReadingBrightness           : BOOL;
  bReadingTemperature          : BOOL;
  bReadingHumidity             : BOOL;
  bOccupiedCombined            : BOOL;
  bOccupiedDirectionS          : BOOL;
  bOccupiedDirectionL          : BOOL;
  nBrightnessLevel             : UINT;
  fTemperature                 : LREAL;
  nHumidity                    : BYTE;
END_VAR

Name

Type

Description

bError

BOOL

This output is switched to TRUE if an error occurs during the execution. Further information about the error can be queried via the variable ipResultMessage. The output is set to FALSE again as soon as bBusy switches to TRUE.

ipResultMessage

I_TcMessage

Interface pointer (see error evaluation) that can be used to obtain detailed information about the processing of the function block (see runtime messages). The interface pointer is valid after bBusy has changed from TRUE to FALSE.

bInitializing

BOOL

The output is set as soon as the initialization of the DALI control device has been started, and remains active until all DALI commands have been executed.

bReadingOccupancyCombined

BOOL

The output is TRUE as long as values of the instance of the combined movement sensor are being read by the DALI control device.

bReadingOccupancyDirectionS

BOOL

The output is TRUE as long as values of the instance of the movement sensor for direction "S" are being read by the DALI control device.

bReadingOccupancyDirectionL

BOOL

The output is TRUE as long as values of the instance of the movement sensor for direction "L" are being read by the DALI control device.

bReadingBrightness

BOOL

The output is TRUE as long as values of the instance of the light sensor are being read by the DALI control device.

bReadingTemperature

BOOL

The output is TRUE as long as values of the instance of the temperature sensor are being read by the DALI control device.

bReadingHumidity

BOOL

The output is TRUE as long as values of the instance of the humidity sensor are being read by the DALI control device.

bOccupiedCombined

BOOL

If the output is TRUE, then occupancy has been detected in the detection range of the combined occupancy sensor.

bOccupiedDirectionS

BOOL

If the output is TRUE, then occupancy has been detected in the detection range of the occupancy sensor for direction "S".

bOccupiedDirectionL

BOOL

If the output is TRUE, then occupancy has been detected in the detection range of the occupancy sensor for direction "L".

nBrightnessLevel

UINT

Measured brightness value of the light sensor.

FB_DALI_Steinel_Hallway_IPD 6:

This measured value must be compared with the measured reference values at the place of operation of the DALI control device.

Name

Type

Description

fTemperature

LREAL

Measured temperature value (-5.0…60.0°C) of the temperature sensor.

nHumidity

BYTE

Measured value of the relative humidity (0…100%).

FB_DALI_Steinel_Hallway_IPD 7: Properties

All parameters that are written to the DALI control device via bInitialize are available as properties.

Name

Type

Access

Initial value

Description

bEnableBrightness

BOOL

Get, Set

TRUE

TRUE at this property enables the instance for brightness measurement. FALSE on this property causes sending of events from this instance to be disabled. However, the actual value of the instance can still be queried via the input bQueryBrightness.

bEnableOccupancyCombined

BOOL

Get, Set

TRUE

A TRUE at this property enables the instance for the combined occupancy sensor. FALSE on this property causes sending of events from this instance to be disabled. However, the actual value of the instance can still be queried via the input bQueryOccupancyCombined.

bEnableOccupancyDirectionS

BOOL

Get, Set

FALSE

TRUE at this property enables the instance for motion detection in direction "S". FALSE on this property causes sending of events from this instance to be disabled. However, the actual value of the instance can still be queried via the input bQueryOccupancyDirectionS.

bEnableOccupancyDirectionL

BOOL

Get, Set

FALSE

TRUE at this property enables the instance for motion detection in direction "L". FALSE on this property causes sending of events from this instance to be disabled. However, the actual value of the instance can still be queried via the input bQueryOccupancyDirectionL.

bEnableTemperature

BOOL

Get, Set

FALSE

TRUE at this property enables the instance for temperature measurement. FALSE at this property causes the instance not to be configured during initialization. The actual value of the instance can only be queried via the input bQueryTemperature.

bEnableHumidity

BOOL

Get, Set

FALSE

A TRUE on this property enables the instance to measure relative humidity. FALSE at this property causes the instance not to be configured during initialization. The actual value of the instance can only be queried via the input bQueryHumidity.

eEventPriorityBrightness

E_DALIEventPriority

Get, Set

MiddleLow

Setting of the event priority.

nReportTimerBrightness

BYTE

Get, Set

30 s

Time (0...255 s) after which the pending event of the

light sensor is repeated if no other event has occurred in the meantime.

nDeadtimeTimerBrightness

UINT

Get, Set

1500 ms

Dead time (0...12750 ms) to ensure that not too many events are sent in succession. An event is only sent after expiry of the dead time timer. The dead time timer is restarted each time an event is sent.

nHysteresisBrightness

BYTE

Get, set

20 %

Value (0…25 %) for calculating a hysteresis value in order to prevent frequent and disturbing changes when measuring the brightness.

nHysteresisMinBrightness

BYTE

Get, Set

10

As the percentage hysteresis can also lead to large fluctuations at low brightness, a minimum hysteresis can be specified via this property. The minimum hysteresis is an absolute value with a range from 0 to 255.

eEventPriorityOccupancyCombined

BYTE

Get, Set

Middle

Setting of the event priority.

nDeadtimeTimerOccupancyCombined

UINT

Get, Set

100 ms

Dead time (0...12750 ms) to ensure that not too many events are sent in succession. An event is only sent after expiry of the dead time timer. The dead time timer is restarted each time an event is sent.

nDetectionRangeOccupancyCombined

UINT

Get, Set

100 %

Setting of the detection range of the occupancy sensor from 0 % (small detection range) to 100 % (large detection range).
Setting this property overwrites nDetectionRangeOccupancyDirectionS and nDetectionRangeOccupancyDirectionL .

nHoldTimerOccupancyCombined

UINT

Get, Set

900 s

Hold time (1...2538 s) during which the occupancy is still active after no further motion was detected by the sensor.

nReportTimerOccupancyCombined

BYTE

Get, Set

60 s

Time (0…255 s) after which the pending event of the occupancy sensor is repeated if no other event has occurred in the meantime.

nSensitivityOccupancyCombined

BYTE

Get, Set

100 %

Setting of the sensitivity of the occupancy sensor from 0 % (low sensitivity) to 100 % (high sensitivity).
Setting this property overwrites nSensitivityOccupancyDirectionS and nSensitivityOccupancyDirectionL .

eEventPriorityOccupancyDirectionS

E_DALIEventPriority

Get, Set

Middle

Setting of the event priority.

nDeadtimeTimerOccupancyDirectionS

UINT

Get, Set

100 ms

Dead time (0...12750 ms) to ensure that not too many events are sent in succession. An event is only sent after expiry of the dead time timer. The dead time timer is restarted each time an event is sent.

nDetectionRangeOccupancyDirectionS

UINT

Get, Set

100 %

Setting of the detection range of the occupancy sensor from 0 % (small detection range) to 100 % (large detection range).

nHoldTimerOccupancyDirectionS

UINT

Get, Set

900 s

Hold time (1...2538 s) during which the occupancy is still active after no further motion was detected by the sensor.

nReportTimerOccupancyDirectionS

BYTE

Get, Set

60 s

Time (0…255 s) after which the pending event of the occupancy sensor is repeated if no other event has occurred in the meantime.

nSensitivityOccupancyDirectionS

BYTE

Get, Set

100 %

Setting of the sensitivity of the occupancy sensor from 0 % (low sensitivity) to 100 % (high sensitivity).

eEventPriorityOccupancyDirectionL

E_DALIEventPriority

Get, Set

Middle

Setting of the event priority.

nDeadtimeTimerOccupancyDirectionL

UINT

Get, Set

100 ms

Dead time (0...12750 ms) to ensure that not too many events are sent in succession. An event is only sent after expiry of the dead time timer. The dead time timer is restarted each time an event is sent.

nDetectionRangeOccupancyDirectionL

UINT

Get, Set

100 %

Setting of the detection range of the occupancy sensor from 0 % (small detection range) to 100 % (large detection range).

nHoldTimerOccupancyDirectionL

UINT

Get, Set

900 s

Hold time (1...2538 s) during which the occupancy is still active after no further motion was detected by the sensor.

nReportTimerOccupancyDirectionL

BYTE

Get, Set

60 s

Time (0…255 s) after which the pending event of the occupancy sensor is repeated if no other event has occurred in the meantime.

nSensitivityOccupancyDirectionL

BYTE

Get, Set

100 %

Setting of the sensitivity of the occupancy sensor from 0 % (low sensitivity) to 100 % (high sensitivity).

ipDALICommunication

I_DALICommunication

Get, Set

0

Interface pointer to the communication block (see Transfer of the reference to the communication block).

Requirements

Development environment

Required PLC library

TwinCAT from v3.1.4024.25

Tc3_DALI from v3.10.5.0