Result
Understand how to create an Event definition to generate Event Periods that are not strictly aligned to calendar-based Time Periods.
Tutorial steps
- Create a new Event
- Define Start and End Triggers for an Event
Events
Up until now, you have used Flow to retrieve, calculate, and report on time period summary information. Flow understands event periods, allowing the association of additional contextual information overlaid onto the summary information.
Locate the "FL001.State" (Filler 1 State) tag in your Historian. Double-click on it to open the Data Source Preview …
Zoom out to show about 15 hours of detailed data. Notice the Filler 1 cycles through a pattern of states. The states are:
0 = Idle
10 = Setup
20 = Running
30 = CIP
Flow can be used to automatically detect the start and end of event periods. Let’s define an event that starts when the Filler state changes to 10 ("Setup") and ends when the Filler state changes to 30 ("CIP").
Start by creating a metric named "Filler 1" in the "Filler 1" folder, and then drag the FL001.State tag from your data source onto the Filler 1 metric to create a new tag in Flow. Since the data source does not have an engineering unit for this tag, it will be created with the UOM that is configured in your Defaults Toolbar. You may need to change the UOM of the created tag - set it to a blank UOM.
Then, drag the Event icon from the Flow Zone onto the "Filler 1" folder …
Rename this event to "Filler 1 Run".
Event Editor
Double-click on the new event to open its Editor …
General Properties
The top section of the Event Editor displays a few general properties for the Event:
- Description – Event description.
- Refresh Offset – this is the number of seconds before "now" that Flow will start querying the Historian data. Flow defaults this property to 0 seconds.
- Minimum Duration – this is the number of seconds that an event must last (between the start and end trigger times) before Flow creates an event period. This can be used to filter out spurious event creation
- Maximum Duration – this is the maximum number of seconds that an event can last (between the start and end trigger times). After this duration, Flow will end an open event period even if it doesn't receive an end trigger. This can be used in instances where a manual intervention is expected to end an event, but the user forgot to intervene.
- Backfill – the date and time used by the Engine to go back in history and retrieve the event period information from the Historian.
Triggers
Event Triggers define how Flow determines the start of an event and the end of an event. Locate the "FL001.State" tag that you created in the Model View and drag it into the "Triggers" section …
Flow creates a "Start Trigger". Notice Flow has created a link to the "FL001.State" tag and set the default "Trigger" condition properties. Let’s discuss these trigger properties:
- Trigger – this defines the type of condition Flow will use to detect the trigger event.
- For Period (s) – the number of seconds for which the trigger condition must be true before Flow creates an event period. This can be used to filter out spurious trigger conditions
- Condition – this tells Flow how to evaluate the tag’s value against the "Condition Value".
- Condition Value – this is the value Flow evaluates the tag’s value against to determine whether an event is triggered.
- Tag* – This is the tag Flow will monitor in the data sources and evaluate against the "Trigger" condition properties (*Optional - only if the item was dragged directly from a data source - not displayed if the Trigger source is a Flow tag)
For the "Start Trigger", set the trigger "Condition Value" to 10. Flow will use this to start a new event period when it detects the tag’s value is equal to 10 ("Setup" state).
Now drag the "FL001.State" tag onto the "Triggers" section again …
Flow creates an "End Trigger". Set this trigger’s "Condition Value" to 30 ("CIP" state).
Deploy the Event and open the "Triggers" diagnostic chart window. Refresh the diagnostic chart and confirm that event periods have been detected and created by Flow.
Note: If you create an Event with no triggers, you will need to create an "Event Period" form to manually insert event periods.