UNICOS CMWServer User Manual  9.0.2
 All Files Pages
Operations with configuration file

As one can see in the description of config file format, the file is just ASCII file that can be prepared using any convenient text editor, or file can be generated using dedicated tools (from existing WinCC OA project, or from database with equipment description etc.).

Nevertheless, CMWServer component provides some tools for both editing and validating configuration file; these tools are described below.

Access to config file operations

Access to operations with configuration file from UI is initiated from the panel with configuration for specific CMWServer manager. The group of buttons next to file name field is used for this purpose, let's consider them in more details:

config_file_buttons.png
Operations with configuration file
  1. Selected name of configuration file. Note that field is not directly editable, and that path is only shown relative to proj_path/data
  2. Button to open file selection dialog, this is the only way for changing file name/path
  3. Button to open simple text editor where configuration file can be edited directly
  4. Button to open dedicated panel for editing configuration file
  5. Button to open dediacted panel for checking (validation) of configuration file

Manage configuration file

This panel presents all properties from configuration file in form of table; the main purpose of panel is building (relatively) small configuration file from scratch.

file_manage_01.png
Panel for managing configuration file

It is immediately evident that table columns just display all fields related to one property. mentioned in the description of ile format. The exception is the very first column labeled '#'.
The main functionality of this panel is:

  • Fill the table according to requirements
  • After pressing Apply button content of table will be written to output file in correct format

Content of column '#' determines how this row will be processed while writing the output file, possible choices are explained in legend beneath the table:

  • Rows with 'X' on white background will be written to output file
  • Rows with 'S' on blue background will be skipped because it is user who selected to skip these rows
  • Rows with 'F' on red backgound will be skipped because these rows contain serious error(s)

By clicking on cell in first column, user can switch between 'X' and 'S'. However, when clicked on cell with 'F' in first column, the result is completely different: the whole row with 'F' in first ccolumn is deleted from table.
One can wonder: if this panel is designed to produce correct configuration file, then where errors can come from? But the file was not necessary created using this panel, the file could be just written using simple text editor. Thus, when this panel is opened, it check if file already exists. Existing file is immediately parsed and result of parsing is shown in the table. If the file contains errors - the cells with errors are highlighted in the table using red background; tooltip for such cells displays error details as shown on the following example:

file_manage_err_01.png
Example of incosistency in configuration file

The Reload button in lower left corner of panel can be used to re-read file content and redisplay the parsing result in the table.
The View log next to it opens text file with log of operations in this panel (reading/parsing the file, writing new file etc.)

Probably, the most interesting (and most often used) button is Add DPE that is used for adding rows to the table. This button opens other panel used to select DPE/Alias and to specify all other required values for one row in table:

file_add_dpe.png
Adding DPE (property) to the table

The functionality of panel looks evident: specify all paremetrs for one row in the table and press Add button. Probably, two fields worth to mention here are DPE and Alias fields.
First, as one can guess from the picture above, these fields are not editable in the panel.
Next, there are two essentially different possibilities for filling these fields:

  • PVSS button opens standard DP selection dialog of WinCC OA
  • UNICOS buttons opens UNICOS-specific panel for searching/selecting UNICOS device


One more thing to mention for file managerment panel is popup menu that appears when right mouse button is clicked anywhere in the table:

file_manage_popup_menu.png
Popup menu on the table

The functionality of items in this menu looks evident.

Check (validate) the configuration file

The purpose of the file is to configure CMW server, hence, the ultimate file check is a start up of CMWServer manager: at that moment file is being parsed and, in case of success, CMW server is created and started. Any error detected at this moment is written to WinCC OA log, where one can see what exactly prevented successful CMW server start.
However, this kind of 'diagnostics' is not very convenient: first, one has to look at log viewer in order to see the error message; next, CMWServer manager stops processing on first detected error, and only the first error appears in WinCC OA log.

The panel described in this section provides more convenient way for checking configuration file. Reminder: the panel is opened from the settings of selected manager panel.

file_check.png
Panel for checking configuration file

It is evident that te most important button in this panel is Check button: after clicking this button the configuration file is parsed and parsing result is shown in the panel. If some errors were found - the panel will show a table similar to the table on panel for managing configuration file:

file_check_error.png
Error in configuration file

The table in this panel has two main differences:

  • Only errors are shown, not the whole file content
  • The table is read-only

If file was parsed successfully, the table is not shown at all (the table is empty because it only shows errors):

file_check_no_error.png
Check result is OK

The label beneath Close button display total number of items (properties) in the configuration file.

Another important button is file selection button next to the file name field. By default the panel is opened with the name of configuration file, specified in settings of selected manager panel, from where this panel was opened. With file selection button one can check any other file.

Two other buttons in this panel (next to Check button) are:

Button Description
button_log.png
Opens log file with results of file parsing
button_edit.png
Opens text editor for editing the configuration file