F_iecApdu103ToAsduLen

F_iecApdu103ToAsduLen 1:

The function calculates for the IEC 60870-5-103 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_103T buffer variable. This data structure (TX/RX data buffer) is used for the data exchange via the IEC60870-5-103 Serial Link Interface.

FUNCTION F_iecApdu103ToAsduLen: 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.0 Build >= 1313

PC or CX (x86, ARM)

TcIEC870_5_103Link.Lib

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