ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

get time stamp from waveform data

Solved!
Go to solution

Hello all,

 

i am trying to pull out the time stamp from the waveform data if this is possible. I am trying to write it to file, but the express vi doesnt allow for fractional seconds and when i write the waveform data to a string for use with write to spreadsheet, the time data is lost. 

 

any suggestions?



-Matt
0 Kudos
Message 1 of 7
(4,859 Views)
Solution
Accepted by Wolleee
Use the Get Waveform Components. What express VI? The Write to Measurement File does write fractional seconds.
0 Kudos
Message 2 of 7
(4,856 Views)

Thank you Dennis, I figured it out like right after i posted.  Another question though.  So im using a producer consumer loop and gathering data at 1000 samples per channel.  Im trying to write this data to a file with a time stamp, but in the consumer loop when i get the time stamp from the waveform and rebuild the array, i only get one time stamp per 1000 samples.

 

Any ideas how to fix this?  I can post code if necessary.



-Matt
0 Kudos
Message 3 of 7
(4,846 Views)

Make sure you are using a double to express fractional values.  An INT would return values like what you are seeing.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 4 of 7
(4,841 Views)
There is only a single timestamp in a waveform t0. There is also dt. You can calculate a timestamp for each element if that is what you are asking.
0 Kudos
Message 5 of 7
(4,837 Views)
There is only a single timestamp in a waveform t0. There is also dt. You can calculate a timestamp for each element if that is what you are asking.
0 Kudos
Message 6 of 7
(4,835 Views)

That sounds like what i am looking for. 

 

Thank you Dennis.



-Matt
0 Kudos
Message 7 of 7
(4,824 Views)