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 out directly via DALI commands (e.g. FB_QueryColourStatus() or FB_QueryRGBWAFControl()). Further details on the variables can be found here.
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 capable or reconverting 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 DTR (Data Transfer Register) and DTR1 of all DALI control gears in the DALI line are changed by the function block.
The function block supports the following 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(). From version 2.6.0 of the libraries TcDALIV2 and TcDALIV2AppExtCmds, however, the Enable Device Type 8 command is internally placed automatically before all application extended commands for lamps for color/color temperature control with DALI interface. |
VAR_INPUT
bStart : BOOL;
nAddr : BYTE;
eAddrType : E_DALIV2AddrType := eDALIV2AddrTypeShort;
eCommandPriority : E_DALIV2CommandPriority := eDALIV2CommandPriorityMiddle;
nParameter : BYTE;
bStart: The block is activated by a rising edge at this input.
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.
nParameter: Colour value to be read out (see table above).
VAR_OUTPUT
bBusy : BOOL;
bError : BOOL;
nErrorId : UDINT;
nValue : UINT;
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.
nValue: Contains the value read out.
VAR_IN_OUT
stCommandBuffer : ST_DALIV2CommandBuffer;
stCommandBuffer: A reference to the structure for communication with the FB_DALIV2Communication() (KL6811) or FB_KL6821Communication() (KL6821) block.
Requirements
Development environment | Target system | Required libraries |
---|---|---|
TwinCAT 2.11 R3/x64 from Build 2244 | PC/CX, BX or BC | TcDALIV2 library from V2.10.0 |