LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I get exact timing of signals measured to save in a datafile?

I know about using timestamps (an initial and a current) to get time data each time a loop is run, or using a for loop to add increments of the amount of time that was supposed to occur between each sample measured from a device.  However, I would like to be able to get the actual time that each sample was taken.  For instance, I've got a while loop with a DAQ Assistant, set up to read 100 samples each time it's run at, say 1kHz.  I'm reading that data into a queue to be saved in a second loop, but I don't have accurate time data.  I know I could use the time increment that each sample was supposed to be taken, but this isn't necessarily accurate, especially when, during the first few iterations of my measurement loop, the time for the functions and vi's in the loop to all be implemented varies before it becomes more consistant.  Can anyone tell me if there is a build in attribute or a way to set something up to time everytime the "readmx" function reads 1 sample from a particular channel?

0 Kudos
Message 1 of 5
(2,558 Views)

If you are using DAQ assistant you can create a task with Data logging enabled in MAX. So this will automatically log the data along with the exact time stamp of the sample when you start to acquire the data.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 2 of 5
(2,548 Views)

I tried out the log option in the DAQ assistant, even though I was planning on sending the data out in a queue and saving later on in the program, but the result was just a time stamp when the DAQ started measuring data.  There was still no time stamp for every data point from a channel.  Is there something else I can try?

0 Kudos
Message 3 of 5
(2,526 Views)

You can acquire the data as waveform and then seperate the data and the timing componenet then you can log the data as per your wish.

 

good luck

-----

The best solution is the one you find it by yourself
0 Kudos
Message 4 of 5
(2,516 Views)

Thanks for the advice.  I ended up just taking one measurement at a time from each channel, and using LabVIEW's timestamp to save the time of each measurement, though I see that I can also get the time for that one measurement from the waveform information, as you stated.

0 Kudos
Message 5 of 5
(2,474 Views)