From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reseting boolean value on alarm reset in LabVIEW 2009

Solved!
Go to solution

Hi all, bit of a newbie here.

 

My goal is to read a set of virtual sensors, when one is "tripped" it starts an alarm timer sequence and if the "reset" is hit in time the alarm doesn't go off. I think I have it up to that point, where I am a little confused is how to reset the alarm boolean to false, if the alarm does go off. I'm thinking it needs to be outside the loop, but I don't know how. Any help/guidance would be greatly appreciated, thanks.

0 Kudos
Message 1 of 4
(4,226 Views)

Hi tbaraks,

  Just see the block diagram here...Example_VI_BD.png

Regards,
Srikrishna


0 Kudos
Message 2 of 4
(4,194 Views)

Create local variable of alarm boolean indicator and pass "False" value in "False" case structure.

Gaurav k
CLD Certified !!!!!
Do not forget to Mark solution and to give Kudo if problem is solved.
0 Kudos
Message 3 of 4
(4,184 Views)
Solution
Accepted by topic author tbaraks

Hi,

 

Your block diagram is pretty well organized - so good job on that.

 

There is no delay in your main loop. This causes a big CPU load when no sensor is "tripped".

 

The way you implemented the timer function works but is not very flexible when you make program changes. Timers are very easy to create using "action engines". You can use the Express Timer vi, but I find that the side effects often take more time to deal with than just making your own.

 

Your "alarm loop" has controls and indicators inside it and it holds up execution of the main loop. This can give you problems like how to reset the alarm and it causes the Stop button to not work when an alarm is in process.

 

Check out the attached example. Use probes and Highlight Execution to "see" how the code works.

 

steve

 

pic.png

 

--------------------------------------------------------------------------------------------------------------------------
Help the forum when you get help. Click the "Solution?" icon on the reply that answers your
question. Give "Kudos" to replies that help.
--------------------------------------------------------------------------------------------------------------------------
Download All
Message 4 of 4
(4,166 Views)