LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read Time Channel from TDMS file and error -2525

Have a TDMS file (attached) and am trying to read a Time channel from it in LV 8.2 (see attached VI, based upon the example VI "TDMS - Read data (event).vi").  I can open the TDMS in DIAdem and see the Time channel, and DIAdem recognizes it as a Time channel.  However, when I try to read it as an array of TimeStamps in LabVIEW, I get the -2525 (data could not be converted into the specified data type).

Oddly, I can read the Time channel as an array of DBL, and the numbers that are returned are increasing in size, but will not convert to TimeStamp, either.


Any ideas?
Joe Gerhardstein
Viasat
Certified LabVIEW Architect
Certified TestStand Developer
Certified Professional Instructor
http://www.viasat.com
0 Kudos
Message 1 of 7
(5,261 Views)

Hi Joe,

i think it is not possible in this way, bacause LabView and Diadem work with different timestamps. LabView work with the 1 January 1904 12.00 am and Diadem work with 01.01.0000. I think you can read it as double and convert it.

Mike

Message 2 of 7
(5,248 Views)
Thanks.  I tried opening the TDMS file with the LabVIEW TDMS File Viewer VI, and it won't read the time stamps correctly, either.
Joe Gerhardstein
Viasat
Certified LabVIEW Architect
Certified TestStand Developer
Certified Professional Instructor
http://www.viasat.com
0 Kudos
Message 3 of 7
(5,245 Views)
The data type of the timestamp values in your file is floating point, not time stamp. If you store the values as time stamps, as shown in the "TDMS Write Data (Events)" example, they will show up properly in LabVIEW and DIAdem.
Herbert
0 Kudos
Message 4 of 7
(5,228 Views)
Well, that's what I thought, too, but it doesn't always work.  See attached image (tdmswrite.gif) of how I am writing the time stamps.  I'm using the "t0" from a waveform (generated via DAQmx) as my time stamp source instead of Get Date/Time in Seconds as done in the example VI, but a time stamp is a time stamp so it shouldn't matter.

The odd thing about this is that DIAdem correctly recognizes the channel as Time (diadem.gif), but LabVIEW thinks it is DBL.

I've looked through all the properties for this channel and for the channel created with the "TDMS Write Data (events)" example VI in DIAdem, but cannot see any differences.
Joe Gerhardstein
Viasat
Certified LabVIEW Architect
Certified TestStand Developer
Certified Professional Instructor
http://www.viasat.com
Download All
0 Kudos
Message 5 of 7
(5,220 Views)
Hi,

I have been looking at your code and I cannot determine what is the problem. Can you post the TDMS writing VI as well?
Eli S.
National Instruments
Applications Engineer
Message 6 of 7
(5,187 Views)
I can't get the TDMS writing VI to reproduce the problem any longer.  The TDMS file I attached earlier in this thread is the only one I have that has this problem.

I'll keep a look out and see if I can figure out what I did to make that file special.
Joe Gerhardstein
Viasat
Certified LabVIEW Architect
Certified TestStand Developer
Certified Professional Instructor
http://www.viasat.com
0 Kudos
Message 7 of 7
(5,158 Views)