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 explanatoin 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 can be written Once per Event or Every X seconds
  • Register E1.0, 1.1, … (see also link). The 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. As a parameter of the E-register one of the 4 options are possible:
    • Start time - event start time
    • End time - event end time
    • Last update time - the time of last record write time in the event
    • Any register from Registers list - and the third column of the report setting allows to select processing for the register - take minimal (Min), maximal value(Max), first value at the moment of event start (First Value) or the last upon the event end(Last Value), average value during the event time (Average Value).
  • **Show on timeline - See the explanation before on Save to Report checkbox

The settings for the event condition registers in our example are provided on previous picture. The names of the columns can be changed. For the E2.0, E2.1 registers with time value, the time format pattern is used like in PHP. For the E2.2, E2.3 registers the max. and min. values respectively. E2.4 - average value during the event. After the example event setup, the followed report would be seen in the Reports menu:

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.1547546396.txt.gz · Last modified: 2019/01/15 09:59 by emozolyak

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki