08-16-2012 07:05 AM
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
Solved! Go to Solution.
08-16-2012 09:22 AM
You get this error when the COM is valid but when another application is using this COM port.
08-17-2012 07:46 AM
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.
08-20-2012 01:54 AM
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