LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Uninterruptible count down timer!

Hi
I'm a newbe in Labview and I have the followning problem: When a event occurs a signal should should "stay high" for at least 30 sec.
 
So I need an uninterruptible count down timer! - that is when an event accours (boolean true/false) a count down timer should start! and NOT stop even when the boolean changes!! I have tried different approaches! and I can figure out have to create a count down timer! but NOT one that keeps going when the boolean "changes back"?????  hope you know what I mean?
0 Kudos
Message 1 of 4
(2,902 Views)
Hi newbi 🙂

look at the attached vi (7.1). just an example for how it might work.

Regards,

balze
0 Kudos
Message 2 of 4
(2,892 Views)
SInce you say "for at least 30 sec", the precision does not seem too important and its not worth to spin fast loops.
  1. You could just grab the current millisecond, then in a leisurly loop check every 500ms or so if the elapsed time exceeeds your timeout.
  2. You could just set an occurence when the event occurs, then use "wait on occurence" with the desired time wired as timeout. Now just wait until it times out. 😉
  3. Another possibility would be to use the timeout case of an event structure.
 
 
0 Kudos
Message 3 of 4
(2,880 Views)

Thanks guys, I'll try it out....I might ask again laterSmiley Wink

 

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