Пример #1
0
 def __init__(self):
     InputDevice.__init__(self)
     self.config = ['holdoff', 'refpos', 'records', 'trig_delay', 'trig_level', 'trig_slope', 'ch0_impedance', 'ch0_range', 'ch0_offset', 'ch1_impedance', 'ch1_range', 'ch1_offset', 'intmode', 'inttime', 'refmode', 'CH1mode', 'modlevel', 'gatewidth']
     self.holdoff = 0.0
     self.refpos = 0
     self.records = 1
     self.trig_delay = 0.0
     self.trig_level = 0.0
     self.trig_slope = -1
     self.ch0_impedance = 1000000
     self.ch0_range = 20.0
     self.ch0_offset = 0.0
     self.ch1_impedance = 1000000
     self.ch1_range = 20.0
     self.ch1_offset = 0.0
     self.intmode = 0
     self.inttime = 30.0
     self.refmode = 3
     self.CH1mode = 0
     self.modlevel = 0.0
     self.gatewidth = 1.0
     # device handle
     self.pxi = pyPXI5122()
     self.units = ["V"]
     self.qtynames = [""]
Пример #2
0
 def __init__(self):
     InputDevice.__init__(self)
     # signal = 0:X, 1:Y, 2:R, 3:PHI
     # PHI is phase for lock-in detection in rad
     self.config = {'signal':0, 'PHI':0.0, 'holdoff':0.0, 'ch0_impedance':1000000, 'ch0_filter':-1, 'ch0_range':20.0, 'ch0_offset':0.0, 'ch1_impedance':1000000, 'ch1_filter':-1, 'ch1_range':20.0, 'ch1_offset':0.0, 'inttime':300.0}
     self.fdet = 0.0    # detected frequency in Hz
     self.phi = 0.0  # last detected phase in rad
     self.units = ["V", "V", "V", "deg", "Hz"]
     self.qtynames = ["X","Y","R","Phi","f"]
     
     # device handle
     self.pxi = pyPXI5122()
Пример #3
0
 def detect(self):
     retval = []
     if _support_PXI == True:
         # attempt to connect to PXI devices
         pxi = pyPXI5122()
         for i in range(1,3):        # pxi counter
             for j in range(1,8):    # slot counter
                 # create address string - maybe you have to adjust for different systems
                 handle = "PXI%dSlot%d" % (i, j)
                 try:
                     if(pxi.open_session(handle) == 1):
                         # found a device
                         retval.append([handle,"PXI5122LockIn", handle])
                         
                         pxi.close_session()
                 except:
                     pass
     return retval