FB_IEC870_5_102TBufferCtrl

FB_IEC870_5_102TBufferCtrl 1:

This function block changes the content of the TX/RX data buffer. This data buffer ist used by the communication via the IEC60870-5-102 Serial Link Interface.

The function block has the following actions:

The content of the TX/RX data buffer can be changed by the call of one of the listed actions above.

VAR_IN_OUT

VAR_IN_OUT
    buffer  : ST_IEC870_5_102TBuffer; (* TX/RX data buffer *)
END_VAR

buffer: TX/RX data buffer. The TX/RX buffer parameters (like e.g. asduSize ) have to be configured before using.

VAR_INPUT

VAR_INPUT
    putObj  : ST_IEC870_5_102AOGen; (* ASDU to send *)
END_VAR

putObj: Data unit (ASDU) to be sent.

VAR_OUTPUT

VAR_OUTPUT
    getObj  : ST_IEC870_5_102AOGen; (* received ASDU *)
    bOk     : BOOL; (* TRUE = action succesfully, FALSE=Fifo overflow or fifo empty *)
END_VAR

getObj: Received data unit (ASDU).

bOk: This variable becomes TRUE, if a new entry was inserted or removed successfully from the Fifo. This variable becomes FALSE at a buffer overflow and if no entry could be removed, because the Fifo was already empty.

Requirements

Development Environment

Target System

PLC libraries to include

TwinCAT v2.10 Build >= 1319

PC or CX (x86, ARM)

TcIEC870_5_102Link.Lib
( Standard.Lib; TcBase.Lib; TcSystem.Lib; TcUtilities.Lib; TcIEC870_5_101.Lib; TcIEC870_5_101Link.Lib; COMlibV2.Lib; are included automatically )