FB_Send_Generic

FB_Send_Generic 1:

This function block sends data via EnOcean. The type and the data contents are arbitrary. All kinds of EnOcean data telegrams can be sent with this block.

VAR_INPUT

bStart       : BOOL;
by_Node      : BYTE;
by_ORG       : E_EnOcean_Org;
pt_SendData  : DWORD;
by_STATE     : BYTE;
nEnOceanID   : BYTE;
str_KL6581   : STR_KL6581;

bStart: A rising edge sends the data.

by_Node: Address of the EnOcean transmitter and receiver KL6583-0000 to which the telegram is to be sent (valid values: 1 to 8).

by_ORG: ORG field of the EnOcean telegram.

pt_SendData: Pointer to the data which are to be sent; the pointer address is determined with ADR. The pointer must point to a 4-byte variable.

by_STATE: EnOcean STATE, can be changed by the TCM module.

nEnOceanID: Virtual EnOcean ID; a value of 0 to 127 is added to the real EnOcean ID (valid values: 0 to 127).

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

VAR_OUTPUT

bBusy        : BOOL;
bError       : BOOL;
iErrorID     : E_KL6581_Err;

bBusy: Block is is busy, no new data can be sent at the moment.

bError: If the function-block is in an error-state, this output will be set to TRUE. This error is described by the variable iErrorID.

iErrorID: Type of error (see E_KL6581_Err).