FB_DALIV2QueryColourValue

FB_DALIV2QueryColourValue 1:

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_QueryColorStatus() or FB_QueryRGBWAFControl ()). Further details on the variables can be found in section Variables.

Value

Description

0

x-COORDINATE

1

y-COORDINATE

2

COLOR 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

FREECOLOR 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

COLOR TEMPERATURE Tc COOLEST

129

COLOR TEMPERATURE Tc PHYSICAL COOLEST

130

COLOR TEMPERATURE Tc WARMEST

131

COLOR TEMPERATURE Tc PHYSICAL WARMEST

192

TEMPORARY x-COORDINATE

193

TEMPORARY y-COORDINATE

194

TEMPORARY COLOR 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 FREECOLOR DIMLEVEL

207

TEMPORARY RGBWAF CONTROL

208

TEMPORARY COLOR TYPE

224

REPORT x-COORDINATE

225

REPORT y-COORDINATE

226

REPORT COLOR 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 FREECOLOR DIMLEVEL

239

REPORT RGBWAF CONTROL

240

REPORT COLOR TYPE

Responses that concern an active color representation are valid only if the color representation of the requested color value is active (see FB_DALIV2QueryColorStatus()) 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 reply 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 registers) and DTR1 for all DALI control gears of the DALI line.

The function block supports the following color representations:

  • xy coordinates
  • Color temperature Tc
  • Primary (color) N
  • RGBWAF

This command belongs to the application-related expansion commands for lamps for the color/color temperature control with DALI interface. They function only if they are preceded by the Enable Device Type 8 command, which can be sent with the FB_DALIV2EnableDeviceType() function block. The Enable Device Type 8 command is internally placed automatically before all application-related expansion commands for lamps for the 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 function block is activated by a positive edge at this input.

nAddr: The address of a participating device or of a group.

eAddrType: Short address, group address or broadcast (see E_DALIV2AddrType).

eCommandPriority: Priority (high, medium or low) with which the command is processed by the library (see E_DALIV2CommandPriority).

nParameter: color value to be read out (see table above).

VAR_OUTPUT

bBusy    : BOOL;
bError   : BOOL;
nErrorId : UDINT;
nValue   : UINT;

bBusy: When the function 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 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: 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: contains the value read out.

VAR_IN_OUT

stCommandBuffer : ST_DALIV2CommandBuffer;

stCommandBuffer: Reference to the internal structure for communication with the function block FB_KL6811Communication() (KL6811) or FB_KL6821Communication() (KL6821).

Requirements

Development environment

required PLC library

TwinCAT from v3.1.4020.14

Tc2_DALI from v3.4.3.0