LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Adding Time-Stamped Comments to a TDMS File During Logging

Solved!
Go to solution

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. 

--------------------------------------------------

Nathan - Certified LabVIEW Developer
0 Kudos
Message 1 of 9
(3,478 Views)

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.

0 Kudos
Message 2 of 9
(3,474 Views)

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)?

--------------------------------------------------

Nathan - Certified LabVIEW Developer
0 Kudos
Message 3 of 9
(3,464 Views)

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.

0 Kudos
Message 4 of 9
(3,451 Views)

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.

--------------------------------------------------

Nathan - Certified LabVIEW Developer
0 Kudos
Message 5 of 9
(3,441 Views)

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.

Message 6 of 9
(3,417 Views)

Any tips for my question above?

--------------------------------------------------

Nathan - Certified LabVIEW Developer
0 Kudos
Message 7 of 9
(3,399 Views)
Solution
Accepted by topic author Nathan_S

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.

0 Kudos
Message 8 of 9
(3,388 Views)

Never thought about doing it the cached way.  Great idea.

--------------------------------------------------

Nathan - Certified LabVIEW Developer
0 Kudos
Message 9 of 9
(3,372 Views)