FB_DALIV2xOsramProfPushbuttonCoupler

FB_DALIV2xOsramProfPushbuttonCoupler 1:
FB_DALIV2xOsramProfPushbuttonCoupler 2:

The function block FB_DALIV2xOsramProfPushbuttonCoupler serves as an example and is 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.

The function block FB_DALIV2xOsramProfPushbuttonCoupler evaluates the state of the digital input of the Osram DALI Professional Pushbutton Coupler. This function block can also be used to initialize the DALI control device.

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

Download the TwinCAT 3 PLCopenXML file: FB_DALIV2xOsramProfPushbuttonCoupler.zip

FB_DALIV2xOsramProfPushbuttonCoupler 3: Inputs

VAR_INPUT
  bInitialize       : BOOL := FALSE;
  nAddr             : BYTE;
END_VAR

Name

Type

Description

bInitialize

BOOL

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

nAddr

BYTE

Short address of the DALI control device

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

FB_DALIV2xOsramProfPushbuttonCoupler 4: Inputs/outputs

VAR_IN_OUT
  stCommandBuffer   : ST_DALIV2CommandBuffer;
END_VAR

Name

Type

Description

stCommandBuffer

ST_DALIV2CommandBuffer

Reference to the internal structure for communication with FB_KL6821Communication (KL6821).

FB_DALIV2xOsramProfPushbuttonCoupler 5: Outputs

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

Name

Type

Description

bInitializing

BOOL

This output is TRUE during initialization.

bError

BOOL

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

UDINT

Contains the command-specific error code of the most recently executed command (see error codes).

nDeviceStatus

BYTE

Before the initialization, the status of the DALI control device is queried and output to this output.

bPushbutton

BOOL

This output indicates the actual value of the digital input.

Requirements

Development Environment

PLC library to include

TwinCAT from v3.1.4022.4

Tc2_DALI from v3.6.2.0