02-24-2011 11:43 AM
Hi all,
I am an experiment that interacts with an Agilent frequency generator to automatically vary the frequency and read some data with a detector, this programs works perfectly when I sweep the frequency in big steps, so I leave the long experiments to be done at night when I go home but at the next day there is an error that says:
VISA: (Hex 0xBFFF0016) The VISA driver failed to properly close the session or object reference. This might be due to an error freeing internal or OS resources, a failed network connection, or a lower level driver or OS error.
and gives me the chance to continue or stop, if I press continue, the program keeps working fine but sometimes I can not be around all the time to be pressing continue. Is there an easy way to void this error or automatically say continue if this happens?
Solved! Go to Solution.
02-24-2011 12:07 PM
Once you know where this error is occurring you can fix whatever is causing it. Other than that, you need to add code to handle the error rather than leave it up to automatic error handling.
02-24-2011 02:38 PM
For the nuclear option you could use the clear errors vi in the Dialog & User Interface pallette. That is not good. It is better to clear the error only if it is the one causing you trouble. But just blindly clearing errors is like closing your eyes and pretending everything is fine. Sometimes it is.
I have a serial device that sometimes gives errors but if I try again it will work. I created some code to clear and retry up to a set number of times then give up and return the error.
See the attached "Retry on error.vi".
02-24-2011 03:02 PM
[...]
I have a serial device that sometimes gives errors but if I try again it will work. I created some code to clear and retry up to a set number of times then give up and return the error.
[...]
The Specific Error Handler (SEH) Reference Library is a handy Express VI for this. You can have it ignore or reclassify errors or retry a block of code based on the specific error. (Some folks don't like it because it's not included in LabVIEW by default.)
02-24-2011 03:17 PM
Cool, thanks for the info. I didn't know it existed.
02-24-2011 08:58 PM
This was great information!!!
Thanks to everyone who cared to answer, this forum is great!!!
07-23-2013 12:08 PM
Anyone know exactly what causes this error? I've recently started seeing this on one of my test sets as well, there does not appear to be anything wrong with the code though?? At least not that I have spotted yet.
07-30-2013 04:52 PM
Hi ATE,
I see that you posted a similar/related question on a new thread on the LabVIEW forum, which has gotten responses.
Did you get an answer to your intended question, or do you have further questions?
Thanks,