Overview

The Datalogging Function Block Library contains five Function Blocks for the purpose of advanced time-stamped data logging for different use cases. In typical use cases the AC500 application program generates data which are normally transmitted to a telecontrol system for storage and further processing or displaying to the end user. Typically, these may be remote applications like water pumping stations or solar power plants where the connection between the remote station (AC500) and a central SCADA/telecontrol station is not always stable or only sporadically connected. Sporadically connected can be by intention e.g. to save communication costs or open ports/connections to be handled by a control station. Then the Datalogging Function Blocks can store data in case of a broken or intentionally interrupted connection between AC500 and the telecontrol system.

../_images/f6ec50e1ccf899200a3313900153d810

Overview

  • The Datalogging Library can be used as an event recorder. In this special mode data is continuously recorded in a ring buffer which can be read out after a certain event x (e.g. outage) in order to analyze the values especially before but also after the event x.

    OR

  • Data can be logged only and on command transferred to the ftp area to be analyzed offline or taken out via the SD card.

The following figure gives an overview of the described interaction of the Datalogging Function Blocks. There is always an input Function Block needed which transfers the input data into data sets with timestamp for use by the Datalogger. An output Function Block receives the current or retrieved data from the Datalogger in case of communication or further processing. The input Function Blocks “LOG_xxx_INPUT”, the Function Block “LOG_HANDLING” and the output Function Blocks “LOG_xxx_OUTPUT” communicate via SRAM FIFOin and FIFOout areas (defined in %M/%R area) in the memory. This SRAM FIFOs are intermediate buffers and help in decoupling time wise and speeding up the necessary write/read operations on the logging file structures significantly. These read/write operations on the files are done in blocks of datasets, enabling a comparably fast interaction with the otherwise slow file system.

../_images/7c641bf2ccf6e13d0a3313900038db97

Overview Function Blocks

Each Datalogging application requires the main Function Block LOG_HANDLING, one of the input Function Blocks to provide data to be logged and one output Function Block to retrieve the data.

As input and output Function Blocks two different types exist:

  • For logging data of an interrupted IEC60870 communication, the Function Blocks LOG_IEC60870_INPUT and LOG_IEC60870_OUTPUT are provided. The IEC60870 Datalogging Function Blocks support the IEC data types and work internally with the standard AC500 IEC60870 Library. The IEC Datalogger output Function Block does not need special handling or control/inputs.
  • For other types of general data LOG_GENERIC_INPUT and LOG_GENERIC_OUTPUT are provided. The generic Datalogging Function Blocks support an even larger variety of data types. The generic output Function Block needs to be hand-shaked with for each data set, in order to retrieve the data from the Datalogging files. Therefore the generic Function Blocks can also be used to integrate the data logging into any other protocol, e.g. MODBUS.

The Function Block LOG_HANDLING ensures that also several consecutive and fast interruptions can be handled without losing data. While the log file is replayed, arriving new data is stored in the SRAM FIFOin and added to the Datalogging files (File FIFO) if the SRAM FIFOin becomes full (during that short time the log file replay is paused). Nevertheless any data send to a control station via a communication is always with the oldest data first (FIFIO = “First In First Out”).

As it takes up to 30 seconds before a communication break is detected (e.g. with TCP/IP protocols by the AC500 hardware/firmware), the data rate at which data should be logged in case of a communication break has to be calculated and limited.

As an improvement a ping mechanism can be implemented in the substation. This was done in the example program for the IEC logger. With this ping the interruption is already detected after 1-2 seconds (can be configured in the example program).

As the SRAM FIFO has to store data during this time its size limits the data rate. The SRAM FIFO size is 160 datasets. This means the data rate should be lower than approximately max. datarate = 160 datasets/2 seconds => <5 datasets/second

The data rates for storing only without this detection can be much higher and depends on the CPU and memory type chosen. The data is always logged in directly readable csv format Datalogging Library. Depending on the input Function Block and data type, the log file contains only one or up to 32 data variables per timestamped data set. The Datalogging files can be configured (up to 65k datasets, up to 999 concsecutive log files, name format).