LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to hit continue automatically when error VISA: (Hex 0xBFFF0016) shows up?

Solved!
Go to solution

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?

0 Kudos
Message 1 of 8
(5,728 Views)

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.

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 2 of 8
(5,719 Views)
Solution
Accepted by topic author wilderi

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".

 

Capture.PNG

 

=====================
LabVIEW 2012


Download All
0 Kudos
Message 3 of 8
(5,697 Views)


SteveChandler wrote:

 

[...]

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.)

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 4 of 8
(5,689 Views)

Cool, thanks for the info. I didn't know it existed.

=====================
LabVIEW 2012


0 Kudos
Message 5 of 8
(5,684 Views)

This was great information!!!

Thanks to everyone who cared to answer, this forum is great!!!

0 Kudos
Message 6 of 8
(5,665 Views)

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.

0 Kudos
Message 7 of 8
(5,154 Views)

Hi ATE,

 

I see that you posted a similar/related question on a new thread on the LabVIEW forum, which has gotten responses.

 

http://forums.ni.com/t5/LabVIEW/VISA-1073807338-can-anyone-give-me-a-better-definition-of-what/m-p/2...

 

Did you get an answer to your intended question, or do you have further questions?

 

Thanks,

Evan See
National Instruments
0 Kudos
Message 8 of 8
(5,121 Views)