FB_DALIV2SendDALICommand

FB_DALIV2SendDALICommand 1:

This function-block sends a single DALI-command defined by the command-number and, if applicable, by a parameter-value. Moreover it is possible it is possible to decide, if the command is to be sent twice and whether the function-block has to wait for an answer. The last mentioned option is very useful to send fast sequences of commands which do not require an answer from the device, such as the step-up-command.

VAR_INPUT

bStart                       : BOOL;
nAddr                        : BYTE;
eAddrType                    : E_DALIV2AddrType := eDALIV2AddrTypeShort;
eCommandPriority             : E_DALIV2CommandPriority := eDALIV2CommandPriorityMiddle;
nCommand                     : INT;
nParameter                   : BYTE;
bWaitingForDALISlaveResponse : BOOL;
bRepeatCommand               : BOOL;
bSuppressResponseBuffer      : BOOL;
nDeviceType                  : 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.

nCommand: The number of the DALI-command.

nParameter: Parameter to hand over command-specific values, eg. go to scene xxx.

bWaitingForDALISlaveResponse: If this input is set to FALSE, the function-block will not wait for an answer of the DALI-device. This feature doesn´t make any sense in combination with query-commands, of course.

bRepeatCommand: The command will be repeated, if this input is set to TRUE.

bSuppressResponseBuffer: If set to TRUE, the answer of the function block FB_DALIV2Communication() will not be put into the internal software-buffer.

nDeviceType: Identifier for the device type.

Value

Description

0

Standard device

1

Device for emergency lighting.

2

Device for discharge lamps.

3

Device for low-voltage halogen lamps.

4

Device for dimming bulbs.

5

Device for converting digital signals into DC signals.

6

Device for light emitting diodes (LEDs).

7

Switching function.

8

Device for colour/colour temperature control.

VAR_OUTPUT

bBusy            : BOOL;
bError           : BOOL;
nErrorId         : UDINT;
nResponseData    : BYTE;

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.

nResponseData: The received value of the DALI ballast, if a query command is invoked.

VAR_IN_OUT

stCommandBuffer          : ST_DALIV2CommandBuffer;

stCommandBuffer: A reference to the structure for communication with the FB_DALIV2Communication() (KL6811) or FB_KL6821Communication() (KL6821) block.