Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

No timestamp in TDMS file log

Solved!
Go to solution

Hello,

 

I tried searching for this issue but could not find a thread that matched. I am using a NI USB-6218 DAQ to monitor several analog channels and having some trouble with the logging feature. I am going off an example I found and everything works fine except for the timestamp. When I open the TDMS file, I see the channels I selected and their voltages but no corresponding time. The timestamp shows up in Charts, Graphs and Numeric Indicators in the VI itself but not the spreadsheet with the monitored voltages in the task. The time is also left blank in the main Excel spreadsheet (task is the second sheet in the file). 

 

Could anyone offer a suggestion on why this is happening?

Hope to hear from you,

Yusif Nurizade

0 Kudos
Message 1 of 13
(10,373 Views)
What example? How are you generating the time? It's it coming from a waveform data type or something else? Please attach your code and a portion of the tdms file.
0 Kudos
Message 2 of 13
(10,363 Views)

Dennis,

 

Thank you for the reply and please forgive me for not being more specific.

 

The example I initially used was Voltage - Continuous Input.vi. I am not sure how the time is being generated  - I can see the correct time in my graphs/charts and when I create an indicator for the waveform. The same time does not show up on the TDMS file and I don't see the control in the logging subVI that would enable it.

 

The forum won't let me upload the TDMS file itself or a zip containing it. I've saved it as an Excel file and uploaded it with the VI.

 

Best,

Yusif Nurizade

Download All
0 Kudos
Message 3 of 13
(10,338 Views)
Solution
Accepted by Akello

Nope, the timestamps are not saved.  In the metadata for the group should be a start time (T0) and a sample rate (dt).  From those, the time of each sample can be calculated.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 13
(10,335 Views)

crossrulz,

 

Thank you for the reply.

 

Could you please clarify whether you mean the time stamps are not saved in my application or for the DAQmx logging subVI as a whole? In either case, I am curious why the graph, for example, displayed the correct time during operation. Is there a way to have the time stamp automatically included as a column next to the channel readings or will I have to generate it myself every time?

 

Best,

Yusf Nurizade

 

0 Kudos
Message 5 of 13
(10,331 Views)
All that you need for a graph or chart is the start time and the delta t. Basic LabVIEW knowledge. That is what is in the file. Where do you require the absolute timestamps?
0 Kudos
Message 6 of 13
(10,328 Views)

Dennis,

 

I need the timestamps in the column to the right of the channel readings from the task. In my file, the task is named _unnamedTask<C>.

 

Is there a way I can do this automatically instead of having to add it myself?

 

Best,

Yusif Nurizade

0 Kudos
Message 7 of 13
(10,325 Views)
What I meant by where it's required is are you going to be using some other application to analyze the data? If you do a tdms read with LabVIEW to post process the data, the start time and dt is all that is required. You would have to manually add your calculated timestamps if you want them displayed in Excel. I've never had the need.
0 Kudos
Message 8 of 13
(10,317 Views)

@Dennis_Knutson wrote:
You would have to manually add your calculated timestamps if you want them displayed in Excel. I've never had the need.

I have never needed to either for waveform data.  I add in the timestamps for signals that are not consistantly sampled. like data from an instrument on a serial port.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 9 of 13
(10,312 Views)
The TDMS functions in LabVIEW won't record down timestamps automatically. If you want time information showed in your TDMS file explicitly, you have to program yourself with LabVIEW. Like Dennis and Crossrulz said, you can workaround the absolute timestamp by using the start time and delta time of waveform
0 Kudos
Message 10 of 13
(10,294 Views)