FB_DALI209QuerySceneValues

The function block reads the output values from the DALI control gear for the specified scene nScene.
![]() | In addition to the DALI command QUERY SCENE LEVEL, the function block sends the DALI commands QUERY COLOUR VALUE and ENABLE DEVICE TYPE 8, as is necessary for application extended commands (see FB_DALI102EnableDeviceType). |
![]() | The function block changes the DTR0 of all connected DALI control gears. |
The outputs only contain valid values if the function block was executed without errors (bError = FALSE).
Inputs
VAR_INPUT
bStart : BOOL;
nAddress : BYTE;
eAddressType : E_DALIAddressType := E_DALIAddressType.Short;
eCommandPriority : E_DALICommandPriority := E_DALICommandPriority.MiddleLow;
nScene : USINT;
END_VAR
Name | Type | Description |
---|---|---|
bStart | BOOL | Execution of the DALI commands is triggered via a positive edge at this input. |
nAddress | BYTE | Address of a DALI control gear or a DALI group. |
eAddressType | Defines whether the input nAddress contains a short address (0…63) or a group address (0…15). The input nAddress has no meaning if a broadcast or a broadcast to unaddressed devices (BroadcastUnaddr) has been selected. | |
eCommandPriority | Priority (low, middle low, middle, middle high, high) with which the DALI commands are sent. |
![]() | eCommandPriority has no function with the KL6811. The DALI command priorities are supported by the KL6821 from the firmware version BD. |
Name | Type | Description |
---|---|---|
nScene | USINT | Scene whose output value is to be read (0…15). |
Outputs
VAR_OUTPUT
bError : BOOL;
ipResultMessage : I_TcMessage;
bBusy : BOOL;
nSceneLevel : USINT;
eColourType : E_DALIColourType;
nXCoordinate : UINT;
nYCoordinate : UINT;
nColourTemperatureTc : UINT;
nPrimaryColour0 : UINT;
nPrimaryColour1 : UINT;
nPrimaryColour2 : UINT;
nPrimaryColour3 : UINT;
nPrimaryColour4 : UINT;
nPrimaryColour5 : UINT;
nRedDimLevel : USINT;
nGreenDimLevel : USINT;
nBlueDimLevel : USINT;
nWhiteDimLevel : USINT;
nAmberDimLevel : USINT;
nFreeColourDimLevel : USINT;
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. |
bBusy | BOOL | The output is set as soon as execution of the DALI commands has commenced. It remains active until all DALI commands have been processed. |
nSceneLevel | USINT | Output value of the desired scene (0…255). |
eColourType | E_DALIColourType | Specifies the color setting with which the DALI control gear is operated (see colourType). |
nXCoordinate | UINT | Output of the x-value of the color representation according to xy color type (see X-coordinate) in the color setting Xy coordinates (see color representation). |
nYCoordinate | UINT | Output of the y-value of the color representation according to xy color type (see Y-coordinate) in the color setting Xy coordinates (see color representation). |
nColourTemperatureTc | UINT | Output of the color temperature (see colourTemperatureTc) in the setting Color temperature Tc (see color representation). |
nPrimaryColourN | UINT | Output of the color representation on the corresponding output channel on the operating device in the color setting Primary color N (see color representation). |
nRedDimLevel | USINT | Output of the red dimming level (see DimLevel) in the color setting RGBWAF (see color representation). |
nGreenDimLevel | USINT | Output of the green dimming level (see DimLevel) in the color setting RGBWAF (see color representation). |
nBlueDimLevel | USINT | Output of the blue dimming level (see DimLevel) in the color setting RGBWAF (see color representation). |
nWhiteDimLevel | USINT | Output of the white dimming level (see DimLevel) in the color setting RGBWAF (see color representation). |
nAmberDimLevel | USINT | Output of the amber dimming level (see DimLevel) in the color setting RGBWAF (see color representation). |
nFreeColourDimLevel | USINT | Output of the dimming level of the freely selectable color (see DimLevel) in the color setting RGBWAF (see color representation). |
Properties
Name | Type | Access | Initial value | Description |
---|---|---|---|---|
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.11 | Tc3_DALI from v3.5.0.0 |