LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error at Enqueue Element with simulated signal but not with DAQ

Solved!
Go to solution

Hi.  I am getting an Error code 1 when I run my VI in simulation mode, which is just 3 simulate signal subvis set at different frequencies.  The jpg of the block diagram and probe watch is after I stop the VI.  Note that there is an invalid refnum.  I'm not sure why that is.  I am also including the probe watch after a few iterations, there is no error on probe 64 until I stop the VI and also note that there have been no elements enqueued.  This of course means that I am not getting to dequeue the data in loop 2.  An interesting side note is that the system works fine when I run the program in DAQ mode, which is the other case behind the "simulate signals".  The only thing in that case is the DAQ assistant and the dynamic data wire to the tunnel.  Does anyone see what I might be doing wrong?  Thanks.  

If you want to increase your success rate, double your failure rate.
Download All
0 Kudos
Message 1 of 5
(3,428 Views)

The error is because you've destroyed the queue when the bottom loop terminated due to hitting the stop button but the upper loop still had one iteration to go before reading the state of the Stop button and also terminating (note probe 61). Use a data dependency from the output of both loops to drive the Release Queue, e.g, merge the output of the error clusters from both loops (Merge Errors) and then wire that to the Release Queue error input.

Message 2 of 5
(3,415 Views)

So, you identified a second problem and the merge error fixed it.  I thought I was safe because I thought the upper loop would end first since I initiated the stop in that loop.  I guess not.  Now I get no explicit or defined error in the queue but I am still not enqueueing any elements.  So, the first problem still exits, no elements in the lower loop.  And I was apparently wrong in the first post, this is not working with the DAQ either.  Maybe it was before, I don't know, I have been looking at this for far too long. Thanks BillMe.

If you want to increase your success rate, double your failure rate.
0 Kudos
Message 3 of 5
(3,405 Views)

Please post your VI.  It is quite difficult to debug an image, especially when the program consists mostly of Express VIs, because we cannot tell how they are configured.

 

I am suspicious of the Recording case structure with the unwired tunnel set to Use Default if Unwired.  Who knows whether the default of a DDT is the same as what is going in?

 

Lynn

Message 4 of 5
(3,401 Views)
Solution
Accepted by topic author PGnu

Thanks for looking at my post.  I figured it out about 5 minutes ago.  I didn't have a timeout on the event handeler so it wasn't rechecking for new elements on the queue.  I'm still not sure why the probe watch showes that elements weren't being put on the queue because they certainly were.  Maybe the "0 enqueued elements" means that there are no elements backed up in the queue.?

Your concern is interesting and worth a check....  I just ran it without recording and it appears that the output of the recording case structure (the default) is just an empty DDT, a placeholder I guess.  

If you want to increase your success rate, double your failure rate.
0 Kudos
Message 5 of 5
(3,397 Views)