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?
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.
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.
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).
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.
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.