LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Very simple questions about Queue and De-queue. Vi attached.

Solved!
Go to solution

oh, thanks.

0 Kudos
Message 11 of 18
(704 Views)

ok, but why only A is the right way?  and BC all are wrong?  In the scene of data flow, how it works in my case? thank you

0 Kudos
Message 12 of 18
(704 Views)

@sunson29 wrote:

ok, but why only A is the right way?  and BC all are wrong?  In the scene of data flow, how it works in my case? thank you


DATA FLOW!!!

 

If you have a wire come out of loop X and to loop Y, loop Y cannot run until loop X has completed.  In B and C, you have this scenario.  In A, the data dependency from the queue reference is only from the Obtain Queue.  Therefore X and Y can run in parallel (no data dependency between them).


GCentral
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 13 of 18
(696 Views)

Hmm, the six hour link not working. Could you send me again?  Thank you.

0 Kudos
Message 14 of 18
(685 Views)

 I mean, the wire of A is still outside of bottom loop, right?

No. Tunnels are input or output. In your A case it it an input for both loops. All the other cases it is an output from the B loop.

 

oh, btw, the first time I do the queue, I use C style, because I thought dequeue should be after queue, so, the wire should be out after queue.  but, this is wrong. I think the answer will be the same as the question above. Thank you.

 

I think you are getting hung on on how queues work. Normally you are correct in thinking that data needs to be written to a wire before you want to read it. Queues are specifically designed to communicate data between two loops and work a little different. The dequeue element will not return data until enqueue element has put data into the queue. That's why the dequeue element has a wait timer. If you set it to -1 it will not do anything until the enqueue element function puts data into the queue. Think of the wire more like a reference than "by value". 

0 Kudos
Message 15 of 18
(675 Views)

@sunson29 wrote:

Hmm, the six hour link not working. Could you send me again?  Thank you.


Sorry.  It looks like NI took down that page.  I don't know if it exists under another URL link, or is just gone.

 

Here is another link you can look at.

How to Learn LV

0 Kudos
Message 16 of 18
(658 Views)

thanks for your help!  

0 Kudos
Message 17 of 18
(650 Views)

thank you!

0 Kudos
Message 18 of 18
(649 Views)