01-09-2015 09:55 AM
Hello,
I have a collection of TDMS files. Some only have a single group of data, some more, but otherwise the structure is quite straightforward - array of, say, 8 waveforms. Is there a simple way to read a chunk of data between TimeX to TimeY? Ideally, cutting throuhg the file boundaries, if necessary?
I understand that it is quite simple to do, from starting time and increment time calculate the index of the first point etc.. But TDMS is lauded as system with easy direct access to data. And I can not find anything available for such simple a task.
Another simple question - is it possible to read unscaled data? ReadTDMS vi output floating point number, but, from the size of the file it is clear, that the data is stored as I16. Is it possible to read it as I16? Obviously I tried wiring I16 to "data type" input, the values read are rounded floating point results, i.e. in my case, 0s (the signal is <1 volt).
Yury
01-09-2015 10:36 AM
Okay there are several questions in there. First direct access to TDMS files is easily done with the TDMS palette under File I/O. There you open a path to a TDMS file, then you can get the contests and find what groups, and what channels in those groups exists. You can also use functions to find the properties stored on the file, or groups, or channels. There is an example viewer on that palette that works for many cases.
As for the specific questions with your files, you'll need to post an example file to understand what you mean. You can read waveforms as waveforms, getting you the T0 DT and Y values. From there you can calculate all the times associated with each data point.
The best answer to reading unscaled data, is to write unscaled data. If you write the data as a U8 it will be stored as a U8. And doubles are stored as doubles. The data as it is in memory, is how it is written to disk.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
01-09-2015 10:43 AM
If you read my message you will see that I've outline the solution you propose. However, I was hoping that TDMS has some conveniet higher-level layer to deal with such tasks.
As for reading raw data, they where written by the driver. I suppose I could have forced the driver to log I16 data, thus loosing the scaling information, but it is too late now.
Of course, I've found a solution, but it seems to me that TDMS format lacks both high-level and lo-level access to the data, the result appears to be rather unconveniet
Yury
01-09-2015 11:13 AM
01-09-2015 11:19 AM
I want what I've asked for - convenient access to TDMS files in Labview. Diadem is not a solution. Bsedies, as far as I can see it does not the functionality I seek (cut time-periods from waveforms cutting through file boundaries).
This is not a solution. Despite beiing somehow approved as such.
01-09-2015 11:27 AM
01-09-2015 12:29 PM
Oh! did I click on the wrong button? Not impossible, sorry.
01-09-2015 12:38 PM
01-11-2015 08:44 PM
01-12-2015 07:51 AM
At one point I was experimenting with removing scaling on a channel to get the raw data. It was possible but it became more difficult when there are multiple scale types (Linear, table, polymorphic, etc) and supporting all of them and having the code to detect which one was being used was a bit of a pain. That's why I suggested logging raw data, if the user actually wants it raw. Then you can apply a scale, or copy the data to another channel and apply a scale.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord