Skip to main content
14-Alexandrite
November 23, 2016
Solved

Ignore some data samples for Alert

  • November 23, 2016
  • 1 reply
  • 2959 views

Hello All,

I am creating an application where I monitor a Current data stream and in my case in the begging of the process the property has an overshoot that should not be considered (in Red):

I thought about doing a condition with the orange line ( if >7 then Alert). I know I could create a flag and set it but I'm curious to know if there is something that could be done using the Alerts capability.

Any thoughts?

Cheers

Ewerton

Best answer by emoreira

I just tested it and it works!

I subscribed to the property and added this code:

var params = {

  persistent: undefined /* BOOLEAN */

};

(eventData.newValue.value <15.0 || eventData.newValue.value > 490.0)? me.DisableAllAlerts(params):me.EnableAllAlerts(params)

Any other feedback is appreciated!

1 reply

5-Regular Member
November 23, 2016

Sorry, I am confused. You want an alert to fire when what happens exactly?

emoreira14-AlexandriteAuthor
14-Alexandrite
November 23, 2016

I want the alert to fire when the reading exceeds the limits but not in the begging in the process because it is known that this overshoot makes the property to go over the limit and it is not a problem.

Cheers

Ewerton

5-Regular Member
November 29, 2016

You should be able to just add an alert to an integer or number property. Alerts do allow you to set a threshold, if that is what you need. Just go to the property in question, edit it, click "Manage Alerts" and then select "Above" as the type of the alert and enter the threshold in the "Limit" box.