FB_EnOceanReceive

FB_EnOceanReceive 1:

The function block FB_EnOceanReceive() is a receive block, which makes the telegrams sent by the EnOcean modules available in the structure stEnOceanReceivedData. This structure can then be analyzed with further blocks. The documentation for this blocks also includes sample programs, which illustrate the operating principle.

FB_EnOceanReceive 2: Inputs

VAR_INPUT
  bEnable     : BOOL := FALSE;
END_VAR

Name

Type

Description

bEnable

BOOL

A positive signal at this input activates the function block. A negative signal at the input disables the function block functionality.

FB_EnOceanReceive 3: Inputs/outputs

VAR_IN_OUT
  stEnOceanInData  : ST_EnOceanInData;
  stEnOceanOutData : ST_EnOceanOutData;
END_VAR

Name

Type

Description

stEnOceanInData

ST_EnOceanInData

Is linked to the input addresses of the KL6021-0023 in the System Manager.

stEnOceanOutData

ST_EnOceanOutData

Is linked to the output addresses of the KL6021-0023 in the System Manager.

FB_EnOceanReceive 4: Outputs

VAR_OUTPUT
  bError                : BOOL := FALSE;
  nErrorId              : UDINT := 0;
  stEnOceanReceivedData : ST_EnOceanReceivedData;
END_VAR

Name

Type

Description

bError

BOOL

This output goes TRUE as soon as an error occurs. This error is described via the variable nErrorID.

nErrorId

UDINT

Describes the type of error.

stEnOceanReceivedData

ST_EnOceanReceivedData

The received data is stored in this structure.

Requirements

Development environment

required TC3 PLC library

TwinCAT v3.1.4020.14

Tc2_EnOcean from v3.3.5.0