FB_EnOcean_Search

FB_EnOcean_Search 1:

This function block displays all EnOcean IDs that it has received and enters them in a reception array, ar_ID. Up to 256 EnOcean devices can be recognized. Alternatively the block can also be created separately for each EnOcean transmitter and receiver KL6583-0000. This allows you to recognize whether an EnOcean device is received by several KL6583s.

VAR_INPUT

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

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

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

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.

VAR_OUTPUT

bReceive    : BOOL:=TRUE;
iDevices    : INT;
ar_ID       : ARRAY [0..255] OF DWORD;

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

iDevices: Number of EnOcean devices found.

ar_ID: EnOcean IDs that were found.