Factry Historian
Events
Event configuration
once the event types with their according event properties are set up, you can link an event type to a particular asset to start configuring the event detection first select an asset from the asset tree and click configure event next, the detection mode can be chosen to be either historian , schedule , manual , or external database the different detection modes are elaborated event configuration /#detection mode further, an already existing event type can be linked optionally, a parent event configuration can be given it is recommended that the parent event configuration is of the same event type as the parent event type configured on the selected event type detection mode a trigger measurement can be used by opting for historian as the detection mode or a recurring schedule can be used by opting for schedule as the detection mode detection mode historian the historian detection mode works by observing the values of a trigger measurement for a change whenever the value of the trigger measurement changes, that timestamp is used to start a new event, next to closing the previously open event on the same timestamp take into account, if the new value of the measurement is considered a zero value (depending on the datatype), the previous event will be stopped but a new event will not be created zero values the values considered as zero values with respect to event detection for each datatype are listed below boolean false number 0 string "" (an empty string) refresh interval to prevent the creation of an event with an incorrect start time the event detection will only start creating new events after the first change in value is detected the refresh interval at which the detection is evaluated can be adjusted by using the refresh interval grace period to ignore value changes and consequently triggering a new event, a grace period can be configured if a value changes and subsequently the value changes back to the former value within the grace period, the current event will not be closed and no new event will be started thus, the grace period is the time period for which value changes are ignored or can be seen as the minimum time between value changes example historian event detection an example of the historian detection mode by observing the values of the trigger measurement “batch label” value time event detection 5ab 2006 05 04 12 59 start of event detection 5ab 2006 05 04 13 00 no action 5ab 2006 05 04 13 01 no action 2006 05 04 13 02 close previous event 16ba 2006 05 04 13 03 open new event 16ba 2006 05 04 13 04 no action 17b0 2006 05 04 13 05 close event, open new event 2006 05 04 13 06 close event 17ba 2006 05 04 13 07 open new event this results in the creation of 3 new events event start time stop time 1 2006 05 04 13 03 2006 05 04 13 05 2 2006 05 04 13 05 2006 05 04 13 06 3 2006 05 04 13 07 ongoing detection mode schedule the schedule detection mode allows for generating events based on a recurring schedule by means of an {{rrule}} , this event detection can be configured an rrule is a recurrence rule which defines a pattern to generate a set of timestamps to setup new events their syntax is defined by the rfc5545 standard to setup a schedule event detection, add a recurrence rule for generating a set of start timestamps and optionally add another recurrence rule to close the corresponding events multiple recurrence rules can be combined for either the start timestamps and/or the stop timestamps one recurrence rule for the start timestamps is required example schedule event detection an example of the schedule detection mode to generate a set of start and stop timestamps for new events start rules stop rules this results in the creation of 2 new events per weekday event start time stop time 1 xxxx xx xx 08 00 xxxx xx xx 14 00 2 xxxx xx xx 14 00 xxxx xx xx 22 00 for further information on rrule including a useful gui to build a recurrence rule, visit rrule ui detection mode manual the manual event detection mode allows for events to be manually started/stopped inside manual entry forms no further configuration is needed for this detection mode detection mode external database the external database detection mode works by querying a database for start and stop times to generate events external databases docid\ hxsoval3 n 8k nzynh2f can be configured by going to configuration > external databases the query should return a table with one or two columns (any more columns will be ignored) the first column should contain the start times of the events, the second column (if it is present) should contain the stop times of the events if only start times are available in the dataset, the stop time for an event will be based on the start time of the following event you can use query parameters to narrow down your data selection, which includes the asset metadata for example, given the following database table event times type start time stop time pump1 2024 12 27 08 00 2024 12 27 14 00 pump2 2024 12 27 09 00 2024 12 27 15 00 we can create this query to generate events for a specific asset type select start time, stop time from event times where type='pump1' and stop time < $1 we can create more dynamic queries, based on asset metadata select start time, stop time from event times where type=$1 and stop time < $2 if no stop times are available we can ommit that column select start time from event times where start time < $1 re evaluation of events by selection an asset in the asset tree and clicking the re evaluate button in the top right corner, all events underneath that asset can be re evaluated for the indicated time period in this way, events can be detected on already existing historian time series data note that this will not overwrite events which have been edited by hand (flagged manual ), nor will interfering existing events be deleted unless the option ‘delete previously generated events’ is selected in the re evaluation popup to re evaluate only one event, see events overview docid\ c8io8ran hflre7awpyc