ST_IEC870_5_101FBufferCfg

From product version: TwinCAT PLC Library IEC60870-5-101/104 substation v3.0.2 / IEC60870-5-104 controlling station v1.0.2 and higher.

Configuration settings for offline ASDU data buffer. This structure is used by the functionblock FB_IEC870_5_101FBufferCtrl .

TYPE ST_IEC870_5_101FBufferCfg :
STRUCT
    sNetID      : T_AmsNetID := ''; (* TwinCAT System network address *)
 sPathName       : T_MaxString := 'c:\Temp\data.dat'; (* File buffer path name (max. length = 255 characters) *)
 ePath       : E_OpenPath := PATH_GENERIC; (* Default: Open generic file *)
 cbBuffer    : UDINT := 16#100000; (* Max. size of file: 16#100000 = 1MB *)
 bOverwrite      : BOOL := TRUE; (* TRUE = overwrite oldest entry, FALSE = don't overwrite *)
 bFilter         : BOOL := FALSE; (* Enable/disable frame filter (reserved)*)
 cotFilter       : T_IEC870_5_101COTBits := 8(0); (* COT (cause of transfer) filter, reserved for future use *)
 tTimeout    : TIME := DEFAULT_ADS_TIMEOUT; (* ADS (file access) timeout *)
ND_STRUCT
END_TYPE

sNetID: It is possible here to provide thenetwork address of the TwinCAT computer on which the buffer file is to be created The string can also be empty for the local computer.

sPathName: Contains the path and filename for the file to be opened. The path can only point to the local computer’s file system. This means that network paths cannot be used here.

ePath: This input can be used to select a TwinCAT system path on the target device for opening the file.

cbBuffer: Maximum byte size of buffer file. If bOverwrite = FALSE is set and the maximum size was exceeded an error is returned.

bOverwrite: If variable is set TRUE: the oldest entries are overwritten by reaching the maximum size. 

bFilter: Not yet implemented. Enables/disables a COT filter (Cause of transfer). Only ASDUs with specific cause of transfer are buffered in the file.

cotFilter: Not yet implemented. Via this variable COTS (cause of transfer) can be configured, that have tio be buffered in the file.

tTimeout: States the length of the timeout that may not be exceeded by file access.

Requirements

Development Environment

Target System

PLC libraries to include

TwinCAT v2.10.0 Build >= 1313

PC or CX (x86, ARM)

TcIEC870_5_101.Lib

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