FB_Rec_Teach_In

FB_Rec_Teach_In 1:

This function block indicates when a learn button is pressed on an EnOcean device. If the bLearnType flag is set, then further information can be read out from the EnOcean device. This function must be provided by the EnOcean device. (So far, it is only supported by very few EnOcean devices).

VAR_INPUT

bStart        : BOOL;
byNode        : BYTE;
str_KL6581    : STR_KL6581;

bStart: If TRUE the block is active, if FALSE it is deactivated.

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

str_KL6581: Data structure that is connected to the FB_KL6581() function block (see STR_KL6581).

VAR_OUTPUT

bLearnType    : BOOL;
by_Node       : BYTE;
dw_ID         : DWORD;
str_Teach_In  : STR_Teach_In;
bReceive      : BOOL := TRUE;

bLearnType: If the bit is set you will find further data in the str_Teach_In structure.

by_Node: Number of EnOcean devices found.

dw_ID: EnOcean IDs where a learn button was pressed.

str_Teach_In: Data structure - Manufacturer ID, type and profile (see STR_Teach_In).

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