KL6301

KL6301 1:

This function block deals with the KL6301 EIB Bus Terminal communication. It is used for configuring the KL6301 and for starting the data exchange with the EIB network.

KL6301 2:

Restrictions

  • Only one call per instance
  • Call must be made once per PLC cycle
  • Instance must be called in the same PLC task as the send and receive blocks assigned to it
  • Maximum 64 instances per PLC project allowed

KL6301 3: Inputs

VAR_INPUT
  bActivate        : BOOL;
  idx              : INT := 1;
  EIB_PHYS_ADDR    : EIB_PHYS_ADDR;
  EIB_GROUP_FILTER : ARRAY [1..8] OF EIB_GROUP_FILTER;
  iMode            : INT;
  tTimeout         : TIME := T#5s;
END_VAR

Name

Type

Description

bActivate

BOOL

Activates the function block that configures the KL6301 and then activates the data exchange. If FALSE, any tasks that are still running will be completed and the data exchange will be terminated. If the outputs bActive and bReady are then FALSE, the function block can be reactivated.

idx

INT

If more than one bus terminal per PLC program is used, each KL6301 must have a unique idx number. Valid values from 1...64.

EIB_PHYS_ADDR

EIB_PHYS_ADDR

Physical EIB address. The default address is 1.2.3. This address must be unique in the EIB network!

EIB_GROUP_FILTER

ARRAY OF EIB_GROUP_FILTER

Group address filter. A maximum of 8 filters are possible.

iMode

INT

0 - For firmware B0 and higher - 4 filters with 64 entries each
1 - For firmware B1 and higher - 8 filters with 32 entries each
2 - For firmware B3 and higher - 8 filters, each with 32 inverted entries. In the case of cross communication within the KNX/EIB network of telegrams that are not connected with the KL6301, care must be taken to ensure that these group addresses are contained in the filter so that the terminal does not send an ACK.
100 - For Firmware B1 and higher - Monitor function, all group address telegrams are received. The telegrams are not acknowledged (no ACK is sent). Sending is disabled in this mode.

tTimeout

TIME

Time allowed for a transmit function block to transmit an EIB telegram before a timeout is signaled.

KL6301 4: Inputs/outputs

VAR_IN_OUT
  KL6301_IN  : ARRAY [1..24] OF BYTE;
  KL6301_OUT : ARRAY [1..24] OF BYTE;
END_VAR

Name

Type

Description

KL6301_IN

ARRAY OF BYTE

Is linked with the KL6301 input addresses.

KL6301_OUT

ARRAY OF BYTE

Is linked with the KL6301 output addresses.

KL6301 5: Outputs

VAR_OUTPUT
  bActive      : BOOL;
  bReady       : BOOL;
  bError       : BOOL;
  iErrorId     : EIB_Error_Code;
  str_Data_Rec : EIB_REC;
END_VAR

Name

Type

Description

bActive

BOOL

The function block was activated.

bReady

BOOL

The function block is ready for sending and receiving data.

bError

BOOL

This output goes TRUE as soon as an error occurs. This error is described via the iErrorId variable.

iErrorId

EIB_ERROR_CODE

iErrorId: The output issues an error code in the event of an error. bError goes TRUE at the same time.

str_Data_Rec

EIB_REC

Connected with the send and receive function blocks.

Requirements

Development environment

required TC3 PLC library

TwinCAT from v3.1.4020.14

Tc2_EIB from 3.3.4.0