LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VI Fails to send queue elements

Highlighted

I am trying to use a queue to send data from my pulse train subVI to my main VI.

 

After my pulse train completes, I send a TRUE boolean via the 'Enqueue element' which goes to the 'Obtain Queue' and then to the Dequeue Element to acquire and log data.

 

I am not sure why the data is only sent the first time, and not consequentially.

 

I've tried the same with the Notifier to no awail. I am not sure if this is an issue in my SubVI or my main VI.

 

I am not sure if this is correct? Do I need to release the reference or something?

 

Thanks!

 

 

data_queue.PNG

0 Kudos
Message 1 of 8
(1,389 Views)
Highlighted

here is the pulse train. I would have figured that if I have this in the 'Cycle' message case, if I call it again, which it does successfully, I would be sending another TRUE boolean to my main VI, but it doesnt..

 

pulse_relay_queue.PNG

0 Kudos
Message 2 of 8
(1,382 Views)
Highlighted

Your Dequeue Element is only ran once.  That needs to be in a loop.


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 3 of 8
(1,371 Views)
Highlighted

Thanks - I tried that in a while loop, also tried probing the queue prior to it - would this probe list all of the elements queue up?

If so, the additional elements never enter the queue....

0 Kudos
Message 4 of 8
(1,368 Views)
Highlighted

@belopsky wrote:

Thanks - I tried that in a while loop, also tried probing the queue prior to it - would this probe list all of the elements queue up?

If so, the additional elements never enter the queue....


Probing the queue reference will not show the elements in the queue.

 

If you are sure you are not getting more elements in your queue, then it is a problem with your producer loop.  Are you sure that loop isn't waiting for a message in order to do something that would then add an element to your queue?


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 5 of 8
(1,351 Views)
Highlighted

I am sure it's not waiting for a message.

 

I created a message case solely to test the enqueue element function, probed the message queue, and see that the subVI is going through the various message cases.

 

How do I debug whether or not elements are being added to the queue?

 

Thank you

0 Kudos
Message 6 of 8
(1,346 Views)
Highlighted

belopsky wrote:

How do I debug whether or not elements are being added to the queue?


Breakpoints at the Enqueue Element is the simple way since the code will stop when it hits a breakpoint.  If it keeps stopping at the breakpoint, then you should be adding more elements to the queue.  Also make sure there are no errors happening.


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 7 of 8
(1,320 Views)
Highlighted

I hope this is just a gutted VI?  Because if you usually code with sequence structures and no dataflow with error wires, then I can't even guess what might be your problem.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 8 of 8
(1,286 Views)