Exemplo n.º 1
0
 def __init__(self):
     # init bus for LockIn
     MAVmask=16
     IfaceReadyMask=0
     CMDexecMask=2
     GPIBAddr = 8
     LockInBUS = GPIBBus (visa.GpibInstrument("GPIB0::%d::INSTR" % GPIBAddr), MAVmask,IfaceReadyMask,CMDexecMask)
     # init bus for sine generator
     MAVmask=16
     IfaceReadyMask=0
     GPIBAddr = 10
     SineBUS = GPIBBus (visa.GpibInstrument("GPIB0::%d::INSTR" % GPIBAddr), MAVmask,IfaceReadyMask)
     # init LCR device
     LCRmeterLockIn_Agilent.__init__(self, LockInBUS, SineBUS)
     return
Exemplo n.º 2
0
 def __init__(self):
     MAVmask=8
     IfaceReadyMask=0
     GPIBAddr = 27
     BUS = GPIBBus (visa.GpibInstrument("GPIB0::%d::INSTR" % GPIBAddr), MAVmask,IfaceReadyMask)
     Electrometer617.__init__(self, BUS)
     return
Exemplo n.º 3
0
 def __init__(self):
     MAVmask=16
     IfaceReadyMask=0
     GPIBAddr = 22
     BUS = GPIBBus (visa.GpibInstrument("GPIB0::%d::INSTR" % GPIBAddr), MAVmask,IfaceReadyMask)
     A34401_HAMAMATSU.__init__(self, BUS)
     return
Exemplo n.º 4
0
 def __init__(self):
     MAVmask=16
     IfaceReadyMask=0
     GPIBAddr = 26
     BUS = GPIBBus (visa.GpibInstrument("GPIB0::%d::INSTR" % GPIBAddr), MAVmask,IfaceReadyMask)
     SM2602_4PP.__init__(self, BUS, NPLC=10)
     return
Exemplo n.º 5
0
 def __init__(self):
     MAVmask=16
     IfaceReadyMask=0
     GPIBAddr = 10
     BUS = GPIBBus (visa.GpibInstrument("GPIB0::%d::INSTR" % GPIBAddr), MAVmask,IfaceReadyMask)
     A33220_square.__init__(self, BUS)
     return
Exemplo n.º 6
0
 def __init__(self):
     MAVmask=16
     IfaceReadyMask=0
     CMDexecMask=2
     GPIBAddr = 8
     BUS = GPIBBus (visa.GpibInstrument("GPIB0::%d::INSTR" % GPIBAddr), MAVmask,IfaceReadyMask,CMDexecMask)
     LockInSR830.__init__(self,BUS)
     return
Exemplo n.º 7
0
 def __init__(self):
     MAVmask=16
     IfaceReadyMask=0
     GPIBAddr = 13
     integrTime = 5
     identString = 'B'
     elements = 'READ,TST,ETEM,VSO'
     units ='A,s,C,V'
     BUS = GPIBBus (visa.GpibInstrument("GPIB0::%d::INSTR" % GPIBAddr), MAVmask,IfaceReadyMask)
     Electrometer6517.__init__(self, BUS, integrTime, identString, elements, units)
     return
Exemplo n.º 8
0
def InitializeGPIB(address, board, QueryID=True, **kwargs):
    try:
        GPIBVisa = visa.GpibInstrument(address, board)
        for kw in kwargs.keys():
            tmp = "".join(("GPIBVisa.", kw, "=\"", kwargs[kw], "\""))
            exec(tmp)
        if QueryID:
            print GPIBVisa.ask("*IDN?")
    except Exception:
        print "Failed opening GPIB address %d\n" % address
        GPIBVisa = None

    return GPIBVisa
Exemplo n.º 9
0
def test_keithley2000(monkeypatch):
    monkeypatch.setattr(visa.GpibInstrument, "interface_type", VI_INTF_GPIB)
    monkeypatch.setattr(visa.GpibInstrument, "stb", 0x40)
    print("Test start")
    keithley = visa.GpibInstrument(12)
    milliseconds = 500
    number_of_values = 10
    keithley.write(("F0B2M2G0T2Q%dI%dX" %
                    (milliseconds, number_of_values)).encode("ascii"))
    keithley.trigger()
    keithley.wait_for_srq()
    voltages = keithley.read_floats()
    if voltages:
        print("Average: ", sum(voltages) / len(voltages))
    print("Test end")