User Tools

Site Tools


events

This is an old revision of the document!


Events

About events

Events are a mechanism that allows you to record data only upon specified conditions are met: a certain technological operation has started, or for example, a process parameter has exceeded the allowed limits - and it is necessary to obtain a separate set of data related to this moment, such as the start time, end time, values ​​or changes of other parameters (affecting the process or dependent on it) at this time, or during this process state, making so possible to effectively analyze such situations and generate reports.

The recorded events cab be used in a few ways:

  • be viewed using embedded event report viewer in WebHMI
  • exporting event data into csv - file
  • transferning event date into any applicaion using API
  • using event data in Level2 reports
  • show start / end time of the event on the timeline both in WebHMI and Level2

Unlike building the necessary protocols by 'mining' information in the database (logs), event reports are generated 'on the fly' ie. at a pace with the monitoring process.

Tip: Due to 'on the fly' method of recordig events, WebHMI project restart will cause an event being recorded to 
"split". If you have some important report in your project and edit or comission the project remotely, 
 apply changes when the event unlikely to happen.

Event Example

Creating Event

Setup / Events menu is for adding events into a project.

In out example we want:

  • To register when Pump #1 on the sewage pump station runs
  • Were there any alerts in the run time
  • Maximal level in the tank

Event Basic settings

In the Basic tab, there are 3 items:

  • Title This title is for the list in the Setup menu
  • Description To give any comments for the events
  • Parent event This event recorded only if a high-level, or parent event is running now. I.e. this event nests in a parent event with all its data.

Event Condition

After a 3.3 version, WebHMI has simpler condition setting - if some register's value equal or not equal to another value. There could be several conditions acting by logical 'AND' operation.

Of course, the event conditions sometimes may be very complex, but with Lua scripts you can describe any imaginable condition:

The events may have or not have duration in time.

If you want only to register one point in time when something happens, then the event condition must be true for ONLY one scan. Otherwise the records will be added in every scan while event condtion is true.

If you want to register event having duration, the record will start upon rising edge of the fulfilling condition and end upon condition slope. But start and end condition might differ.

There are respective chackboxes named 'Has some duration in time' and 'End condition differs from start condition'.

Event Actions

The 'Action' tab of the event settings determines what, how, and when have to be recorded in the event report data structure.

  • Title - The title field for the Setup menu. Possible to re-type here
  • Save to report checkbox - If selected, it will be possible to set the E-registers in the form of Ey.x. See explanation below
  • Report title - It is the Report title when it's viewed or accessed from API, etc.
  • Menu item name It is how the 'Report' menu entry will look in the side bar menu
  • Save data The registers values (except for Event Start/End/Last update time selection) can be written Once per Event or Every X seconds . If you don't want to log some register's value for graphs all the time, but only inside a specific event, you may choose option of 'Every X seconds' and then a series of values will be recorded just in the event log data. Then an external application (or Level2 report builder) can use this data to biuld its own graph.
Selecting data to record in event log

If you press +Add Register to report, the following dialog will appear:

It is possible to pick up 4 options:

  • Start time - event start time
  • End time - event end time
  • Last update time - the time of last record write time in the event ( this is a speical option for testing purposes)
  • Any register from Registers list - when you select a register from your project, then you can re-type the parameter title for the event and select which value to take for event log (min / max / first/ last / average):

The rows of selected register have Register E1.0, 1.1, … string left to it. These E-registers are indexed from 0 and further in ascending order (x is an index), y is the event identifier that is assigned to it when it is created and is displayed in the event list. Ey.x - it is address in the WebHMI internal register protocol (see also link), and also it is used to refer to them in Level2 report builder.

Show on timeline - If you select this checkbox, you can see evetn on timeline with set color. See below

Add log message - If you select this checkbox, a message with set priority and content will be generated upon event start.

Viewing recorded Event

The side bar Reports menu is for accessing logged event (it's only available if there are event configured in the project). When viewing the event data you can use calendar, search box, and save selected data to csv, html files:

Since the “Show on timeline” option was set when creating the event, it will also be shown on the timeline. The line with a point on the axis mark event start time or the one-moment event. You can navigate the timeline holding main mouse button to move horizontaly and zooming with mouse wheel button.

events.1547550762.txt.gz · Last modified: 2019/01/15 11:12 by emozolyak

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki