Example #1
0
def connectGPIB(ipAddress, gpibAddress):
    print('Connecting to ' + str(ipAddress) + ':' + str(gpibAddress) + '...',
          gpibObj=netgpib.netGPIB(ipAddress, gpibAddress))
    print('Connected.')
    print("Instrument ID: ", idnString=gpibObj.query("ID?"))
    print(idnString.splitlines()[-1])
    return (gpibObj)
Example #2
0
def connectGPIB(ipAddress,gpibAddress):
    print 'Connecting to '+str(ipAddress)+':'+str(gpibAddress)+'...',
    gpibObj=netgpib.netGPIB(ipAddress, gpibAddress,tSleep=0.2)
    print 'Connected.'
    print "Instrument ID: ",
    idnString=gpibObj.query("*IDN?")
    print idnString.splitlines()[-1]
    return(gpibObj)
Example #3
0
def connectGPIB(ipAddress, gpibAddress):
    print('Connecting to ' + str(ipAddress) + ':' + str(gpibAddress) + '...')
    gpibObj = netgpib.netGPIB(ipAddress, gpibAddress, '\004', 0)
    print('Connected.')
    #Set output to GPIB
    gpibObj.command("OUTX0")
    # Print IDN
    print("Instrument ID: ")
    idnString = gpibObj.query("*IDN?")
    print(idnString.splitlines()[-1])
    time.sleep(0.1)
    return (gpibObj)