I did look at the help examples, but I couldn't find one that was sending the queue from one vi to another(well, not any that I could understand), and that was really my problem.
I did get the thing to work when it was all in one vi.
You bring up an interesting point about "dequeue" and "flush". Perhaps I am mistaken, but my reasoning for using flush rather than dequeue was the following:
I am using the queue as a data buffer. I need the queue to hold a few minutes of data. This data is dumped to file upon fault event, i.e. it tells me what was going on right before the fault occurred. I need that queue to dump the data and then immediately turn around and start filling up again. I felt that holding on to the queue reference in the save-to-file routi
ne (which involves lots of potentially slow hard disk access) might cause the object to lock and hence not be able to save right away. I don't know how LabView does threading, but if I was writing the threading routine, I would lock any object which was being executed upon in a routine to prevent data collision.
Of course, this begs the question: does LabView lock all objects in a subroutine that is executing? Or just in the part which is unresolved? or does it lock objects at all? Perhaps I should flush the queue outside of the subroutine anyway, so that the subroutine can happily munch on the flushed array while my queue goes back to the business of collecting data?
Am I way off base in how the threading works?
Thanks!
🙂 jen