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 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.

FB_Rec_Teach_In 2: 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

STR_KL6581

Is connected to the data structure of the function block FB_KL6581().

FB_Rec_Teach_In 3: Outputs

VAR_OUTPUT
  bLearnType   : BOOL;
  by_Node      : BYTE;
  dw_ID        : DWORD;
  str_Teach_In : STR_Teach_In;
  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

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.

Requirements

Development environment

required TC3 PLC library

TwinCAT v3.1.4020.14

Tc2_EnOcean from v3.3.5.0