Is there an equivalent DataSaveAdd command for tdms or tdm storage? We have a multitude of files for some tests, and we are calculating the same statistical data for specific time frames or cycles in the data. I would like to be able to append the results of the calculations to a summary file. Currently, I calculate the metrics and save them out on a file by file basis. Then I append the files when I load them into the data portal. If I could just append the data to the summary file without opening it, I wouldn't have a multitude of processed files as well.
I believe you can use the function described in the Additional Information section of this document.
I haven't found a way to append data with DataFileSave. Am I missing something?
I use DataFileSave now and it just creates another file. If the filename doesn't change, then it overwrites the existing file. Is there away to get it to append to the existing file?
Try this idea out. ( I have done similar needs and it has worked well!)
For each of the files, process them into separate summary files (say TDMS type)
Then after all the summary files are made then append them into data portal using the datafileload with append option. (If the summary files have the same group name, and the same channel names then all the data will be now be in one group and all the Channels will be nicely appended)
Then can datafilesave that to your overall summary file.
Some caveats to this, The Summary channels must not be waveform channels.
I believe that you can append tdms file and not require loading into portal, but Brad will have to answer that question.
If you're saving to separate TDMS files, you can DosCopy those N different TDMS files and achieve the one, large summary TDMS file you're after. The TDMS file format supports file sandwiching, and any DOS command can be called from DIAdem with the ExtProgram() function. Let me know if you want examples of this.
I am not aware of any way to efficiently do this at write time. There is no DataFileSaveAdd() or DataFileSaveAppend() command as of DIAdem 2019.
If you happen to be writing to an ASCII file, you can just open it and append the new values to the end. Not that I'm advocating using ASCII files or anything, just in the interest of completeness...
DIAdem Product Support Engineer