FB_Rec_1BS 1:

This function block receives data that were received via EnOcean. This block is used for integration of window contacts, for example (ORG field 6).


str_KL6581 : STR_KL6581;
byNode     : BYTE;
dw_ID      : DWORD;

str_KL6581: Is linked with the data structure of block FB_KL6581() (see STR_KL6581).

byNode: Filter - if the value is zero the EnOcean telegrams from all KL6583s are received. If a value of 1 to 8 is entered, only the data from the corresponding KL6583 are received.

dw_ID: EnOcean ID to be received.


bOpen    : BOOL;
bClose   : BOOL;
bLRN     : BOOL;
by_Node  : BYTE;
bReceive : BOOL := TRUE;

bOpen: Contact open.

bClose: Contact closed.

bLRN: LRN button pressed.

by_Node: Node number of the KL6583 that has received the EnOcean telegram.

bReceive: On receiving an EnOcean telegram this value is set to FALSE for one cycle.


Development environment

required TC3 PLC library

TwinCAT v3.1.4020.14

Tc2_EnOcean from v3.3.5.0