FB_KL6581
This function block takes care of communication with the KL6581 EnOcean Bus Terminal. The KL6581 is configured and data exchange with the EnOcean network is started via this block.
Restrictions:
- This block may only be called once per KL6581!
- In the PLC project this block may only be called once per cycle!
- A PLC project may contain a maximum of 64 KL6581 terminals!
VAR_INPUT
bInit : BOOL;
nIdx : USINT := 1;
bInit: Activates the block that configures the KL6301 and then activates the data exchange.
nIdx: The idx number must be unique for each KL6581, if more than one Bus Terminal per PLC program is used (valid values: 1...64).
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: this output goes TRUE as soon as an error occurs. This error is described via the iErrorId variable.
iErrorID: Describes the error type (see E_KL6581_Err).
str_KL6581: Is linked to the send and receive blocks (see STR_KL6581).
VAR_IN_OUT
stKL6581_in : KL6581_Input;
stKL6581_out : KL6581_Output;
stKL6581_in: Is linked to the input addresses of the KL6581 in the System Manager (see KL6581_Input).
stKL6581_out: Is linked to the output addresses of the KL6581 in the System Manager (see KL6581_Output).
Requirements
Development environment | required TC3 PLC library |
---|---|
TwinCAT v3.1.4020.14 | Tc2_EnOcean from v3.3.5.0 |