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:
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.
Setup / Events menu is for adding events into a project.
In out example we want:
In the Basic tab, there are 3 items:
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'.
The 'Action' tab of the event settings determines what, how, and when have to be recorded in the event report data structure.
If you press +Add Register to report, the following dialog will appear:
It is possible to pick up 4 options:
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.
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, sorting 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 marks the 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.