FB_Rec_Teach_In_Ex
This function block indicates when a learn button is pressed on an EnOcean device. If the flag bLearnType is set, further information about the EnOcean device can be read. This function must be provided by the EnOcean device. So far, however, it is only supported by very few EnOcean devices.
In addition to the FB_Rec_Teach_In() function block, the system also checks whether it is an EEP telegram.
Inputs
VAR_INPUT
bStart : BOOL;
byNode : BYTE;
str_KL6581 : STR_KL6581;
END_VAR
Name | Type | Description |
---|---|---|
bStart | BOOL | If TRUE the function block is enabled, if FALSE it is disabled. |
byNode | BYTE | 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. |
str_KL6581 | Is connected to the data structure of the function block FB_KL6581(). |
Requirements
Development environment | required TC3 PLC library |
---|---|
TwinCAT v3.1.4020.32 | Tc2_EnOcean from v3.4.6.0 |
Outputs
VAR_OUTPUT
bLearnType : BOOL;
by_Node : BYTE;
dw_ID : DWORD;
str_Teach_In : STR_Teach;
bReceive : BOOL := TRUE;
END_VAR
Name | Type | Description |
---|---|---|
bLearnType | BOOL | If the bit is set you will find further data in the structure str_Teach_In. |
by_Node | BYTE | Number of EnOcean devices found. |
dw_ID | DWORD | EnOcean ID for which the Learn button was pressed. |
str_Teach_In | Data structure, profile, type and manufacturer ID. | |
bReceive | BOOL | On receiving an EnOcean telegram this value is set to FALSE for one cycle. |