FB_DALI102Addressing
This function block addresses the DALI control gears at random. The user has no influence on which DALI control gear is assigned which short address. Short addresses are allocated in ascending order.
Applying a positive edge to the bStart input starts the function block, and the bBusy output goes TRUE. Depending on the selected options (parameter nOptions) the group membership and scenes are subsequently deleted. The terminal now addresses all DALI control gears independently. Once all DALI control gears have been addressed, the bBusy output goes back to FALSE. The nAddressedDevices output variable supplies information about how many DALI control gears have received a short address. Processing this function block can take several minutes, depending on how many DALI control gears are attached.
Inputs
VAR_INPUT
bStart : BOOL;
nStartWithShortAddress : BYTE := 0;
nOptions : DWORD := Tc3_DALI.GVL.cOpticalFeedback;
END_VAR
Name | Type | Description |
---|---|---|
bStart | BOOL | Execution of the DALI commands is triggered via a positive edge at this input. |
nStartWithShortAddress | BYTE | Short address, assigned to the first DALI control gear (0...63). |
nOptions | DWORD | Options for addressing the DALI control gears (see table below). The individual constants must be linked with OR operators. |
Constant | Description |
---|---|
Tc3_DALI.GVL.cCompleteNewInstallation | All DALI control gears are re-addressed, including control gears that already have a short address. |
Tc3_DALI.GVL.cDeleteAllGroupAssignments | Before addressing commences, any group assignments are deleted for all DALI control gears, including those that are not actually addressed. |
Tc3_DALI.GVL.cDeleteAllSceneAssignments | Before addressing commences, any scene assignments are deleted for all DALI control gears, including those that are not actually addressed. |
Tc3_DALI.GVL.cOpticalFeedback | Prior to addressing, all control gears are set to minLevel. Newly addressed DALI control gears are assigned maxLevel brightness after assignment of the short address. |
Outputs
VAR_OUTPUT
bError : BOOL;
ipResultMessage : I_TcMessage;
bBusy : BOOL;
nAddressedDevices : BYTE;
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. |
nAddressedDevices | BYTE | If addressing has been completed (bBusy is FALSE), then the number of addressed control gears is shown at this output. |
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.4022.29 | Tc3_DALI from v3.1.4.0 |