LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Best way to pause and restart saving to log file

Solved!
Go to solution
Solution
Accepted by topic author sbernie2

@sbernie2 wrote:

@Albert.Geven wrote:

Hi

You need just one queue per system. That queue is written to a file or not written to a file depending on if the file you are writing to is blocked by you because you want the system to do inbetween. If you stop interfering, it depends on the eventual new statis of each system if data is thrown away or still logged to a file.


OK, that's what I had originally intended to do. Just not sure how to practically implement that.

 

Perhaps a case structure such that there are no elements being dequeued and written when my "save as" feature is running? I will try that and see if it works.


This turned out to be the basically correct approach.

 

I added another control queue which contains "save" or "don't save" commands. When the "Save as" feature is started, the "don't save" command is sent; once it finishes, "save" is sent to restart logging. To avoid the issue of creating a backlog of data points, I have the two instruments stop sending data into the data queues. I'll test it in the next week over long periods of time and multiple "save as" steps but for now it seems to be working for brief periods.

fsgg.PNG

I was not able to figure out the problems with my previous attempts with reading/writing to the file, but am happy with this solution because it is relatively simple. Thanks, all!

0 Kudos
Message 11 of 11
(315 Views)