02-07-2013 08:58 AM
I'm trying to find the best way to add comments to a TDMS file during logging. I know that fragmentation occurs when properties are written during TDMS logging. Should I write comments to the file level during logging (perhaps a Case Structure fires when a new comment occurs) or is there a different way to integrate comments to a TDMS file during logging that I'm missing? Any help would be appreciated.
Solved! Go to Solution.
02-07-2013 09:13 AM
Do you need the notes to be correlated with certain data points? Or do you just need notes of events that have occurred? If the notes don't have to correlate to data then just create another group or channel for notes.
--Ryan S.
02-07-2013 10:35 AM
I just need to have time-stamped notes. Here is what I have so far, would a different group be a better way to go? Could I keep the time-stamping if I went that way (easily implemented at least)?
02-07-2013 08:28 PM
Fragmentation (new segments) occurs no matter you set property on file level or a different group.
You can remove the fragmentation by calling TDMS Defragment after you finished logging.
02-08-2013 04:58 AM
Yeah, but I thought that TDMS best practices say to write properties only before or after logging takes place, not during? That was my main concern for writing them as properties during logging.
02-15-2013 08:33 PM
Nathan, you are right that we recommend to write properties only before or after logging, not during, in order to write faster and get smaller tdms file.
02-17-2013 12:12 PM
Any tips for my question above?
02-17-2013 06:34 PM
Nathan, do you really care about fragmentation? If not, you could just do it that way. If you really care about fragmantation, you might write Time-Stamped Comments to a separate tdms file, or, cache Time-Stamped Comments and write the cached comments to the tdms file after logging.
02-18-2013 03:53 AM
Never thought about doing it the cached way. Great idea.