thank you so much for your post on our webforum. You are able to add a comment each time you write to the lvm file; this comment will be added to the first row you are writing. I created an example; 10 samples are generated, comment is added, this is written to file, another 10 samples are generated new comment is added and written to file.
Is this what you are trying to achieve? Else I would recommend to create a small example of your problem.
What you have described is what I would like to happen but what is happening is many more comments that just when the data starts. Attached is a simplified version of what I am doing.
I think the problem lays with the analyze VI's you are using. I do not have your modified compression.VI, and also not the correct signals to measure. But I suppose that the write to measurement file should be called when the trigger and gate express VI has data available; you can put the write to measurement file in a case structure for that and use the data available from trigger and gate express VI to enable write to measurement file. Every time you write the measurement you can increase a counter to point at the next comment element in your comment array. Just use a shift register and increment function to achieve this; not if case is false the counter will not be incremented. Hopefully this is the answer to your problem, since I wasn't able to test it.
The "Express VI's"are fine if you just need some quick and dirty data, but I have found them too inflexable for any serious use.
It's a bit more work but you should look into using the "Write to spreadsheet file" VI or even the lower level "write text to file" VI instead.
With these you have much greater control of the format of the output file.
You just have to get used to working with arrays...
what's the purpose of this (Rube-Goldberg) FOR loop around your Comment control?