События/en — различия между версиями

Материал из WebHMI Wiki
Перейти к: навигация, поиск
(Новая страница: «<p>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…»)
(Новая страница: «As an example of the event report, let's consider the task of determining the time interval when a certain parameter took a given value (1), recording additional…»)
Строка 3: Строка 3:
 
After the event is created, its data becomes available as reports in the ''' Configuration - Reports ''' menu, and it is also possible to present data on the timeline ('tape') available in the '''Reports - Timeline ( Reports / Timeline) '''(after selecting the Show on timeline option for one of the events).
 
After the event is created, its data becomes available as reports in the ''' Configuration - Reports ''' menu, and it is also possible to present data on the timeline ('tape') available in the '''Reports - Timeline ( Reports / Timeline) '''(after selecting the Show on timeline option for one of the events).
  
Рассмотрим в качестве примера работы событийного отчета задачу определения интервала времени, когда некоторый параметр принял заданное значение (1), и дополнительные данные связанные с этим событием - время начала и окончания этого интервала, и значние некоего параметра - последнее значение. В качестве источника сигнала будем использовать данные регистра D0 (битовый). Для создания событий выбираем п. меню '''Конфигурация/События (Setup/Events)''', затем '''Создать событие (Add new event)'''. Назначение базовых настроек показано на рисунке. Поскольку событие длящееся, необходимо не забыть указать соотвествующую опцию.  
+
As an example of the event report, let's consider the task of determining the time interval when a certain parameter took a given value (1), recording additional data associated with this event - start and end time of this interval, the last value of a certain parameter. As the signal source, we will use register data D0 (bit).
Родителькое событие означает, что данное событие будет регистрироваться только при условии наступления вышестоящего, родительского события. <br>
+
To create events, select the menu item '''Configuration / Events''' , then ''' Add new event'''. The basic settings are shown in the figure. Because the event is continuing, you must remember to specify the appropriate option.
 +
A parent event checkbox means that this event will only be registered if the parent event occurs.<br>
 
[[Файл:Edit event basic.png|750px]] <br>
 
[[Файл:Edit event basic.png|750px]] <br>
<p>Вкладка '''Условие (Condition)''' служит для собственно формирования условия выполнения события:<br>
+
<p>The '''Condition''' tab serves for defining event trigger condition:<br>
 
[[Файл:Condition.png|750px]]<br><br>
 
[[Файл:Condition.png|750px]]<br><br>
Визуальный редактор позволяет "склеивать" логические выражения в цепочки условий, в т.ч. с несколькими уровнями вложенности. Доступны следующие блоки:
+
The visual editor allows you to 'glue' the logical expressions in a chain of conditions, with several levels of nesting if required. The following blocks are available
::'''Logic''' - логические операторы "НЕ", "И", "ИЛИ", и сравнения - "равенство", "неравенство", "больше", "меньше", "больше или равно", "меньше или равно";
+
::'''Logic''' -logic operators "NOT", "AND", "OR", and comparison - "equal", "not equal", "greater than", "less than", "greater or equal", "less or equal";
::'''Math''' - арифметические блоки - константа, либо операция сложения,вычитания,умножение, деление;
+
 
::'''Registers''' - блоки выбора регистра для включения в логические или арифметические выражения;
+
::'''Math''' - arithmetic blocks - a constant, or an operation of addition, subtraction, multiplication, division;
Событие может иметь разные условия начала и окончания.  
+
::'''Registers''' - selection  block to include a register in logical or arithmetic expressions;
 +
The event may have different conditions for start and end.  
 
<br>
 
<br>
Вкладка '''Action''' настройки событий определяет что, как, и когда записывается в структуру данных отчета событий. <br>
+
The '' 'Action ''' tab of the event settings determines what, how, and when have to be recorded in the event report data structure. <br>
 
[[Файл:Action .png|750px]]<br><br>
 
[[Файл:Action .png|750px]]<br><br>
  

Версия 14:31, 9 октября 2017

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, end, 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.

Thus, the events allow you to conveniently filter out the necessary data for each of these conditions for their occurrence, and obtain separate structured reports for each event separately. 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. After the event is created, its data becomes available as reports in the Configuration - Reports menu, and it is also possible to present data on the timeline ('tape') available in the Reports - Timeline ( Reports / Timeline) (after selecting the Show on timeline option for one of the events).

As an example of the event report, let's consider the task of determining the time interval when a certain parameter took a given value (1), recording additional data associated with this event - start and end time of this interval, the last value of a certain parameter. As the signal source, we will use register data D0 (bit). To create events, select the menu item Configuration / Events , then Add new event. The basic settings are shown in the figure. Because the event is continuing, you must remember to specify the appropriate option. A parent event checkbox means that this event will only be registered if the parent event occurs.
Edit event basic.png

The Condition tab serves for defining event trigger condition:
Condition.png

The visual editor allows you to 'glue' the logical expressions in a chain of conditions, with several levels of nesting if required. The following blocks are available

Logic -logic operators "NOT", "AND", "OR", and comparison - "equal", "not equal", "greater than", "less than", "greater or equal", "less or equal";
Math - arithmetic blocks - a constant, or an operation of addition, subtraction, multiplication, division;
Registers - selection block to include a register in logical or arithmetic expressions;
The event may have different conditions for start and end.
The 'Action ' tab of the event settings determines what, how, and when have to be recorded in the event report data structure.
Action .png

При выборе опции "Добавить регистры в отчет (Save to log)" появится возможность задания регистров условия вида Ey.x.(полное описание см здесь). Регистры условий нумеруются от 0 и далее по возрастанию (х - это индекс), y - идентификатор события, который присваивается ему при создании и отображается в списке событий. В качестве параметра записываемого в регистр условий может быть 4 варианта:
  • Start time - время начала события
  • End time - время окончания события
  • Last update time - время последнего обновления, фактической регистрации события
  • Произвольный регистр из списка объявленных в меню Registers - при этом в третьей колонке настроек отчета можно будет дополнительно выбрать обработку этого регистра -взять минимальное(Min), максимальное значение(Max), первое значение при старте события(First Value) или последнее при его окончании(Last Value), среднее значение (Average Value).
<p>Настройки для регистров условий в и используемом нами примере приведены на предыдущем рисунке. Название столбцов отчета могут изменены. Для регистров E2.0, E2.1, содержащих время, используется строка задания формата, принятая в PHP. Для регистров E2.2, E2.3 заданы мин и макс. значения соответственно.Е2.4 - усредненное значение регистра на протяжеиии события.

Результатом настройки данного события станет появление в меню Reports отчетов такого вида:

Event report example copy.png

Поскольку при создании события была также указана опция "Show on timeline", все события будут сохранены и также и на ленте. Выноской с точкой на оси отмечается начало события, либо однократное событие. Удерживая нажатой основную кнопку мыши, можно сдвинуть график по горизонтали, "прокруткой" колеса мыши изменяется масштаб.

Time line.png