LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I set up a program to stop at a certain time, or after a period of time?

I am using LabVIEW to measure dc voltages over a period of time. The data is exported into an Excel file.  I would like to be able to set up the program to stop at a certain time, or after a certain number of hours.  This way when I run a test that will start near the end of the week and would stop on say, Saturday, it will not continue to record all the data after that, which I do not need. I would love to be able to set a time for it to end, but I  also wouldn't mind having it end, or stop recording data, after a certain voltage has been reached.
0 Kudos
Message 1 of 6
(3,274 Views)
Its hard to say without knowing more about how your program is set up.  Assuming the data aquisition is in a while loop, you can just wire a bunch of different stop conditions into a compound math node.  Then right click on it and select "OR".  A caveat about the comparisons I used in my little example: Comparing DBLs can lead to unexpected results when the two values are very close together.


Message Edited by jasonhill on 06-16-2006 10:59 AM

0 Kudos
Message 2 of 6
(3,267 Views)
here is a vi that runs for a certin amount of time
0 Kudos
Message 3 of 6
(3,260 Views)
The millisecond timer does wrap.  Sure it takes over a month to do so, but it could lead to some interesting results.  I am not 100% certain, but I think the timer starts at bootup.  So if you have longish uptimes, expect a hiccup about every 50 days.
0 Kudos
Message 4 of 6
(3,257 Views)
the timer does reset at bootup
0 Kudos
Message 5 of 6
(3,251 Views)
Thanks for the help guys, I was able to get it to work for my program. I appreciate it!
0 Kudos
Message 6 of 6
(3,230 Views)