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

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;

bActivate: 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: 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: Physical EIB address (see EIB_PHYS_ADDR). Default address is 1.2.3. This address must be unique in the EIB network!

EIB_GROUP_FILTER: Filter for the group addresses (see EIB_GROUP_FILTER). A maximum of 8 filters are possible.

iMode:
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 EIB/KNX 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 receives. The telegrams are not acknowledged (no ACK is sent). Sending is disabled in monitor mode.

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

VAR_OUTPUT

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

bActive: The function block has been activated.

bReady: The function block is ready for sending and receiving data.

bError: The output becomes TRUE as soon as an error occurs. This error is described via the iErrorId variable.

iErrorId: An error code is available at this output in the event of an error (see EIB_ERROR_CODE). bError goes TRUE at the same time.

str_Data_Rec: Data structure that is connected to the send and receive blocks (see EIB_REC).

VAR_IN_OUT

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

KL6301_IN: Linked with the KL6301 input addresses.

KL6301_OUT: Linked with the KL6301 output addresses.