02-22-2011 03:56 PM
Hello, I am using NI VISA .Net library's MessageBasedSession to communicate with instruments (all on local machine). My problem is whenever I unplug and plug back in the USB cable, then send commands using the original MessageBasedSession object, VISA reports back Error code: 1073807194 | VI_ERROR_CONN_LOST.
Do I MUST instantialize a new MessageBasedSession session, or is there a way to re-establish the connection using the existing session? Due to the structure of the app I am developing, it would be great if I don't have instantialize a new object.
Thanks
02-23-2011 03:28 PM
Hi,
Your best bet would be to close and re-open the VISA connection to your device, when you receive this error. The commands for this are viClose and viOpen. This is the only way to recover from a connection error like this.
10-29-2014 08:23 PM
Hi Shelby
I have also got the same problem. I my situation is that I have two instruments connected by GPIB-USB.
And my application is using a thread to get 66332A power supply current readings via GPIB_Read.
In the cycling test. I will get the same error VI_ERROR_CONN_LOST and the instruments goes to LOCAL mode from REMOTE. Also can not re-open the session in my application.
This can recover by re-open my application. Is there any ideas?
The following is from the NI I/O trace.
10-30-2014 05:48 PM
Hello Sam687777,
I would like to know why does the session can’t be reopen? Also you can consider the option to reinitialize your GPIB when the error occurs. You can use this guide for that:
http://digital.ni.com/public.nsf/allkb/62BB94BB841025F586256B2900634D86?OpenDocument
Finally I would recommend opening a new forum post so your issue can be attended in a better way.
Regards,
11-03-2014 08:22 PM
Hi Jose
When the VI_ERROR_CONN_LOST, I can't not reopen the session and also can not use SendIFC() function to interface clear.
It just can be recover by re-open the application.
However, I change my hardware from GPIB-USB-B to GPIB-USB-HS. The VI_ERROR_CONN_LOST error never happened again.
Do you have any idea of this.
Regards
07-01-2016 08:10 AM
Hi,
Did you find the solution ?
Because i have the same issue and i don't know what to do.
Thanks,
N
07-06-2016 03:05 PM
Hi N,
It appears as though this forum post is a little old. In order for your post to get more activity and better seen it would be best to create a new forum post on this topic.
Thanks and good luck!
Will.i.am10