From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
04-28-2021 09:27 AM
I am learning Labview and queueing and dequeuing. I have a loop that I have been playing with that queues an element when a switch is flipped. If I dequeue that element immediately in the same while loop then it dequeues just fine so I know it is being queued. When I add a additional while loop the loop never runs.
Why?
04-28-2021 10:19 AM
I can't see your Vi because I don't have the correct LV version loaded on this computer, but there are a few things I can think of.
04-28-2021 10:27 AM
I checked; it is indeed a data dependency from one loop to the other.
04-28-2021 10:56 AM
Yep. I do understand about dequeuing.
This did not work:
This worked:
04-28-2021 11:18 AM
Wires that exit a loop (while or for loop) will not execute until the loop they are exiting completes. So in your case that doesn't work, the dequeue doesn't see the enqueued data until the top loop completes.
04-28-2021 12:41 PM
@flycast wrote:
Yep. I do understand about dequeuing.
This did not work:
This worked:
Now we might run into bullet #2 in my previous post. if both of those loops are trying to dequeue from the same queue, you may end up with said race condition.