Use the "Preview Queue" primitive to check the data and dequeue it in any of the loop or in the producer itself. Otherwise the element will not be removed and you will be always seeing the element (not reading) in one end and keep building the queue in the producer at the other end.
You can not dequeue at two different places from the same queue.
if you have two consumer loops use 2 queue each for one loop.
and do not use more than one event structure in a single block diagram.
You need to follow some basis and think about architecture.
Thanks for your advice.I tried Preview Queue but it gets the data only one time , if I change the data from producer loop it doesn't get the data again.Therefore I will use two different queue.
Why I shouldn't use more than one event structure in a single block diagram?Can you explain?
OK , Did you read anything about design architecture in LabVIEW.
Three event structure on the same block diagram may lead to gui Lockup.
If someone press Boolean 2 or Boolean 3 , that loop will stop leaving the other loops running.
Then again if suppose loop 2 is running some task inside an event case and if you remove the lock front panel checkmark , it wont run the new event case until it completes.
these are few from my side i am sure you will get lot more problems if you continue in that way.
PS : No need to use wait in while loop containing event strututre , you have left timeout terminal which means timeout is -1 . so the loop would not execute until any event happens.
You should use producer consumer architecture.
I'm not even seeing the point of the event structures in your consumer loops. When you have no data in the queue, the Dequeue Element functions will sleep, using no CPU resources. They will output something when there is data.
As was said, if you want two consumer loops, use two queues.
I didn't use three event structure in one block diagram before but you're right,it will be problem. I consider to your advices. Thanks