F_iecApdu102ToAsduLen

F_iecApdu102ToAsduLen 1:

The function calculates for the IEC 60870-5-102 protocol the maximum available ASDU byte length with the configurated frame and link address field length. The maximum available ASDU length is for example required for the configuration of the ST_IEC870_5_102T buffer variable. This data structure (TX/RX data buffer) is used for the data exchange via the IEC60870-5-102 Serial Link Interface.

FUNCTION F_iecApdu102ToAsduLen: BYTE

VAR_INPUT
    FRAMELength     : BYTE;
    eLinkAddrSize   : E_IEC870_5_101LinkAddrSize;
END_VAR

FRAMELength : Max. available APDU frame length (see compatibility list).

eLinkAddrSize: Link address field octet length (see compatibility list).

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 )