On the event definition page, it is possible to configure the conditions driving when the event is to be activated or cleared.
Condition Types
When configuring a condition, it is necessary to first select the condition type, which affects the way it is defined and the information involved.
Each type has its own configuration form, allowing to select metrics, properties or other events.
User Reported
Events with this type of condition must reported by user directly in the DPS, or via API requests.
Only these event types support this condition type:
Failure, Anomaly or Operation: can be reported by using the Report Event button in the Event List widget.
Maintenance: can be reported by using the Add Maintenance Activity button in the Maintenance Registry widget.
Work Session: can be created by using the Create Work Session button in the Historical Work Session List widget.
There is no other information to specify for this type of condition.
Simple
You can select a metric or a property, a predicate, and specify a comparison value which can be:
static (e.g. Temperature 1 > 100 °C)
read from another metric (e.g. Temperature 1 > Temperature 2)
read from a property (e.g. Temperature > thing.properties.maxTemperature).
Simple on Binary Value
Other than comparison predicates (e.g. greater than, equal) you can use the Bit at Position predicate which, starting from a binary encoded value (INTEGER, HEX) allows checking the BIT at a specific position (big-endian). When the BIT is 1, the event is considered active, otherwise it is cleared.
The used binary encoding is automatically detected according to the metric type:
Integer, Long: the binary encoding of the metric value is INTEGER.
String: the binary encoding of the metric value is HEX.
This predicate is available into Active conditions only.
Simple on Date Value
When selecting Property as left operand, you can select a property of type DATE and use the following predicates:
Expired by N Days: evaluates whether the date is expired by a specific number of days.
Expired by N Hours: evaluates whether the date is expired by a specific number of hours.
A negative value allows the event to be activated in advance of the date.
Expression
You can select one or more metrics and properties and combine values into a boolean expression.
In addition, you can define multiple conditions to implement an IF-ELSE-IF logic.
This option is available only for Failures, Anomalies and Operations events.
Event Based
It is possible to select another event and define a condition based on its activation frequency.
This option is available only for Anomalies events.
Wear
The event is automatically updated according to the status of a wear metric.
For more details refer to the Wear Metrics article.
This option is available only for Anomalies and Operation events.
Event Computation Limits
For any type of event with an automatic activation condition, you can select the Limit this event computation on a specific time period checkbox, and define the Start and End day of the year when the event can be activated.
Minimum Active Time
In addition, to events of type Failure, Anomaly or Operation you can specify the Minimum Active Time the condition must remain true before activating the event. This makes it possible to discard all cases in which the active condition is triggered for a short time, but the event is not yet to be recorded.