LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Small Challenge

Solved!
Go to solution

Hello all,

 

I'm experiencing a very complex issue with my program. Actually, it's about queue. I have simplified my VIs at the maximum but I still get an issue.

 

Issue : the program can't exit all while loops because the queue doesn't work anymore.

 

How to get it ? : You have to run the program as much as you need to get this issue. So : Run, Quit, Run, Quit etc...Sometimes, you have it, sometimes not.

 

A kudo to the winner !

 

Thanks

0 Kudos
Message 1 of 6
(2,355 Views)

Could you save it in LV2012 and post it again?

 

 

Thanks!

0 Kudos
Message 2 of 6
(2,348 Views)
Solution
Accepted by topic author kriss00

I'll earn my Kudos.

 

When you start you enqueue Init to both consumer loops.  One by one those loops will dequeue the init command and start waiting for the next command.  Well the first loop that iterates will start waiting for a command.  The second loop needs to wait untill the other loop recieves a command before it can start waiting.  since the other loop is running the non-reentrant sub-vi that dequeues both queues.

A classic lock-up condition!

 

Make the dequeue function re-entrant prealocate clones. so that each loop can run its dequeue function clone in its own dataspace


"Should be" isn't "Is" -Jay
Message 3 of 6
(2,334 Views)

Congratulations !


You're completely right and I'm disappointed that I didn't find it !

 

In conclusion, it seems that the forum is much powerful that NI support => 1 months with 5 french ingeneer + sending to US team and they didn't find it...And on the forum 30min !!

I'm also a little bit disapointed about that because the forum is free Smiley Surprised...

 

Thanks a lot, I now know all about my error.

0 Kudos
Message 4 of 6
(2,314 Views)

Don't think that the NI Engineers don't know what they are doing - especially since many of them are here answering the questions in the forums - but the forums have the unfair advantage of pooling the intellectual resources of everyone in the forum.  🙂

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 5 of 6
(2,307 Views)

To be bluntly honest.

 

I took me some time to find that same problem the first time I ran across it.  I bet the next time YOU see it, it will be much easier to find.


"Should be" isn't "Is" -Jay
0 Kudos
Message 6 of 6
(2,290 Views)