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/12/01 11:58] – [Editing events in the running project] 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** - enables selecting registers and setting up logging action options.    ***Save to report** - enables selecting registers and setting up logging action options. 
Line 76: Line 77:
   ***Save data** There are 2 options:   ***Save data** There are 2 options:
     *__Once per Event__  - the registers values are written once     *__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 a graph based on the event data in [[creating_advanced_reports_in_level2?s[]=reports | Level2 report builder]] or use API to get this data. +    *__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 a 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 registers for the event === === Selecting registers for the event ===
Line 84: Line 85:
   *//End time// - event end 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)   *//Last update time// - the time of last record write time in the event ( this is a speical option for testing purposes)
-{{ ::register_selector_with_white_bgnd.png?direct&600 |}}+{{ network:register_selector_with_white_bgnd.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__:   *//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__:
Line 98: Line 99:
 When there are configured and logged events in a project, an event viewing page became accessible too:  When there are configured and logged events in a project, an event viewing page became accessible too: 
  
-{{ ::event_viewer_1_edited.png?direct&800 |}}+{{ network:event_viewer_1_edited.png?direct&800 |}}
  
   - Report access menu   - Report access menu
Line 115: Line 116:
 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: 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:
  
-{{ ::highlight_tab_new.png?direct&600 |}}+{{ network:highlight_tab_new.png?direct&600 |}}
 Then the rows will be highlighted like #7 in the list above.  Then the rows will be highlighted like #7 in the list above. 
  
Line 121: Line 122:
  
 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: 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:
-{{ ::ev_totals_options.png?direct&600 |}}+{{ network:ev_totals_options.png?direct&600 |}}
  
-{{ ::totals_example_2.png?direct&600 |}}+{{ network:totals_example_2.png?direct&600 |}}
  
 === Setting up permissions === === Setting up permissions ===
  
 You can set permission for the users who may access event view table.  You can set permission for the users who may access event view table. 
-{{ ::permissions_new.png?direct&600 |}}+{{ network:permissions_new.png?direct&600 |}}
  
 ===== Report constructor ===== ===== Report constructor =====
Line 134: Line 135:
 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: 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:
  
-{{ ::report_example_ed3.png?direct&800px }}+{{ network:report_example_ed3.png?direct&800px }}
 Like in screen editor, you pick widgets and arrange them on the canvas. Like in screen editor, you pick widgets and arrange them on the canvas.
-{{ :report_constructor.png?direct&800 |}}+{{ network:report_constructor.png?direct&800 |}}
  
 Below notes on the widgets for the report constructor are given: Below notes on the widgets for the report constructor are given:
Line 143: Line 144:
  
 The graph widget is drawn based on the graph __already existing__ in the project. You just pick one of the graph from a list: The graph widget is drawn based on the graph __already existing__ in the project. You just pick one of the graph from a list:
-{{ ::graph_widget_picker_for_reports.png?direct&600 |}}+{{ network:graph_widget_picker_for_reports.png?direct&600 |}}
 For the time range, event start / end times are used.  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 ==
Line 150: Line 164:
 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. 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.
  
-{{ ::register_value_picker.png?direct&600 |}}+{{ 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: You can add options to add text label, change font size for both value text and text label, display measurement units and scale:
  
-{{ ::register_value_scale_munits_checked.png?direct&600 |}}+{{ network:register_value_scale_munits_checked.png?direct&600 |}}
  
 For a scale, you set start, end point and its color: For a scale, you set start, end point and its color:
-{{ ::register_value_scale_start_end.png?direct&600 |}}+{{ 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: If you want the value be centered with the scale, choose __windows centered__ option in the Appearance tab:
  
-{{ ::reg_value_appearance.png?direct&600 |}}+{{ 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. 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.
-{{ ::reg_value_scale_edit_mode.png?direct&200 |}}+{{ network:reg_value_scale_edit_mode.png?direct&200 |}}
  
 == Values table == == Values table ==
 Values table widget is identical to that one in the screen editor except for register selector (only from event's actions).  Values table widget is identical to that one in the screen editor except for register selector (only from event's actions). 
  
-{{ ::val_table_editor.png?direct&600 |}}+{{ network:val_table_editor.png?direct&600 |}}
  
 == Bar char, hystogram, pie chart == == Bar char, hystogram, pie chart ==
Line 178: Line 192:
 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.  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. 
  
-{{ev_rep_builder_overview.gif}}+{{network:ev_rep_builder_overview.gif}}
  
  
Line 191: 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 ===
  
 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. 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.
-{{ ::timeline_view.png?direct&600 |}}+{{ network:timeline_view.png?direct&600 |}}
  
-=== Customized report view on screens and dashboards === +=== Advanced customized reports based on events, screens, lua and api === 
  
-getting historical data from events in WebHMI customized report screen or dashboards (using API and Lua)+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 =====
Line 206: Line 233:
 === 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 215: Line 242:
 === 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>
events.1606823923.txt.gz · Last modified: 2020/12/01 11:58 by emozolyak

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki