LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Where should I run queue input/output lines

Hi all,

I am wondering what is the best way to route a queue reference line through a VI. It works either way, so I guess this is more of a "recommended programming style" type question. I have a while loop encompassing a state machine with a queue input and only one of the states uses the queue. Should I run the queue input through all of the cases to the "copy of queue reference" output, or should I run it completely outside of the while loop and simply run a single line inside to the one enqueue function?

Yes, I know it probably doesn't matter *too* much, but I am looking for the absolute fastes speed. One question - if I do run it through the states as I have done, will it affect the speed *at all*. I am trying to run this VI in real-time (or close to it) and speed is by far the #1 most important thing.

I have attached the network vi to review.

Thanks,

Jason
0 Kudos
Message 1 of 3
(2,691 Views)
I would run 'queue' to 'dup queue' outside the while loop.
Message 2 of 3
(2,683 Views)
You do not need to run the queue all the way thru the loop or even around it. Just wire to where you need it. You can connect duplicate queue to the queue before the loop. See attached example.
- tbob

Inventor of the WORM Global
Message 3 of 3
(2,673 Views)