drbitboy
Lifetime Supporting Member
huh.No, I didn't use a FIFO.
I reset the pointer to 0 every scan then checked all the alarms and ended up with an array of all the active alarm codes (which did get entered in numerical order and the display scrolled through that order)
If an alarm went away (IE - a not latching warning that self clears) then that display would immediately drop out of the array and at the end the pointer would be one less.
This way it was one rung to 0 the pointer then one rung per condition checked. For the OP 21 lines to set the array.
The display was 1 rung if pointer=0, 1 if pointer =1 and if >1 then the timer, display pointer and display was 4 or 5 rungs
So let's say alarms 1, 2, 3, and 4 are active, and the display is announcing 4, i.e. the last of the four (I assume there is a separate index that steps through the current list). Now assume alarm 2 is acknowledged or cleared, and there are only 3, but the display index is still on 4.
Or 1, 2, and 3 are active, and the display is just finishing announcing 2 i.e. the second of the three, and 2 is acked/cleared but 5 goes into alarm, so the length is still 3 and the items are 1,3,5, and the display index jumps to alarm 5 in the third position, skipping alarm 3.