FB_DALI_Tridonic_PCell_SSI_31_PC_DA2_SA

FB_DALI_Tridonic_PCell_SSI_31_PC_DA2_SA 1:

The function block represents the DALI light sensor PCell SSI 31 PC DA2 SA from Tridonic.

This outputs four brightness values (instances 0 to 3).

For information on the exact functions of the individual instances, please refer to the vendor's device documentation.

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

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 reading of the corresponding instance can be triggered immediately via the input variable bQueryBrightnessN, even if the corresponding instance is not enabled.

FB_DALI_Tridonic_PCell_SSI_31_PC_DA2_SA 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_Tridonic_PCell_SSI_31_PC_DA2_SA 3:

The function block cannot be used when using the KL6811.

FB_DALI_Tridonic_PCell_SSI_31_PC_DA2_SA 4: Inputs

VAR_INPUT
  bInitialize                 : BOOL  := FALSE;
  nShortAddress               : BYTE  := 0;
  nOptions                    : DWORD := 0;
  bQueryBrightness1           : BOOL  := FALSE;
  bQueryBrightness2           : BOOL  := FALSE;
  bQueryBrightness3           : BOOL  := FALSE;
  bQueryBrightness4           : 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.

bQueryBrightnessN

BOOL

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

FB_DALI_Tridonic_PCell_SSI_31_PC_DA2_SA 5: Outputs

VAR_OUTPUT
  bError                     : BOOL;
  ipResultMessage            : I_TcMessage;
  bInitializing              : BOOL;
  bReadingBrightness1        : BOOL;
  bReadingBrightness2        : BOOL;
  bReadingBrightness3        : BOOL;
  bReadingBrightness4        : BOOL;
  nBrightnessLevel1          : UINT;
  nBrightnessLevel2          : UINT;
  nBrightnessLevel3          : UINT;
  nBrightnessLevel4          : UINT;
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.

bReadingBrightnessN

BOOL

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

nBrightnessLevelN

UINT

Measured brightness value of the light sensor.

FB_DALI_Tridonic_PCell_SSI_31_PC_DA2_SA 6:

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

FB_DALI_Tridonic_PCell_SSI_31_PC_DA2_SA 7: Properties

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

The properties of instances of the same type are listed only once in the table and marked with N at the end.

Name

Type

Access

Initial value

Description

bEnableBrightnessN

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 bQueryBrightnessN.

eEventPriorityBrightnessN

E_DALIEventPriority

Get, Set

MiddleLow

Setting of the event priority.

nReportTimerBrightnessN

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.

nDeadtimeTimerBrightnessN

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 after an event has been sent.

nHysteresisBrightnessN

BYTE

Get, Set

5 %

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

nHysteresisMinBrightnessN

BYTE

Get, Set

255

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.

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.64

Tc3_DALI from v3.20.3.0