def open_connection():
  gpib.open_connection()
  gpib.set_address(24)
  gpib.clear_selected_device()  # clear keithley
  gpib.write("*IDN?")           # ask instrument to identify itself
  reading = gpib.readline()
  if "KEITHLEY INSTRUMENTS INC.,MODEL 2400" in reading:    
    gpib.write("OUTP ON")       # Enable the Keithley's output
  else:
    raise Error("ERROR: The Keithley 2400 is not responding.")    
Exemple #2
0
def open_connection():
    gpib.open_connection()
    gpib.set_address(24)
    gpib.clear_selected_device()  # clear keithley
    gpib.write("*IDN?")  # ask instrument to identify itself
    reading = gpib.readline()
    if "KEITHLEY INSTRUMENTS INC.,MODEL 2400" in reading:
        gpib.write("OUTP ON")  # Enable the Keithley's output
    else:
        raise Error("ERROR: The Keithley 2400 is not responding.")
Exemple #3
0
def open_connection():
  gpib.open_connection()
  gpib.write("++addr 27")           # set GPIB address to the Keithley 617
  gpib.clear_selected_device()      # Reset Keithley
  gpib.write("C0X")                 # turn off zero check
  gpib.write("C0X")                 # again, just to make sure :)
  reading = gpib.readline()         # make sure Keithley's turned on 
  if not "DC" in reading:
    raise Error("ERROR: The Keithley 617 is not responding, make "\
    "sure it is turned on.")