FB_DALIV2QueryColourValue

The specified variable (color value) is read from the DALI control gear. The value to be read is defined by nParameter (see table below).
Certain variables can be read directly via DALI commands (e.g. FB_QueryColourStatus or FB_QueryRGBWAFControl). Further details on the variables can be found in section Variables.
Value |
Description |
---|---|
0 |
x-COORDINATE |
1 |
y-COORDINATE |
2 |
COLOUR TEMPERATURE Tc |
3 |
PRIMARY N DIMLEVEL 0 |
4 |
PRIMARY N DIMLEVEL 1 |
5 |
PRIMARY N DIMLEVEL 2 |
6 |
PRIMARY N DIMLEVEL 3 |
7 |
PRIMARY N DIMLEVEL 4 |
8 |
PRIMARY N DIMLEVEL 5 |
9 |
RED DIMLEVEL |
10 |
GREEN DIMLEVEL |
11 |
BLUE DIMLEVEL |
12 |
WHITE DIMLEVEL |
13 |
AMBER DIMLEVEL |
14 |
FREECOLOUR DIMLEVEL |
15 |
RGBWAF CONTROL |
64 |
x-COORDINATE PRIMARY N 0 |
65 |
y-COORDINATE PRIMARY N 0 |
66 |
TY PRIMARY N 0 |
67 |
x-COORDINATE PRIMARY N 1 |
68 |
y-COORDINATE PRIMARY N 1 |
69 |
TY PRIMARY N 1 |
70 |
x-COORDINATE PRIMARY N 2 |
71 |
y-COORDINATE PRIMARY N 2 |
72 |
TY PRIMARY N 2 |
73 |
x-COORDINATE PRIMARY N 3 |
74 |
y-COORDINATE PRIMARY N 3 |
75 |
TY PRIMARY N 3 |
76 |
x-COORDINATE PRIMARY N 4 |
77 |
y-COORDINATE PRIMARY N 4 |
78 |
TY PRIMARY N 4 |
79 |
x-COORDINATE PRIMARY N 5 |
80 |
y-COORDINATE PRIMARY N 5 |
81 |
TY PRIMARY N 5 |
82 |
NUMBER OF PRIMARIES |
128 |
COLOUR TEMPERATURE Tc COOLEST |
129 |
COLOUR TEMPERATURE Tc PHYSICAL COOLEST |
130 |
COLOUR TEMPERATURE Tc WARMEST |
131 |
COLOUR TEMPERATURE Tc PHYSICAL WARMEST |
192 |
TEMPORARY x-COORDINATE |
193 |
TEMPORARY y-COORDINATE |
194 |
TEMPORARY COLOUR TEMPERATURE Tc |
195 |
TEMPORARY PRIMARY N DIMLEVEL 0 |
196 |
TEMPORARY PRIMARY N DIMLEVEL 1 |
197 |
TEMPORARY PRIMARY N DIMLEVEL 2 |
198 |
TEMPORARY PRIMARY N DIMLEVEL 3 |
199 |
TEMPORARY PRIMARY N DIMLEVEL 4 |
200 |
TEMPORARY PRIMARY N DIMLEVEL 5 |
201 |
TEMPORARY RED DIMLEVEL |
202 |
TEMPORARY GREEN DIMLEVEL |
203 |
TEMPORARY BLUE DIMLEVEL |
204 |
TEMPORARY WHITE DIMLEVEL |
205 |
TEMPORARY AMBER DIMLEVEL |
206 |
TEMPORARY FREECOLOUR DIMLEVEL |
207 |
TEMPORARY RGBWAF CONTROL |
208 |
TEMPORARY COLOUR TYPE |
224 |
REPORT x-COORDINATE |
225 |
REPORT y-COORDINATE |
226 |
REPORT COLOUR TEMPERATURE Tc |
227 |
REPORT PRIMARY N DIMLEVEL 0 |
228 |
REPORT PRIMARY N DIMLEVEL 1 |
229 |
REPORT PRIMARY N DIMLEVEL 2 |
230 |
REPORT PRIMARY N DIMLEVEL 3 |
231 |
REPORT PRIMARY N DIMLEVEL 4 |
232 |
REPORT PRIMARY N DIMLEVEL 5 |
233 |
REPORT RED DIMLEVEL |
234 |
REPORT GREEN DIMLEVEL |
235 |
REPORT BLUE DIMLEVEL |
236 |
REPORT WHITE DIMLEVEL |
237 |
REPORT AMBER DIMLEVEL |
238 |
REPORT FREECOLOUR DIMLEVEL |
239 |
REPORT RGBWAF CONTROL |
240 |
REPORT COLOUR TYPE |
Responses that concern an active color representation are valid only if the color representation of the requested color value is active (see FB_DALIV2QueryColourStatus) or if the control gear is able to perform a recalculation of the demanded color value from the active color representation to a color value of another color representation.
The response must be 255 (MASK) if the control gear does not know the coordinates or if the primary color is not present.
The function block changes the DTR (Data Transfer Register) and DTR1 for all DALI control gears of the DALI line.
The function block supports the color representations:
- xy coordinates
- Color temperature Tc
- Primary (color) N
- RGBWAF
![]() | This command belongs to the application extended commands for lamps for the color/color temperature control with DALI interface. These only work if they are preceded by the Enable Device Type 8 command, which can be sent with the function block FB_DALIV2EnableDeviceType. The command Enable Device Type 8 is internally placed automatically before all application extended commands for lamps for the color/color temperature control with DALI interface. |
Inputs
VAR_INPUT
bStart : BOOL;
nAddr : BYTE;
eAddrType : E_DALIV2AddrType := eDALIV2AddrTypeShort;
eCommandPriority : E_DALIV2CommandPriority := eDALIV2CommandPriorityMiddle;
nParameter : BYTE;
END_VAR
Name | Type | Description |
---|---|---|
bStart | BOOL | The function block is activated by a positive edge at this input. |
nAddr | BYTE | The address of a device or of a group |
eAddrType | Short address, group address or broadcast | |
eCommandPriority | Priority (high, medium or low) with which the command is processed by the library. | |
nParameter | BYTE | Color value to be read (see table above). |
Inputs/outputs
VAR_IN_OUT
stCommandBuffer : ST_DALIV2CommandBuffer;
END_VAR
Name | Type | Description |
---|---|---|
stCommandBuffer | ST_DALIV2CommandBuffer | Reference to the internal structure for communication with FB_KL6811Communication (KL6811) or FB_KL6821Communication (KL6821). |
Outputs
VAR_OUTPUT
bBusy : BOOL;
bError : BOOL;
nErrorId : UDINT;
nValue : UINT;
END_VAR
Name | Type | Description |
---|---|---|
bBusy | BOOL | When the function block is activated the output is set, and it remains active until execution of the command has been completed. |
bError | BOOL | This output is switched to TRUE as soon as 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 a command at the inputs. |
nErrorId | UDINT | Contains the command-specific error code of the most recently executed command. Is reset to 0 by the execution of a command at the inputs (see error codes). |
nValue | UINT | Contains the read value. |
Requirements
Development Environment | PLC library to include |
---|---|
TwinCAT from v3.1.4020.14 | Tc2_DALI from v3.4.3.0 |