05-26-2011 10:34 AM
Hi everyone,
I have just started using TDMS (and labview actually) for the first time. I have managed to save data to the TDMS format which can be viewed in Excel using the importer. However if I try to open it in a vi using the TDMSopen, then labview immediately closes. Next time I start up it offers to recover for me and I'm back where I started. I'm trying to do this just to convert the data to and Igor Binary Wave format (to be read by Igor Pro). Incidentally, if I try and use the built in Igor Pro TDMS loader it also fails, citing DIAdem error -6204...but that's maybe a question for the Igor forums.
Thanks for any help. I spent ages programming to log the data in this format, and it would do the job very well if it could load into Igor Pro, or even LabView. I'm logging two groups of data. I'm streaming to the TDMS file as I write it and then defragging it when I'm finished with it.
I've attached a piture of my very simple vi - you give it a folder and it should load all the TDMS files one by one and save them as Igor Binary Wave files. It doesn't make any difference if I get rid of the IBW function.
Thanks for any help
Niall
Solved! Go to Solution.
05-27-2011 12:16 AM
Hi Niall,
I have a couple of questions for this problem and let's see whether we can help you.
Thank you!
Yongqing Ye
NI R&D
05-27-2011 03:20 AM
Hi there. So...
Labview 10.0 32 bit
I have tried it on one computer running Windows & 64 bit and another with XP
I stepped through the program, I hadn't reported the error quite right before. The error out of the TMDSopen is fine, it is when trying to perform the TDMSRead that the crash occurs.
I've attached a zip file with some sample TDMS data (and the index file) and the VI I'm trying to access.
Thanks for the help
Niall
05-27-2011 04:01 AM - edited 05-27-2011 04:02 AM
Hi Niall,
Thank you for reporting this problem. There's no execuse for the crash, it's defenitely a bug.
But, the TDMS file is OK, and the way you reading the TDMS file is not very good, and you have quite a few workaround.
The problem is, the group "Data" has 6 channels in it, and 2 among them are timestamp data type channel. When you wiring a 2D double as the data type to "TDMS Read", then TDMS Read needs to covert all the data channels to double but timestamp channels cannot be converted, I suspect this is where the crash happens.
You can use this way, as illustrated in the below picture, you can wire a 1D string array as the channels names input to TDMS Read, contains only the double data type channels and read them all
together:
05-27-2011 05:04 AM - edited 05-27-2011 05:05 AM
Ah ok - that sounds reasonable. As it happends, the Igor Pro TDMS importer is now working so this isn't so critical for me any more. It would be nice if there was a more flexible solution as in the loging
program you can specify what data to record. I guess you could read the channel names in first and then remove the two time channels from the array and use the rest.
Thanks for the help
Niall