04-01-2016 04:52 AM
Hello,
I use LabVIEW 8.5 to collect EEG data that are saved into TDMS files. Sometimes things go wrong, like an electrode falling off the participant, and we need to stop the
recording and then restart it. Now we have two TDMS files, but our analysis code is built to read only one.
I know how to load TDMS files and obtain my data. I will need to cut some of the bad data at the end of the first file. I would then like to load the second file, concatenate the two sets of good data, and save the result as a single TDMS file for our regular analysis code.
I am not sure how to save the single new TDMS file. Usually I save to TDMS from my acquisition VIs.
Could anyone suggest how to do this?
Thank you,
Frenk
04-01-2016 06:24 AM
All you have to do is a TDMS Read from one file and TDMS Write to the other. I would read from the "new" file and write to the "old" one.
04-01-2016 09:15 AM - edited 04-01-2016 09:16 AM
Reading the data and writing it back is probably the safest bet, because you can review the data before writing it back. But TDMS files can be combined just by using a command line binary copy, using the command line call.
copy /b File2.tdms + File1.tdms Output.tdms
Here are several examples of this.
http://forums.ni.com/t5/LabVIEW/Rearrange-TDMS/td-p/2449740
https://decibel.ni.com/content/docs/DOC-22844
TDMS files in this way are more similar to text files, where if you want to add one to another, you can really just paste the contents of one, after the other.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
04-02-2016 04:54 AM
Thank you to both individuals who responded to my question.
I may need to review the data to trim away some bad stuff at the end of the first file, so I will attempt that first.
It is nice to know the command line option for simpler data!
Both your responses are much appreciated,
Frenk
04-04-2016 07:40 AM
I haven't used it yet, but in 2015 there is a TDMS delete function. So if you combine data and later want to remove samples this might be an option too.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord