LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 1 with De-Queue on STOP?

I would have the Release Queue occur after each consumer that handles the respective queue.  As you have it now, you could have stuff in the queue, stop the two producer loops and wind up killing the queue before the consumer loops had a chance to finish the queue.

 

I think you are better off sending the stop command into each of the queues (the queue would be command and the waveform data together).  The command might be just a boolean, True to stop the loop, False would continue the loop and tell the loop to act on the waveform data bundled with it.

0 Kudos
Message 21 of 23
(692 Views)
Hi RavensFan,

Thanks for the reply...

How do I tell the loop to act on the wfm data only when bundled with other data?

Thanks,
Jack
0 Kudos
Message 22 of 23
(686 Views)

A common method is to have your queue data be a cluster that contains and enum or string for the command and then any data you may need.  Set your command to "Run" or something of the like when you have actual data for the consumer to process and "Stop" when you are done.  When the consumer recieves the Stop command, the loop stops, then destroy the queue.  No errors generated.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 23 of 23
(679 Views)