LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TDMS File Viewer shows incorrect Date and Time

Hello, I am trying to create a "Strip Chart Recorder" application using LabVIEW 2012 SP1 and a Compact DAQ system. I have not been able to get the correct Date/Time to display in the "TDMS - File Viewer.vi" waveform graph, x axis. All of the examples provided with this version of LabVIEW show incorrect Data/Time information as well. It seems that the date/time information is only correct when writing the TDMS using DAQmx (DAQmx Configure Logging.vi). I cannot use this approach because I need to add annotations to the TDMS while running (pass/fail and user annotations).

I have spent way to much Date/Time on this already. Just run the LabVIEW example "TDMS - Express write data (time and frequency domain).vi". Run it for 10 seconds. The viewer graph will show that it ran for 58 seconds! Don't forget to click "Settings..." and load all values in (graph).

I did try to modify the viewer using xScale,Offset and Multiplier, but that  didn't work either.

Can someone please help? Thanks.

0 Kudos
Message 1 of 4
(3,265 Views)

In  TDMS - Express write data (time and frequency domain).vi, the data came from the "simulated Signal1(2)" VIs, you can double click the VI and will find that the "samples per second (Hz)" is set to 1000 and number of samples is 100. Thus, TDMS File Viewer will not show the real world time passing as the x axis but values in the interval of 0.001 in the graph.

You should adjust the waveform that logged into TDMS file according to your requirements.

0 Kudos
Message 2 of 4
(3,211 Views)

Thanks deppSu,

I was planning to write the TDMS data at different rates, so I need the Date/Time to follow the various sample rates. A better example might be the LabVIEW "TDMS - Write data (time domain).vi" found in examples. In this example, the start Date/Time is 12/31/1903 @ 4PM. Using that example, can someone show me how to make the Date/Time in the TDMS - File Viewer.vi show the current, and correct Date/Time?

Thanks again.

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

If you are logging the data as a waveform, then you can update the start-time by setting property "wf_start_time".updateTime.png

 

 

Thanks,

zaizhou.ma

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