For exmaple, as follows, I can simply initialize my device by using following code if my device is connected properly.
from visa import *
my_instrument = instrument("GPIB::14")
But what if the device is not connected to the computer? What I want to do is that before I initialize the device, firstly I want to check whether the device is connected properly? How to achieve that?