Xentara v2.0.3
User Manual
Edge Detection

Edge detection elements monitor the value of a data point or skill data point to detect rising and falling edges. Edge detection elements can monitor data points whose values have the following types:

  • Boolean values
  • Numeric values
  • Time stamp values

For Boolean values, a rising edge is detected whenever the value goes from false to true, and a falling edge is detected whenever the value goes from true to false. For numeric and time stamp values, a rising edge is detected whenever the value increases, and a falling edge is detected whenever the value decreases.

Edge detection elements expose two events named risingEdge and fallingEdge that are raised whenever the corresponding edge is detected.

Handling of Quality of the Monitored Value

When performing edge detection, only values with quality “good” or “acceptable” are considered. Values with quality “unreliable” or “bad” are ignored. This is necessary to prevent false edges from being detected during communication failures. If a Boolean signal acquired from a PLC is true, for example, a temporary interruption in communication will cause the value to be read as false for the duration of the interruption. If bad values were not ignored, this would falsely detect a falling edge at the beginning of the interruption, and a rising edge at end.

If the value of the signal goes to false while communication is interruted, however, the resulting falling edge will be detected correctly, because the value of false read once communication is re-established will have a quality of “good”, and hence will not be ignored.

Accessing Edge Detection Elements

Edge detection elements have the following members:

Attributes
keyThe element’s primary key.
nameThe element’s name. The name is the last component of the primary key.
UUIDThe unique UUID of the element.
typeThe element’s element type. For edge detection elements, this is always “edge detection”.
categoryThe element’s category. For edge detection elements, this is always “microservice”.
Events
risingEdgeThis event is emitted whenever a rising edge is detected.
fallingEdgeThis event is emitted whenever a falling edge is detected.