KOM Archive - properties

Archive file

The KOM Archive file together with saved values is named "KOMARC.KCD" and it is placed in the application subdirectory \KOMARC. \KOMARC directory is created automatically if needed. KOM Archive functions as circular buffer so that values are saved in the buffer regardless of the fact that process D2000 KOM is in online or offline mode. The oldest values are rewritten by the current ones. The buffer is common for al objects, which means that is not divided for individual I/O tags, but all incoming values of I/O tags are written in the sequence as they came.

The archive file is divided into the header (at the beginning of the file) and blocks with saved values. The header contains information about blocks of values (number of written values, write times,...). Each block with data allows to save cca 1500 values. Number of block is limited by the file size (parameter /KA). Each block is protected by check sum. Block writing onto disk is performed only in case of its being full or after the timeout (1 minute) has elapsed. Values saved in offline mode are specially labelled and sent into D2000 system after establishing connection to process D2000 Server.


Data reading

According to the parameter /KM<ArchiveMode> parameter value of process D2000 KOM, a mode of sending values from the buffer into D2000 system, will be determined. The value of the parameter ArchivMode may be:

  • 1 - (implicit value) for automatic sending of values after starting process D2000 KOM (if any values acquired in the offline mode are found in KOM Archive) or after reconnection to Server (values acquired while process D2000 KOM operates in offline mode).
  • 2 - values are sent only when requested - the Tell command READKOMARC.

Log file

Together with "KOMARC.KCD", "KOMARC.LOG" will be created in the same directory. Into it, there are written in the text form together with the time and date of creation:

  • Information about the file generation,
  • Errors during KOM Archive functioning (incorrect check sums, errors of system callings, ...).
  • Executed transactions of data reading (transaction type, read-out data interval, ...)

Possible risks

Data writing into KOM Archive loads minimally the operating system (minimal disk operations, most operations are executed in the RAM). It is necessary to keep the disk space free for the archive file generation. It is generated immediately with the required size (parameter /KA) and its space will not be changed later.

A problem may occur in ArchivMode 1 mode, if more data are being sent into D2000 and D2000 Archiv is consequently overloaded and its functioning is hindered. Another problem may occur when process D2000 Archiv is not running while sending values from process D2000 KOM. In such cases, we recommend to switch KOM Archive to ArchivMode 2 mode and control the KOM Archive reading via a special event using the Tell command READKOMARC. The event should solve the listed problems, e.g. D2000 Archiv process monitoring, a batch of KOM Archive reading and D2000 Archiv load monitoring etc.

Napíšte komentár