Delay from alarm fired to alarm sounding?


Recommended Posts

Hello All,

How can I set a timer for an alarm, so that a condition has to be true for at least x seconds before the alarm fires? we have duty / standby pumps that switch over every now and again, and when they switch the system shows a fault for about 2 seconds until the other pump comes online. It is annoying having the alarm sound everytime the pumps switch over duty.

Any help much appreciated.

Cheers

Paul

Link to comment
Share on other sites

You use a little boolean trick. Lets say you want the alarm to trigger if the last 10 readings of MyChannel are > 5:

min(mychannel[0,9] > 5)

mychannel[0,9] is an array with the last 10 values.

mychannel[0,9] > 5 is an array of 1's and 0's with 10 elements. There is a 1 everywhere it is > 5, and 0 where it is not.

Doing min() on that array tells us if any of the elements are < 5. If so, min() will return 0. If not, then the array is filled with 1's and so min() returns 1 and the alarm fires.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.