FB_DALIV2xOsramProfPushbuttonCoupler

FB_DALIV2xOsramProfPushbuttonCoupler 1:

FB_DALIV2xOsramProfPushbuttonCoupler 2:

This function block is used as an example and is therefore not included in the library. The function block can be downloaded as an export file and imported into the desired project. Adjustments can be made as required.

This function block evaluates the status of the digital input of the Osram DALI Professional Pushbutton Coupler. This function block can also be used to initialize the DALI control units.

The DALI control unit has a short address. The device does not fully comply with the IEC 62386 standard and uses a company-specific protocol instead.

Download the TwinCAT 2 PLC Control export file: FB_DALIV2xOsramProfPushbuttonCoupler.zip

VAR_INPUT

bInitialize       : BOOL := FALSE;
nAddr             : BYTE;

bInitialize: The DALI controller is initialized by a positive edge at this input. The parameters are written to the DALI control unit which must be accessible via the short addresses nPIRAddr and nLSAddr. The output bInitializing is TRUE during initialization.

nAddr: Short address of the DALI control unit.

Further details about the parameters can be found in the manufacturer's documentation.

VAR_OUTPUT

bInitializing : BOOL;
bError        : BOOL;
nErrorId      : UDINT;
nDeviceStatus : BYTE;
bPushbutton   : BOOL;

bInitializing: This output is TRUE during initialization.

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.

nErrorId: Contains the command-specific error code of the most recently executed command. See Error codes.

nDeviceStatus: Before the initialization, the status of the DALI control unit is queried and output to this output.

bPushbutton: This output indicates the actual value of the digital input.

VAR_IN_OUT

stCommandBuffer   : ST_DALIV2CommandBuffer;

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

Requirements

Development environment

Target system

Required libraries

TwinCAT 2.11 R3/x64 from build 2260

PC/CX, BX or BC

TcDALIV2 library from V2.12.0