Archive system
Archive system The archiving system solves the problem of forming a history of changes in the controlled technological parameters. The generated history can be used to analyze the controlled process and can be presented to the operator in the form of graphs and reports. Parameter values are archived cyclically, the archiving period and the depth of the archive can be configured separately for each parameter. To set up the archiving system, use the archive editor located on the “Archives” tab.
(figure “Archive editor”).
Archive editor has 2 modes of operation:
- “Archives”
- “Wizards”
Archives mode
In the “Archives” mode, the editor allows you to work with the database of the archived parameters, add new archives, configure them, edit and delete previously created ones.
Archive editor interface description
To work with the database of archives use the control panel:
Panel elements:
Update the archive database display. If several developers are working on a project at the same time, the button may be used to receive updates made by others. | |
---|---|
Create new archive (see paragraph “Archive creation”) |
|
Create new archives with wizard (see paragraph “Archive creation with wizard”) |
|
Change settings of selected archive | |
Delete selected archives | |
Automatic creation of wizard for selected archives (see paragraph “Automatic wizard creation”) |
|
Operation mode switch of editor | |
Export archived parameter base into .csv file (see paragraph “Export/Import archive configuration”) |
|
Import archived parameter base from .csv file (see paragraph “Export/Import archive configuration”) |
Archive creation
Creating new archives or editing the settings of already existing ones is done using the form:
The archive has the following settings:
-
“Tag” is a data structure containing a set of fields intended for monitoring a single technological point, for example: analog parameter, controller, etc. (see Tag editor).
- “Field” is a tag field whose value is to be archived.
- “Period” is the length of the archiving cycle period in seconds. The minimum value is 1 sec., The maximum is 3600 sec.
- “Depth” is the length of the stored history of parameter changes in days. The minimum value is 1 day, the maximum value is unlimited. When configuring the depth of the archives, you must consider the free space on the server disks. Archive of the 1st parameter with a frequency of 1 sec. a depth of 1 month takes an average of 20 MByte.
Archive creation with wizard
The wizard serves to automate developer actions when creating archives for a group of tags. Creating archives using the wizard is performed using the following dialog:
To start the wizard you need to fill in the following fields:
-
"Master". Select wizard from the list of available. Wizards must be pre-configured via “Automatic wizard creation” or via “Wizard setup mode” in message editor.
- “Tags”. Select tags for which messages will be created. The selection of tags from the drop-down list is supported:
To search for tags, it is recommended to use auto-selection. To do this, you need to enter a part of the name of the search tag in the input field; as a result, tags whose name contains the entered string will be proposed. It also supports the selection of tags using a specialized dialog that opens when you click on the icon:
Automatic wizard creation
If one or more archives are created for one tag, you can create a wizard for them, which can then be used to automate actions when creating archives for this type of tag. To create a wizard, select one or more archives related to the same tag, after which the “Create wizard” button will become available. When you click on the button, a dialog will appear, offering to specify the name of the wizard to be created:
When creating a wizard, archive patterns will be created automatically (see paragraph “Create/Edit archive patterns”) based on the archives selected in the table.
Export/Import archive configuration
The database of the parameters to be archived can be uploaded to a .csv file - the “Export” button in the archive editor (see Archive editor interface description). As a result, the browser will load the file with the database of parameters to be archived - ARCHIVES_BASE.csv. The .csv format is text-based and is intended for the presentation of tabular data. The encoding used is UTF8, a tab character is used as a column separator. Viewing and editing the file is conveniently done using table editors that support the .csv format (e.g. Microsoft Excel - https://products.office.com/ru-ru/excel or LibreOffice - https://ru.libreoffice.org/), e.g. the contents of the file in LibreOffice:
Each line corresponds to one archived parameter and has the following set of fields:
-
“Tag” is a data structure containing a set of fields intended for monitoring a single technological point, for example: analog parameter, controller, etc. (see Tag editor).
- “Field” is a tag field whose value is to be archived.
- “Cycle” is the length of the archiving cycle period in seconds.
-
“Days” is the length of the stored history of parameter changes in days (see Archive creation).
In the file, you can add or edit lines. Saving needs to be done in the same format (format - csv with Tab delimiters, UTF8 encoding). The file can be imported back into the project, as a result of which the changes made will be loaded into the database. Also, the export / import mechanism allows you to transfer settings between projects, for example, from a test server or a developer’s station to a working project. To import a file you need to click the Import button in archive editor (see Archive editor interface description). As a result, the file selection dialog will appear:
File selection is supported using the explorer (“Select file” button) or drag-and-drop operations, i.e. dragging a file into the area labeled “No file selected”. After selecting a file, the “OK” button will become active, clicking on which will import the selected file. In case of inconsistency of the data imported from the file, for example, if there is no specified tag, an error will be displayed with the line number and the error text, for example:
Attention! The imported file with the database of archived parameters must necessarily have the name ARCHIVES_BASE.csv. The file name is used by the import mechanism to determine the software module that loads the data from the file.
Wizard setup mode
The “Wizard” mode is used to configure the wizards used to create archives (see paragraph “Archive creation with wizard”). You can change to the wizard setup mode using the switch:
In the wizard mode, the editor allows you to work with the wizard database and the archive patterns related to them. In the editor, you can create new wizards. And also configure archive patterns for them.
Interface
The following control panel is used to work with the archive wizard database:
Panel elements:
Updating the wizard database display. If several developers are working on a project at the same time, the button may be used to receive updates made by others. | |
---|---|
“Wizard” group | |
Create new wizard (see paragraph “Create/Edit wizard”) |
|
Change settings of selected wizard | |
Delete selected wizard | |
“Temlates” | |
Create new archive pattern (see paragraph “Create/Edit archive patterns”) |
|
Change settings of selected archive patterns | |
Delete selected archive patterns | |
Editor operation mode switch |
The message wizard editor looks as follows (see figure “Archive wizard setup mode”):
The left panel displays a list of available wizards. When you select a wizard, a list of archive patterns relating to it is displayed in the right panel.
Wizard creation
Creating new wizards or editing settings of already existing ones is done using the form:
The wizard has the following settings:
-
“Tag pattern” - tag type: knob, analog parameter, etc. (see Pattern editor), for which the wizard is created.
- “Name” is the name of the wizard. When you select a tag pattern, the name will be suggested automatically based on the selected pattern and the already occupied names of the wizards, the developer can set the name of the wizard himself.
Archive pattern creation
Creating new archive patterns or editing settings of existing ones is done using the form:
An archive pattern is created for the tag type selected in the wizard and has the following settings:
- “Field” is a tag field whose value is to be archived.
- “Period” is the length of the archiving cycle period in seconds. The minimum value is 1 sec., The maximum is 3600 sec.
- “Depth” is the length of the stored history of parameter changes in days. The minimum value is 1 day, the maximum value is unlimited. When configuring the depth of the archives, you must consider the free space on the server disks. Archive of the 1st parameter with a frequency of 1 sec, a depth of 1 month takes an average of 20 MByte.
When creating archives using the wizard (see paragraph “Archive creation with wizard”) the settings of the created archives will be taken from the settings of the patterns belonging to the wizard.