paulparry Posted March 30, 2010 Share Posted March 30, 2010 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 More sharing options...
AzeoTech Posted March 30, 2010 Share Posted March 30, 2010 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 More sharing options...
paulparry Posted April 1, 2010 Author Share Posted April 1, 2010 Many thanks for that, I assume that you enter this in the 'expression'? I will experiment and let you know. Cheers Paul Link to comment Share on other sites More sharing options...
AzeoTech Posted April 1, 2010 Share Posted April 1, 2010 Yes, that would go in the fire expression. You might use something similar for the reset expression. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.