Moravian instruments, Inc., source: https://www.mii.cz/cat?id=216&lang=409, printed: 30.04.2025 17:12:09
23.9.2020 |
---|
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 trendWe 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. Remark: 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. data alarm archiv1 {period = 1}; arch_1 = rand() * 100; end_alarm; end_data; 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; data_group group_name = 'group1'; title = 'Skupina 1'; data_elements item data_element = archiv1.arch_1; end_item; end_data_elements; end_data_group; active_group = 'group1'; end_data_viewer; Instrument data_viewer can work in two modes::
Overview of data_viewer options for viewing archived data
Monitoring of limit values
|
Database and SQL | 23.9.2020 |
---|