KOM Archive - properties
Archive file
The KOM Archive file containing the saved values is named "KOMARC.KCD" and it is placed in the application subdirectory KOMARC. The KOMARC directory is created automatically if needed. The KOM Archive functions as a circular buffer so that values are saved in the buffer when the D2000 KOM process is in offline mode. The oldest values are rewritten by the new ones. The buffer is common for all objects, which means that is not divided for the 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 a saving of about 1500 values. The number of blocks is limited by the file size (parameter /KA). Each block is protected by a checksum. Block writing onto the disk is performed only when it is full or after a timeout (1 minute) has elapsed. Values saved in offline mode are specially labeled and sent into the D2000 system after establishing a connection to the D2000 Server process.
Data reading
Based on the value of /KM<ArchiveMode> parameter of the D2000 KOM process, a mode of sending values from the buffer into the D2000 system will be determined. The value of the parameter ArchivMode may be:
- 1 - (implicit value) for automatic sending of values after starting the D2000 KOM process (if any values acquired in the offline mode are found in KOM Archive) or after reconnection to Server (values acquired while the D2000 KOM process operates in offline mode).
- 2 - values are sent only when requested by the Tell command READKOMARC.
Logfile
Together with "KOMARC.KCD", "KOMARC.LOG" will be created in the same directory. It is text-based and it contains the following information stored together with the time and date of creation:
- Information about the file creation,
- Information about errors during KOM Archive functioning (incorrect checksums, errors of system calls, ...).
- Information about performed data reading transactions (transaction type, read-out data interval, ...)
Possible risks
Data writing into KOM Archive puts a minimal burden on the operating system (minimal disk operations, most operations are executed in the RAM). Sufficient free disk space is necessary to for the creation of the archive file. It is created immediately with the required size (parameter /KA) and its size will not be changed later.
A problem may occur in ArchivMode mode 1, if too many values are sent into the D2000 system and the D2000 Archiv is consequently overloaded and its functioning is hindered. Another problem may occur when the D2000 Archiv process is not running while sending values from the D2000 KOM process. In such cases, we recommend switching the ArchivMode mode to 2 and to control the KOM Archive reading via a special event using the Tell command READKOMARC. The event should handle the abovementioned problems, e.g. monitoring of the D2000 Archiv process, batch reading of the KOM Archive, the D2000 Archiv load monitoring, etc.
Related pages:
0 komentárov