Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Unexplainable error message

Solved!
Go to solution

I am using a USB-6259 multi-function DAQ.  I have two processes running simultaneously: a data acquisition task and a data processing task.  The two reside in their own seperate while loops, and as such should be assigned their own time/processors.  Data is passed from the acquisition task to the processing task by a message queue.  New data is enqueued and, when sufficient data have been stored, the data is dequeued, parsed, and processed.  I am having issues with the queue dying unexpectedly.  I get an error that happens pretty randomly (but frequently) indicating a problem with the release queue (though I did not call it at that time).  The error message isn't all that helpful.  Here it is:

 

Error 1 occurred at Release Queue in FastEIT.vi

Possible reason(s):

LabVIEW:  An input parameter is invalid. For example if the input is a path, the path might contain a character not allowed by the OS such as ? or @.
=========================
NI-488:  Command requires GPIB Controller to be Controller-In-Charge.

 

 

 

I am not using GPIB at all.   So I don't know what that is about.

 

I have attached an image of my code to show the idea.

 

Any thoughts?

0 Kudos
Message 1 of 9
(5,316 Views)

Hi Manjagu,

 

Thanks for the post and I hope your well today.

 

Your code seems to be using a good design pattern - the Producer/Consumer (acquire/Process) loops are ideal for DAQ applications which acquire at faster rates then the anylsis can support.

 

It seems from the right hand-side of your image that your using the Get Queue Status.vi - I firstly wan't to confirm that you do somewhere dequeue an element from the same queue using the  Dequeue Element.vi. Otherwise your queue will eventually overflow.. because it only has a finite memory space.

 

I would also suggest that you only destory the queue (release the queue) once both loops have completed - unless you don't mind losing data from the queue which hasn't already been processed. 

 

The error 1 GPIB message is seen a lot when using queues - I see it all the time, and I don't know the error message has that. 

But I do know that two of the common causes are,

 

1. The queue reference is incorrect

2. That the queue no longer present i.e. you've released the queue

 

One other error which is common is that your trying to write the wrong data type into the enqueue element - but from your vi picture this doesn't seem the cause. 

 

Please check my suggestions and let me know how you get on,

Hope this helps,

 

Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
0 Kudos
Message 2 of 9
(5,292 Views)

 

It seems from the right hand-side of your image that your using the Get Queue Status.vi - I firstly wan't to confirm that you do somewhere dequeue an element from the same queue using the  Dequeue Element.vi. Otherwise your queue will eventually overflow.. because it only has a finite memory space.

 

I would also suggest that you only destory the queue (release the queue) once both loops have completed - unless you don't mind losing data from the queue which hasn't already been processed. 

 

The error 1 GPIB message is seen a lot when using queues - I see it all the time, and I don't know the error message has that. 

But I do know that two of the common causes are,

 

1. The queue reference is incorrect

2. That the queue no longer present i.e. you've released the queue

 

One other error which is common is that your trying to write the wrong data type into the enqueue element - but from your vi picture this doesn't seem the cause. 

 

Please check my suggestions and let me know how you get on,

Hope this helps,

 


Hi James,

 

Thanks for the suggestions.  The other side of the code does have a consumer element.  It is in the "true" side of the case statement.  Sorry it's not shown.  I only try to dequeue data once a sufficient quantity has arrived.  This is checked by polling the queue.

 

The queue isn't released (in theory) until the stop button is pressed.  If the queue is released then the other process will be terminated upon no longer finding a valid queue.  The odd part about this is the producer loop will terminate with that message, but the consumer will not terminate.  This suggests that the gueue was never destroyed.  That's bizarre.

 

I don't think the queue reference is incorrect.  It is the only queue in the program.

 

Is it possible the enqueue and dequeue functions are not atomic?  Do they protect themselves with a mutex so an enqueue cannot clobber a dequeue?

0 Kudos
Message 3 of 9
(5,239 Views)

Hi manjagu,

 

Thanks for the reply and I hope your well today.

 

I think the best way to troubleshoot this further and faster would be if you could produce me some example code which I could run. Is that possible?

Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
0 Kudos
Message 4 of 9
(5,233 Views)

Sure.  Here it is....

 

I left most of what I was doing in there.  Unfortunately the problem most commonly occurs when a compute intensive operation (calling matlab to run some matrix calculations) runs.  But sometimes it occurs even when that is not executing.

0 Kudos
Message 5 of 9
(5,228 Views)

Hi Manjagu

 

How did your issue go - I am very sorry for not supporting you any further.. a mixture of a week off work and having no free-time to support forums has got me today!

 

Please let me know and I'd be more than happy to continue supporting you if your still having troubles!

 

Hope your well. 

Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
0 Kudos
Message 6 of 9
(5,138 Views)

I still see the issue crop up.  It's really intermittent and I can't reliably recreate the problem.  Sometimes the issue occurs when I move the front panel around.  It's as if the added compute power needed to redraw the screen is enough to foul it up.  Other times it just happens on its own.  I have let the experiment run for 24 hours without an issue and at other times it crashes in the first 10 seconds.  As best I can tell, I don't think I am having a buffer overflow issue.  But it is perpetuating the feeling that I am going insane -- I keep trying the same thing over and over and get different results.  Any more suggestions would be great!

 

Preston

0 Kudos
Message 7 of 9
(5,134 Views)
Solution
Accepted by manjagu

Hey manjagu,

 

Since the error seems to be occurring at Release Queue and this vi should only execute after your producer loop stops, is there something causing your producer loop to stop. Is this error occur sometime during the execution of your code, then causing your code to stop? Since there are only two conditions the cause your producer loop to stop, the stop button and an error, what is causing your producer loop to stop? Also, since your Release Queue is located after the producer loop, it only executes after the producer loop stops.

 

Perhaps there is another error occurring in the producer loop causing the producer loop to stop. Then it would suggest that there may be something funny with your error handling. So, I would maybe try to find out what is even causing your producer loops to stop before you hit the 'stop' button.

 

Hope this helps.

 

-Ben

Hope this helps.
-Ben

WaterlooLabs
Message 8 of 9
(5,103 Views)

Thanks for the reply Ben.  It turns out you were right.  The error was actually cropping up in the hardware init code.  A buffer was being underflowed but the error was being overwritten by subsequent errors.  I wish there was some way for all errors to accumulate and be displayed at the end when the program dies instead of being overwritten by subsequent ones.

0 Kudos
Message 9 of 9
(5,043 Views)