LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

time stamp each data point

I can't run your VI but you should be getting a time column with the time between samples in it. The Write to Measurement File does not write absolute time. You could select multiple headers I believe to get a time stamp for each acquisition.

0 Kudos
Message 11 of 16
(513 Views)

Although the DAQ is timed by an internal clock, how do I know the data from the buffer on the DAQ is begin recorded at every loop intation?

 

I've attached a screen shot of the entire VI.

 

How should I save my vi such that others can open it?

 

Thanks

 

0 Kudos
Message 12 of 16
(507 Views)

To truly run it, someone would need the exact same hardware as well as the driver.

 

I replaced the epos code with a random number generator and got exactly what I would expect. With number of samples set to 3000, I got 3000 lines of data with aed with a dt of .0004 which corresponds to a sample rate of 25kHz. And every 3000 samples, the file showed the random number as well as the tick count value.

 

Why are you doubting that some data might be missing?

0 Kudos
Message 13 of 16
(502 Views)

I suppose the better question I should ask is why the timestamps for WritetoMeasurementfile.vi are different from those of the Tick Count.vi?

 

What exactly are the time stamps in WritetoMeasurementfile.vi and how do they differ from recording the Tick Count.vi values?

0 Kudos
Message 14 of 16
(480 Views)

Did you look?

 

If you open the front panel of Write to Measurement File.vi and dig deep enough you will find that it uses the Get Data/Time in Seconds function or the timestamp from the Waveform input.

 

The Get Date/Time in Seconds function uses the computer's time of day clock.  This is a different clock than that used by Tick Count and the two are competely uncorrelated.  The tick count is approximately the number of milliseconds since the computer was last booted up.  It is a U32 and will roll over in about 49 days if the computer runs that long without restarting.  The time of day clock runs from a different oscillator (usually battery backed to keep time when the computer is off) and the times can be adjusted by the OS if it is connected to a time server and is configured to do so.

 

Lynn

0 Kudos
Message 15 of 16
(470 Views)

Thanks Lynn,

 

I've been using the difference in Tick Count time outside and inside of my Active Positioning while loop to get the amout of time the system has been recording. I was confused because the two times were different however I now believe that although they are different they are both correct... I'm going to ask another question about this but not in this thread because it's not as related to time stamping.

0 Kudos
Message 16 of 16
(450 Views)