LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Are there Background Timer Labview?

IN lab windows I can set a background time to activate every 3-5 minute. I use this to update a log file. In the time between the 3-5 minute update I need to be able to handle front panel commands, GPIB based sets and reads. In LabView all the timers interfere with my front panel. How do I make the timer a background function and not a wait for N milliseconds?

Thanks

Tim
0 Kudos
Message 1 of 4
(3,212 Views)
You could use a wait function in a separate while loop and use a queue or local variable to pass the data from a main loop. You could also in your main VI use either Tick count or Get Date Time In Seconds. Initialize a shift register with a start time and inside the loop, get the current time, subtract the start time and see if its greater than your log interval. When it is greater, do the logging and set the shift register value equal to the current time.
0 Kudos
Message 2 of 4
(3,212 Views)
Thanks Dennis,
I will try the shift register solution and see if I can keep the front panel responsive and do the logging.

Tim
0 Kudos
Message 3 of 4
(3,212 Views)
> IN lab windows I can set a background time to activate every 3-5
> minute. I use this to update a log file. In the time between the 3-5
> minute update I need to be able to handle front panel commands, GPIB
> based sets and reads. In LabView all the timers interfere with my
> front panel. How do I make the timer a background function and not a
> wait for N milliseconds?
>

I didn't see the othe posts, but have you tried to run something in
parallel? You can make a parallel loop in your top level VI or
dynamically launch up a parallel VI.

In this loop, do a waitms followed by the notification or action you
want to perform.

Greg McKaskle
0 Kudos
Message 4 of 4
(3,212 Views)