FB_KL6581

FB_KL6581 1:

This function block takes care of communication with the KL6581 EnOcean master terminal. The KL6581 is configured and the data exchange with the EnOcean network is started via this block.

FB_KL6581 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

bInit         : BOOL;
nIdx          : USINT := 1;

bInit: Activates the block that configures the KL6581 first and then activates the data exchange, if the input remains TRUE.

nIdx: The idx number must be unique for each KL6581 (valid values: 1 to 64) if more than one Bus Terminal is used per PLC program.

VAR_OUTPUT

bReady        : BOOL;
bBusy         : BOOL;
bError        : BOOL;
iErrorID      : E_KL6581_Err;
str_KL6581    : STR_KL6581;

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

bBusy: The block is active.

bError: If the function-block is in an error-state, this output will be set to TRUE. This error is described by the variable iErrorID.

iErrorID: Type of error (see E_KL6581_Err).

str_KL6581: Data structure that is connected to the send and receive function blocks (see STR_KL6581).

VAR_IN_OUT

stKL6581_in       : KL6581_Input;
stKL6581_out      : KL6581_Output;

stKL6581_in: Is linked in System Manager to the input addresses of the KL6581 (see KL6581_Input).

stKL6581_out: Is linked in System Manager to the output addresses of the KL6581 (see KL6581_Output).