LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Boolean And gate - false logic where T + T = F ?

Solved!
Go to solution

@Joe_H wrote:

See example........

Queue.png


Here is my problem with this solution (and the default example from NI): Do you need to log ALL of the data?  This is a very important question.  If you follow this example exactly, whatever data is still in the queue when your producer is stopped will be GONE due to the destroying of the queue.  If you need all of the data logged, then you need to have the producer send a command to the consumer to stop (like an empty array) and then destroy the queue when the consumer loop has detected that stop command (and has therefore processed all of the data).



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
Message 11 of 13
(1,168 Views)

JoeH & crossrulz

 

thanks for the comments.

 

I've added this while loop after the producer loop, and before clearing the queue

 

this lets my consumer loop catch up to the remaining data - so the queue is only cleared AFTER all data has been logged.

wait-for-queued=0.png

0 Kudos
Message 12 of 13
(1,143 Views)

Put a small wait in that loop so you aren't polling that queue at superspeed burning up the CPU.

0 Kudos
Message 13 of 13
(1,139 Views)