About companyProductsShopTechnical support
Moravian Instruments
Main page
About company
Software download
Documents download
The Control Web System
VisionLab Machine Vision Software
DataCam Cameras and DataLight Lighting Units
DataLab industrial input/output system
Scientific cameras
Price list
Custom-made Solutions
Technical support
Control Web Examples

Main pageControl Web Examples

Alarms, archiving, database and backup
 Almost in any applications we can do without archiving of measured values, displaying time courses and alarm monitoring. Support is ready for all these situations in Control Web.

Archiving one value and displaying in a trend

We explain the basic principles of archiving on the most elementary example. We will want to archive one value and then display it in a graph.


The issue of data archiving is very extensive. For more information, refer to the documentation in the chapter Archiving and Historical Trends.

Let's start by creating one archive data element in the application.

  alarm archiv1 {period = 1};
    arch_1 = rand() * 100;

The period determines how often the result of the specified expression will be archived. For data storage, we recommend using the SQL server that is available during Control Web installation.

We let the created application run for a while so that we can have some history and look at it later.

Now we will insert the data_viewer instrument into the application, which will allow us to track the archive data. data_viewer is a very powerful device that allows you to view historical data in a table or graph. It is possible to choose from a huge number of views, types of time or data axes and the like. A complete description of this device would be published on a separate article. We now only need the basic settings (a complete device description can be found in the documentation).

In the instrument we have to set what data elements it will display. data_viewer organizes data in groups. We need to create a new group for our data element.

and text of this setting:

  data_viewer data_viewer_1;
      group_name = 'group1';
      title = 'Skupina 1';
          data_element = archiv1.arch_1;
    active_group = 'group1';

Instrument data_viewer can work in two modes::

  • online - the instrument is timed and displays the current values. If a graph is displayed, the timeline ends with the current time. Each time the graph is activated, the graph moves by elapsed time.

  • historical - the device displays historical data, the user moves the time cursor by himself and views the values.

Overview of data_viewer options for viewing archived data

The example shows the options for archiving and displaying graphs. There are several archived data sections with different periods in the application. All values are displayed in one browser (data_viewer).

The entire application can be downloaded here.

The application shows the possibilities of the data_viewer to display the waveforms.

The entire application can be downloadedhere.

Monitoring of limit values

The example shows the simple use of the alarm_viewer.

The entire application can be downloadedhere.

Database and SQL
 | About company | Products | Technical support | Software download | Documents download | 
Moravian Instruments, Masarykova 1148, Zlin 4, CZ-76302, Czech Republic