Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx time stamp resolution

Hi,

I am using the DAQ icon to read in analog voltages / waveform from an outside source and then log the data (by sending it out to a text file).  I am currently using the 'write waveform to spreadsheet' function to send the data to a text file.  That function seems to capture the data; however, the time stamp incremements are too large.  They incremement only by the second (even if I specify a data aquisition rate / frequency of 1000 Hz).  Basically, I see all of the data points, but the time stamp does not increment accordingly.   There are enough decimal places in the time stamps to indicate that it should be able to record the time of collection to the millisecond / smaller.  However, it only increments by the second.
For example (if I need 5 samples in 1 second)
17:00:15.000  xxxxx (some data)
17:00:15.000  xxxxx (some data)
17:00:15.000  xxxxx (some data)
17:00:15.000  xxxxx (some data)
17:00:15.000  xxxxx (some data)
17:00:16.000  xxxxx (some data)
17:00:16.000  xxxxx (some data)

I would like to be able to see some numbers behind the decimal point (other than 0s!)  i.e. 17:00:16.123  xxxxx (some data)


Any help will be greatly appreciated!

Thanks,
Stephanie
0 Kudos
Message 1 of 4
(3,402 Views)

Hello Stephanie,

This question is addressed in this knowledgebase article.  The only thing I would add is to be sure to save your modified subVIs under a new name and location so that you do not permantly replace the ones that are installed with LabVIEW.  If you permantly replace subVIs, you never know what other VIs you may be affecting!

Let us know if you have additional questions.

Regards,
Laura

0 Kudos
Message 2 of 4
(3,381 Views)
Hi Laura,

Thanks for the help...I actually had already found that article and changed the vi accordingly.  However, I didn't actually get time stamps with the actual time.  I just got the time stamp with however many decimal places I specified, but everything after the decimal place was a 0.

Do you have any suggestions as to why this is happening?

Thanks,
Stephanie
0 Kudos
Message 3 of 4
(3,375 Views)

Hi Stephanie,

I have tested the 'Write Waveform to Spreadsheet' function using a simple waveform that I built with a 'Build Waveform' function. I built the waveform with an array of 4 data points, a timestamp for the initial time and a dt of 0.001 seconds.  I also made the modification to include 4 decimal places.  This produced the following entries in my file:

t0 7/17/2006  15:37:16.5140
delta t 0.001000

time Y
7/17/2006  15:37:16.5140 1.000000
7/17/2006  15:37:16.5150 2.000000
7/17/2006  15:37:16.5160 3.000000
7/17/2006  15:37:16.5170 4.000000

This shows the time incrementing correctly.  This leads me to believe that the issue is not in writing to the file, but in the waveform time data itself.  You can test this theory by trying the method described above to see if you get the correct time values.  Alternatively you can also look at your waveform time data that is being passed in.  This can be done by wiring the waveform to the 'WDT Get Waveform Time Array'  and  'To Timestamp' functions and displaying the output. 

Hope these suggestions help to diagnose the issue.  Please let us know if there is anything further we can do to help.

Regards,
Jennifer O.

0 Kudos
Message 4 of 4
(3,334 Views)