ST_MBUS_Communication

Internal structure.

This structure is used to link the function block FB_MBUSKL6781() with the meter blocks.

TYPE ST_MBUS_Communication :
STRUCT
  bStart           : BOOL;
  bBusy            : BOOL;
  bSND_NKE         : BOOL;
  bSend            : BOOL;
  bStartManuell    : BOOL;
  bBlockadeSecAdr  : BOOL;
  usiAddress       : USINT;
  byCField         : BYTE;
  stSecAdr         : ST_MBUS_SecAdr;
  eError           : E_MBUS_ERROR;
  eBaudrate        : E_MBUS_Baudrate := eMBUS_Baud2400;
  arrMBusLongFrame : ARRAY[1..260] OF BYTE;
  bySendByte       : BYTE;
  uiMaxCount       : UINT;
  uiCount          : UINT;
  stKomRxBuffer    : ST_KL6781ComBuffer;
  stKomTxBuffer    : ST_KL6781ComBuffer;
END_STRUCT
END_TYPE

Name

Type

Description

bStart

BOOL

Start

bBusy

BOOL

This bit is set for as long as the function block is active.

bSND_NKE

BOOL

SND_NKE is sent.

bSend

BOOL

Data is being sent.

bStartManual

BOOL

Manual start

bBlockadeSecAdr

BOOL

Secondary addressing results in blocking.

usiAddress

USINT

Primary address

byCField

BYTE

C field

stSecAdr

ST_MBUS_SecAdr

Secondary address

eError

E_MBUS_ERROR

Error number

eBaudrate

E_MBUS_Baudrate

Baud rate

arrMBusLongFrame

ARRAY OF BYTE

Sent or received bytes.

bySendByte

BYTE

Number of sent bytes.

uiMaxCount

UINT

Maximum number of read commands

uiCount

UINT

Current read command

stKomRxBuffer

ST_KL6781ComBuffer

Receive buffer

stKomTxBuffer

ST_KL6781ComBuffer

Transmit buffer

Requirements

Development Environment

PLC library to include

TwinCAT from v3.1.4020.14

Tc2_MBus from 3.3.5.0