From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TDMS file: problem reading the first column

Dear all,

I have a problem reading all the channels in some tdms files. I tryed to find a solution in the forum but I didn't find any. 

In particular, if I try to read all the channels including the first (column 0), I get error -2532.

Same error appears if I try to read only the first channel indicating the channel name in the input.

If I use the function read without any input to channels_names o with an array containing all the channels except the first column, the vi works and give as result the channel starting from the second one (channel 1).

How can I get the values of the first channel?

 

 

0 Kudos
Message 1 of 6
(1,919 Views)

Without seeing the code that wrote the TDMS, the code that is trying to read the TDMS, and an example of the file, the most reasonable guess is that you made a mistake somewhere (I'm guessing in writing the file, but in the total absence of data, it is just a guess).  If you want to help us to help you, attach actual code that we can run (i.e. files with the extension ".vi"), not pictures.

 

Bob Schor

0 Kudos
Message 2 of 6
(1,909 Views)

Do you have an example file we can mess around with?  My current suspicion is that the first channel is in another group or was never written.


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 3 of 6
(1,903 Views)

Thank you for your fast reply.

The complete software including the writing is very complex but the writing/reading section is quite simple.

Please, try to understand by pictures of the writing/reading section and of the data file.

If not possible I'll try to produce only the writing/reading section.

If you look to the excel tdms imported file, you can see that I am not able to read the first channel of all the groups except the last one. It is worth to say that in when I write the file, first channel represents a time sequence and it has been written before the other channels but in the same group, as in the image. In the last group (Calc) all the channels has been written with the same istruction, there is no time column and I m able to read all the channels including the first (0 column).

Download All
0 Kudos
Message 4 of 6
(1,879 Views)

@kataclisma77 wrote:

It is worth to say that in when I write the file, first channel represents a time sequence and it has been written before the other channels but in the same group


There is your problem.  It is a different data type than the rest of the channels.  Read the time channel and then the rest of the channels, just like you did for the write.


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 5 of 6
(1,863 Views)

I was already doing what you are suggesting but it didn't work.

Nevetheless, now I solved.

The problem was that if I don't wire any data type (or the wrong data type) to the input there would be an error even if i create automatically the output.

 

However, thank you very much for your help.

0 Kudos
Message 6 of 6
(1,857 Views)