LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

GPIB reconnect

Is it possible to reconnect to a GPIB device if it has lost power momentarily?. My experience has been that if a device has lost power and you turn it back on you have to restart Labview in order to connect to it again. This is not a problem with ethernet connected devices.

 

I'm using LabView 11 and a GPIB-USB using VISA to lalk to some of my older instruments that don't have ethernet connections.

 

Norm

0 Kudos
Message 1 of 3
(2,081 Views)

Hi Viper

 

The best way to deal with this is to create a sub-VI that is called when an error is returned from a VISA write or read. The sub-VI closes the current session and begins a loop attempting to open a new session and ends the loop when a new session is established. 

 

Let me know if this helps.

 

Kind Regards

Chris | Applications Engineer NIUK
0 Kudos
Message 2 of 3
(2,061 Views)

I think your problem of "needing to restart LabVIEW" is likely coming from not closing the session.  As has been said, when you detect an error like this, close out the session and retry later to communicate with the instrument.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 3
(2,054 Views)