06-01-2010 10:39 AM
I am currently using a USB-6251 to collect approx. 6,000,000 samples saved in TDMS. I have written a separate VI to read and view the data, which works fine. I was wondering if there was a way to extract small portions the data and write them in a new file? I image being able to do something like being able to select all the points with the cursor and write their values as a new file or have all of the value between time x and time y be written to a new file.
Any suggestion would be greatly appreciated.
Kevin
GRA
University of Kansas
06-01-2010 10:54 AM
Just a quick answer will be like this ..
1) read the TDMS file stored...
2) show the element on frontpanel for user selection..
3) have button control to select the value or range of values to be stored again..
4) Pass the selected value to write in new tdms file .. it should have append so that next selected value can join..
Producer/Consumer design architecture can be used but certainly not only way ... if u have something very specific to ask then plz reply..
Hope it helps..
HS
06-01-2010 11:49 AM
Are you using Express VIs for writing and reading this data? You can program what you want to do somewhat easily with the lower-level TDMS functions. Look in the palette under Programming -> File I/O -> TDM streaming. Use the example finder, or look for links to example VIs in each function's Detailed Help page.
You can call the TDMS read function with Index and Count arguments to return a portion of the entire file. You would have to write code to convert cursor position to file index and count, wire this to a read function, wire that to a write function on the new file's reference.
06-02-2010
02:13 PM
- last edited on
11-07-2024
02:30 PM
by
Content Cleaner
Hi kparmenda,
Is your data stored as a waveform or an array? If you're using a waveform, then, given the time interval you want to select, you can use the Get Waveform Subset VI to select a subset of the waveform and save that to a TDMS file. If you're using an array, then you can use the Array Subset Function to grab a subset of the array and save that.