LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

queue problems

I have LV7.0 and W2k. I want to realize the handshaking of a measurement with a queue. With a help of global variable I want to pause measuring. This works fine but when I try to continue measuring the pause button doesn't work. I When I click off the pause button in the global VI the measurement will continue.
What's the reason for this behaviour? Debugging doesn't show anything.

(When I implement the data transfer with global values the pausing mechanism works)
0 Kudos
Message 1 of 5
(2,958 Views)
Hello,

Can you post your code or a sample to demonstrate what you mean?

Paulo
0 Kudos
Message 2 of 5
(2,949 Views)
Thank for your reply Paulo! Sorry, the posting of the attachment did not work. Here is the code.
0 Kudos
Message 3 of 5
(2,943 Views)
Hi,

The problem of your code is that when ytou click the pause button, the pause global variable will go to true, then your simulation vi will never generate values again to the queue and then your read from queue vi in the main loop will be waiting forever for a value and the while loop will never run again and the pause variable will never be false again, because the code is stuck on the read from queue.
If you try to put some value in the timeout of the read from queue, so it will jump out after some time if no value is comming, or put the write to global in a separate loop.

Hope this helps,
Paulo
Message 4 of 5
(2,939 Views)
Thank you, both methods work. I mean the latter way with the global in a separate loop is more elegant.
0 Kudos
Message 5 of 5
(2,910 Views)