LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Continous CAN data

Please post your code.  Use highlight execution to see if any part of the code is still operating.  Perhaps one of the loop's stop condition isn't getting set to True.
0 Kudos
Message 11 of 15
(880 Views)
Pl find the program , i am trying to dequeue in two while loops but when i stop , code is hanging without giving error codes.
0 Kudos
Message 12 of 15
(863 Views)

You shouldn't dqueue from the same queue in two different loops.  Only one loop or the other will get any specific value.  Think of the queue as an inbox.  You can put items in it from anywhere.  But if you have more than one person taking items out of the inbox, only one person or the other gets a copy of a paricular item.  Whichever person is ready grabs the next item off the top.

 

If you want two separate while loops for dequeuing information, you should create two queues.  The producer loop will put a copy into each queue.  Each consumer loop will have its own queue and take items out as they are ready.

 

The reason the code hangs is that once one dequeue reads the last item in the queue, there is nothing left in that single queue for the other dequeue function to read and be able to move on.

Message Edited by Ravens Fan on 03-02-2009 04:18 PM
0 Kudos
Message 13 of 15
(846 Views)
Now i did accordingly as you told but still i when i click stop button code is hanging . what i did i used a Enqueue in one while loop and dequeueing in other while loop, now i am not using two dequeue for single queue. i am using a single local variable value to close the loops.
0 Kudos
Message 14 of 15
(836 Views)
Please post the latest revision to your code.  Also, what happens when you turn on Highlight Execution?
0 Kudos
Message 15 of 15
(825 Views)