Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA resource error

Solved!
Go to solution

Hi I am getting 'The resource is valid, but VISA cannot currently access it" error. I am using a usb to 4x serial adapter.

 

Is it because i am using modbus that I am getting this visa error. All of my com ports work correctly when connected to my other devices. Multimeter,power supply etc.

 

In the VISA Interactive control my devices are labelled under

 

It is the ony com port connected at the moment. I have performed a loopback test in labview using the serial write and read vi and also in MAX i can write/query to the device but there is either no response or a timeout error. I am connecting the RS232 to a RS485 to connect to an ADAM device. Any advice is very helpful.

 

Thanks

 

Damien

0 Kudos
Message 1 of 4
(4,287 Views)

You get this error when the COM is valid but when another application is using this COM port.

 

 

0 Kudos
Message 2 of 4
(4,283 Views)
Solution
Accepted by topic author Damien129

Hi Damien

 

Can I confirm that you are experiencing an error code of -1073807246?  It is possible that you did not close the reference to the VISA session in a previous program and as such are not allowed to communicate with it in another.  

 

The following links explain this in more detail and show you the VISA close function required to close any references you may have made when running your code.  Be sure to close the reference whenever you want another program to take control of the serial port, since labVIEW does not release serial ports by default. 

 

Error -1073807246

 

Errors using VISA VIs

Marshall B
Applications Engineer
National Instruments UK & Ireland
0 Kudos
Message 3 of 4
(4,267 Views)

Thanks for the replies guys. Much appreciated, yes the error code was -1073807246, the problem was i did not close the reference to the VISA session in a previous program. I followed the link and have solved that problem.

 

 

Thanks Again

 

Damien

0 Kudos
Message 4 of 4
(4,243 Views)