Xentara v2.0.4
User Manual
|
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:
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.
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.
Edge detection elements have the following members:
key | The element’s primary key. |
name | The element’s name. The name is the last component of the primary key. |
UUID | The unique UUID of the element. |
type | The element’s element type. For edge detection elements, this is always “edge detection”. |
category | The element’s category. For edge detection elements, this is always “microservice”. |
risingEdge | This event is emitted whenever a rising edge is detected. |
fallingEdge | This event is emitted whenever a falling edge is detected. |