Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Error: "Resource valid but VISA cannot currently access it"

I'm using Labview to control a syringe pump. I have successfully made the program which functions as I had intended, except that I can only run it once. There seems to be some type of ownership issue with the VISA sessions.
I've tried opening and closing sessions, clearing sessions and flushing the buffer in different orders and with varying frequencies throughout the program but when I try to run the prgm more than once (it always works perfectly just after I have rebooted the comp)it gives me the error; "Resource valid but VISA cannot currently access it; BUSY"

How can I avoid this problem?
0 Kudos
Message 1 of 2
(3,385 Views)
Hey Peter,

It sounds like you have a VISA session left open. First make sure that you are using the VISA open once in your application at the beginning. Then make sure you are wiring all of the VISA Resource names from the Open VISA to the rest of your VIs. Then at the end of your application wire it to the VISA Close.

If you can't find the problem, try starting with one of our example programs. You didn't mention what kind of interface or software you were using, but the Serial Communication.vi in LabVIEW is a good place to start. If you are using GPIB, just replace the VISA Configure Serial Port.vi with the VISA Open. Try writing a simple command that your instrument supports like *IDN? so that it will return some data. Then try to run the applicati
on twice to see if you see the problem.

If the example can run fine you probably need to start going through your application and look for VISA functions that are not wired to the VISA Open. If you call VISA Write/Read without it being connected to the VISA Open it will try to implicitly open the resource and this can cause problems.

I hope this helps out.

JoshuaP
National Instruments
0 Kudos
Message 2 of 2
(3,385 Views)