User Tools

Site Tools


events

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
events [2020/11/27 13:53] – [Event Actions] emozolyakevents [2022/01/26 14:15] (current) – [Report constructor] emozolyak
Line 1: Line 1:
 +{{ network:menu-icon-events.png?nolink&40|}}
 ====== Events ====== ====== Events ======
  
Line 21: Line 22:
 Setup / Events menu is for adding events into a project. Setup / Events menu is for adding events into a project.
  
-{{ ::event_menu_location.png?direct&800 |}}+{{ network:event_menu_location.png?direct&800 |}}
        
 'Add event' button is located in the top-right page corner: 'Add event' button is located in the top-right page corner:
  
-{{ ::create_event_button.png?direct&800 |}}+{{ network:create_event_button.png?direct&800 |}}
  
 ==== Event Basic settings ==== ==== Event Basic settings ====
Line 34: Line 35:
   ***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.    ***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. 
  
-{{ :hide_child_event_1.png?direct&800 |}}+{{ network:hide_child_event_1.png?direct&800 |}}
  
 === About parent and child events ===  === About parent and child events === 
Line 44: Line 45:
   *For child events no report entry will be created in the side menu.   *For child events no report entry will be created in the side menu.
  
-{{ ::parent_and_sub_event.png?direct&600 |}}+{{ network:parent_and_sub_event.png?direct&600 |}}
  
 ==== Event Condition ==== ==== Event Condition ====
Line 50: Line 51:
 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. 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.
  
-{{ ::new_ev_condition_tab.png?direct&800 |}}+{{ network:new_ev_condition_tab.png?direct&800 |}}
  
 Of course, the event conditions sometimes  may be very complex, but with Lua scripts you can describe any imaginable condition: Of course, the event conditions sometimes  may be very complex, but with Lua scripts you can describe any imaginable condition:
Line 69: Line 70:
  
 The 'Action' tab of the event settings determines what, how, and when have to be recorded in the event report data structure. The 'Action' tab of the event settings determines what, how, and when have to be recorded in the event report data structure.
-{{ ::new_ev_actions_tab.png?direct&800 |}}+{{ network:new_ev_actions_tab.png?direct&800 |}}
  
-  ***Save to report checkbox** - If selected, it will be possible to set the E-registers in the form of **Ey.x**+  ***Save to report** - enables selecting registers and setting up logging action options
   ***Report title** - It is the Report title when it's viewed or accessed from API, etc.   ***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    ***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'want to log some register's value for graphs all the time, but only inside 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   +  ***Save data** There are 2 options: 
 +    *__Once per Event__  - the registers values are written once 
 +    *__Every X seconds__ . All data will be saved at regular interval, i.e. there will be multiple records with their respective timestamps. This option is used when you want to build graph based on the event data in [[level2:creating_advanced_reports_in_level2?s[]=reports| Level2 report builder]] or use API to get this data. 
  
-== Selecting data to record in event log ==+=== Selecting registers for the event ===
  
-If you press **+Add Register to report**, the following dialog will appear:+Besides a common register selection list, there are 3 extra values in the list:  
 +  *//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) 
 +{{ network:register_selector_with_white_bgnd.png?direct&600 |}}
  
-{{ ::e_register_selection_options.png?direct&600 |}}+  *//Register Ey.x// - Thе Ey.x notation can be used to refer this data in the [[webhmi_internal_registers?s[]=internal&s[]=registers#exxxxxx_-_event_registers internal register's]] address, but this registers will be read only while the event is recording. When no recording in progrees, the register will be nil and seen as '-'.'y' - means event id for reference, 'x' - is a order number in the event's actions.  You can change registers's __title__ and change __recording options__: 
 +    *you can select first value or last, maximal, minival, average.  
 +    *For the reigsters with time or duration format set, the format field will be promtped as time format (H:i etc.) 
  
-It is possible to pick up 4 options: +  ***Show in report list** this checkbox hides or unhides the value in the report view. E.g. you can show only most important fields in the report list, but show this data later, in the detailed report.  
-    *//Start time// - event start time  +  ***Show on timeline** - the checkbox makes the event to be shown in the timeline viewer 
-    *//End time// - event end time  +  ***Add log message**  a record will be added to the messages log upon event trigger
-    *//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):  +
-{{ ::e_register_choices.png?direct&800 |}} +
- +
-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 [[webhmi_internal_registers | 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 +===== Viewing events data=====
  
-**Add log message** - If you select this checkbox, a message with set priority and content will be generated upon event start. +When there are configured and logged events in a project, an event viewing page became accessible too: 
  
-===== Viewing events data=====+{{ network:event_viewer_1_edited.png?direct&800 |}}
  
-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 csvhtml files: +  - Report access menu 
-{{ ::ready_events.png?direct&800 |}}+  - __Refresh__, __adjust list length__ and __download__ buttons. The latter has csv | html options.  
 +  - __Calendar__ to pick desired time interval for viewing 
 +  - __Search__ omnibox 
 +  - __Table header__. The columns names are action titles set in //Actions// tabThere are sort arrows as well. 
 +  - This is a row with __unfinished__ event i.e. not having end condition fulfilled and interrupted by a new start event condition.  
 +  - __Highlighted__ event 
 +  - Row with normal data.  
 +  - Link to the __wrapped (daughteror nested) event__ 
 +  - Link to the event __report__, configured in the Report builder.
  
-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. +=== Highlighting events ===
  
-{{ ::new_timeline.png?direct&800 |}}+You can mark some row in the table (having error, alert etc.). There is a 'Highlight' tab in the event configuration, where you can set the condition:
  
-===== Other event usage options =====+{{ network:highlight_tab_new.png?direct&600 |}} 
 +Then the rows will be highlighted like #7 in the list above. 
  
-Besides above application, there are extra options for the recorded event data: +=== Calculating column totals ===
  
-=== Export event data to csv/html - file  ===+For the columns of the event view table, you can add totals in the table's bottom. They are set up in the "Totals" tab: 
 +{{ network:ev_totals_options.png?direct&600 |}}
  
-{{ ::download_event_cropped.png?direct&400 |}}+{{ network:totals_example_2.png?direct&600 |}} 
 + 
 +=== Setting up permissions === 
 + 
 +You can set permission for the users who may access event view table.  
 +{{ network:permissions_new.png?direct&600 |}} 
 + 
 +===== Report constructor ===== 
 + 
 +There is a report constructor similar to the [[screens?s[]=screen#screen_visual_setup|screen constructor]] right in the event configuration. It can show that kind of a report: 
 + 
 +{{ network:report_example_ed3.png?direct&800px }} 
 +Like in screen editor, you pick widgets and arrange them on the canvas. 
 +{{ network:report_constructor.png?direct&800 |}} 
 + 
 +Below notes on the widgets for the report constructor are given: 
 + 
 +== Graph widget == 
 + 
 +The graph widget is drawn based on the graph __already existing__ in the project. You just pick one of the graph from a list: 
 +{{ network:graph_widget_picker_for_reports.png?direct&600 |}} 
 +For the time range, event start / end times are used.  
 + 
 +== Gannt widget == 
 +It's similar to that of the screen widget. You can select only child event as data source for the diagram.  
 +{{ ::events:ev_rep_gannt_addition.gif |}} 
 + 
 +The summary shows duration of all events: 
 +{{ :events:ev_gant_example.png?direct&800 |}} 
 + 
 +<WRAP center round download 80%> 
 +Please refer to the demo project {{ :events:gannt_in_event_example.tar | gannt diagram in events example}}. 
 +Rename the file to .bak after download. 
 +</WRAP> 
 + 
 + 
 +== Register value == 
 + 
 +Register value widget is similar to that in the screen editor, except for register selection: you can only pick up one of the event's (or nested sub-events) actions. 
 + 
 +{{ network:register_value_picker.png?direct&600 |}} 
 + 
 +You can add options to add text label, change font size for both value text and text label, display measurement units and scale: 
 + 
 +{{ network:register_value_scale_munits_checked.png?direct&600 |}} 
 + 
 +For a scale, you set start, end point and its color: 
 +{{ network:register_value_scale_start_end.png?direct&600 |}} 
 + 
 +If you want the value be centered with the scale, choose __windows centered__ option in the Appearance tab: 
 + 
 +{{ network:reg_value_appearance.png?direct&600 |}} 
 + 
 +Please note that in the edit mode the value is refered to as "Ey.x", where E - means event, y - event id, x - action number. 
 +{{ network:reg_value_scale_edit_mode.png?direct&200 |}} 
 + 
 +== Values table == 
 +Values table widget is identical to that one in the screen editor except for register selector (only from event's actions).  
 + 
 +{{ network:val_table_editor.png?direct&600 |}} 
 + 
 +== Bar char, hystogram, pie chart == 
 + 
 +These are identical to the screen editor widgets, except for the register selector.  
 + 
 +== Text widget == 
 +It is simple html editor, please refer to the video below. For the actions - you can type action address in the form of Ey.x or use action picker.  
 + 
 +{{network:ev_rep_builder_overview.gif}} 
 + 
 + 
 + 
 +===== Other event usage options ===== 
 + 
 +Besides above application, there are extra options for the recorded event data: 
  
 === Get event data from external applicaion via API === === Get event data from external applicaion via API ===
Line 117: Line 205:
  
 === Send event data to Level2 === === Send event data to Level2 ===
-There is a report builder in the Level2 system as well which uses data taken from WebHMI as a source. More on this [[creating_advanced_reports_in_level2?s[]=level2 | here]].+There is a report builder in the Level2 system as well which uses data taken from WebHMI as a source. More on this [[level2:creating_advanced_reports_in_level2?s[]=level2| here]].
  
 === Creating a timeline based on time from the event === === Creating a timeline based on time from the event ===
  
-=== Customized report view on screens and dashboards === +When you set __Show on timeline__ checkbox for events, the timeline view become available in the Report sub-menu where you can analize how the events has been logged. 
 +{{ network:timeline_view.png?direct&600 |}}
  
-getting historical data from events in WebHMI customized report screen or dashboards (using API and Lua)+=== Advanced customized reports based on events, screens, lua and api ===  
 + 
 +The Report constructor for events may not be convinient in some cases:  
 +  *the processes last long time (days, weeks, monthes, years etc) and event logging may be interrupted by some maintenacne or other occastions which is not acceptable (this will split the event) 
 +  *you need to generate report which unites data from many different events, so you can not use event'report constructor which is bound by one event and its sub-events 
 +  *the system consist of many logical units which would require to make a lot of duplicating reports 
 + 
 +In this cases, still a desired report can be obtained from particular events, lua, api and screen/dashboard editor.  
 +You can use the following approach:  
 +  *use screen/dashboard for user report setup (picking dates, machines, shifts etc.) 
 +  *use lua script which would make api call to webhmi's event log and fetch neccessary data 
 +  *use javascript to change screen widget properites - start / end time for graph, changing parameters etc. 
 + 
 +<WRAP center round info 80%> 
 +Please refer to the following application [[events_in_machine_monitoring | note]].  
 +</WRAP>
  
 ===== Notes on event usage ===== ===== Notes on event usage =====
  
-==== Editing events in the running project ====+=== Editing events in the running project ===
  
-<WRAP center round important 60%>+<WRAP center round important 80%>
 Due to 'on the fly' method of recordig events, WebHMI project restart will cause an event being recorded to  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 or critical data in your project and edit or comission the project remotely, apply changes when the event unlikely to happen or won't cause data distortion.  "split". If you have some important report or critical data in your project and edit or comission the project remotely, apply changes when the event unlikely to happen or won't cause data distortion. 
Line 136: Line 240:
  
  
-==== One - time events ====+=== One - time events ===
  
-<WRAP center round tip 60%>+<WRAP center round tip 80%>
 With one-time event, i.e. those not having 'event has duration' checkbox set, remember that while the event condition is **true** WebHMI will generate excess records in the DB on every scan. Use lua script which provides one scan duration of the event enabling condition. With one-time event, i.e. those not having 'event has duration' checkbox set, remember that while the event condition is **true** WebHMI will generate excess records in the DB on every scan. Use lua script which provides one scan duration of the event enabling condition.
 </WRAP> </WRAP>
Line 159: Line 263:
 </code> </code>
  
-==== Lasting events with different start and end condition ====+=== Lasting events with different start and end condition ===
  
 Be carefull with different start and end condition for lasting events. Becuase when they intersect, i.e. end conditino happens while start condition is true, you will get multiple events at once. Be carefull with different start and end condition for lasting events. Becuase when they intersect, i.e. end conditino happens while start condition is true, you will get multiple events at once.
events.1606485204.txt.gz · Last modified: 2020/11/27 13:53 by emozolyak

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki