LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 1 occured at Dequeue Element

Hi,
 
In my VI, I acquire data from two sensors and save it to a file. I am using a producer and a consumer loop with queues and it works great.
I also "generate" data as if it were the positions of step motors. I tried using queues with this data too because I need to save those positions in the same file as the data from the sensors.  But it seems the data (position of step motors) gets erase from the queue or doesn't get to the queue because I get Error 1 occured at Dequeue Element if I don't wire the error out of the Dequeue Element vi. If I wire it, I don't get the error message, but I still can't save the position data to the file. Please help me find what's wrong! I am using LabView 8.
Download All
0 Kudos
Message 1 of 5
(7,882 Views)
Hi,


I had a look at your code and have a few suggestions for you.  First and most importantly, please refactor your code, following these two tutorials "Rules to Wire By I" and "Rules to Wire By II".  It will be extremely difficult to debug your program if it is not well documented and well structured. 

Having a look at your VI, I have noticed that you destroy your queue at the end of the first while loop, whereas the consumer loop is still processing data.  You may want to merge errors of both while loops and then destroy the queue.  That way, we know that both loops have finished with the queue and it can then be destroyed.


I hope this helps,

Regards,

Nadim
Applications Engineering
National Instruments
Message 2 of 5
(7,854 Views)

Hi Sir/Madam, I am facing some problems while programming in LabVIEW 2013. So i request you to provide technical support for solving the problems listed below. 1. Error 1 occurs at dequeue element. 2. Initial readings are missing in the report. Only the final 50 readings are found in the report. Hardware used: USB-6002. Kindly provide the appropriate solution as soon as possible. Thanks and Regards,

Karuppanan K.

9962338830

0 Kudos
Message 3 of 5
(5,801 Views)

Hi Sir/Madam,

I am facing some problems while programming in LabVIEW 2013. So i request you to provide technical support for solving the problems listed below. 1. Error 1 occurs at dequeue element. 2. Initial readings are missing in the report. Only the final 50 readings are found in the report. Hardware used: USB-6002. Kindly provide the appropriate solution as soon as possible.

Thanks and Regards,

Karuppanan K.

9962338830

Download All
0 Kudos
Message 4 of 5
(5,800 Views)

Hi vicky,

 

2. Initial readings are missing in the report. Only the final 50 readings are found in the report.

Because you programmed it that way!

Read the help for WriteToSpreadsheetFile. Then check all inputs of that function…

 

1. Error 1 occurs at dequeue element.

Because you programmed it that way!

There is no error handling code after Dequeue. And you try to dequeue an element after the queue has been released!

More than 9 years ago Nadim suggested a possible solution to this problem, but instead of solving it on your own you rather bring this stone-old thread back to live…

 

So i request you to provide technical support

When you "request technical support" you should call your local NI office. Here in the forum you may "ask for help" 🙂

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 5 of 5
(5,784 Views)