LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

recording time

Hi,  I'm new to this but I am working on a project and I need to record the time that passes while taking a measurement.  I am trying to find the flowrate based on the amount of fluid (volume) divided by the time it takes for this volume to pass through.  I was hoping there was some way I could set it up so that when there is voltage excitation above a certain point, LabVIEW would begin to record the time and then stop again when the voltage fell back below a certain level. 
 
I was wondering if there is a certain function that can be set up to record time in this fashion, possibly using a case structure?  Another way I've considered to manipulate the DAQ assistant task triggering options, but I keep receiving errors.  Hopefully I have explained my problem clearly and hopefully someone knows how to do what I am trying to do.  Thank you very much, and If needed I can attach my file or a picture of it. 
0 Kudos
Message 1 of 2
(2,512 Views)
There are several options you can use depending on what you are trying to accomplish.
 
If you just need an aggregate time between measurements, you can use the Tick Count vi. This vi will give you a time in milliseconds that has no relation to actual clock time, but is very precise. You would get a tick count when you start the measurement, then another after the measurement completes. Lastly, you would get the difference of the two to get the elapsed time, in milliseconds. The millisecond timer will roll over (go back to zero) after 2^32 -1 milliseconds or about every 50 days. You should check to make sure the time did not roll over by making sure the second reading is greater than the first. Obviously, if your measurement is expected to take longer than 50 days, this wont work.
 
If you need this related to clock time, you can do the same thing with the "Get date time in seconds.vi" This will work no matter how long the measurement is, but is only precise to the nearest second.
 
The attached file shows both vi's I am referring to, as well as an example on how to use them in the manner to which I am referring. It is saved in version 8.0 so the most people can use it as I can provide.
CyberTazer
Software Systems Engineer
0 Kudos
Message 2 of 2
(2,503 Views)