LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I allow an alarm to be set based on a comparison but then NOT aloow the alarm to clear until a button is pressed?

I have a program that compares DAQ values to a threshold value. If the value surpasses the threshold, an led blinks. The problem is, if the value then goes back below threshold the blinking will stop, as a result of the comparison being False. What I want is to allow the alarm to begin the blinking but not allow it to stop until I press another button, essentially clearing the alarms. I am just flabbergasted at how to accomplish this. Any ideas?
0 Kudos
Message 1 of 4
(2,676 Views)
Is the comparison within a loop?

If so, you can place a shift register to the loop. Right-click the edge of the loop and select "Add Shift Register".

Initialize the shift register with a boolean that set the alarnm LED off. Within the loop, place a Case Statement where you change the boolean value if the threshold is above the level. If the value drops, or never goes beyond the threshold, do not change the value.

You can place a "reset button" within the Case Statement to clear the LED.

I will prepare an example and post it in a moment...

JLV.
Message 2 of 4
(2,676 Views)
Attached is an example of what I described.

If you turn the dial past 5 the LED will turn ON.
If you turn the dial down (even to 0) the LED will remain ON until you reset the alarm (RESET button).

If you press RESET while the alarm is active, it will only turn OFF the LED when the value is below 5.

You can stop the vi by pressing STOP.

Hope this is what you were looking for..

enjoy..

JLV
Message 3 of 4
(2,676 Views)
Thank you very much.
I actually came up with a similar solution before your response. I just created a state machine within my loop and made it so if the alarm ever goes on, the next state is permanently alarmed until the reset button is pressed. The shift registers did the trick. Thanks again!
0 Kudos
Message 4 of 4
(2,676 Views)