예제 #1
0
    def __init__(self,name="HP34401",address='GPIB0::30::INSTR',enabled=True,timeout=1.):
        #if ':' not in address: address+=':22518'

        VisaInstrument.__init__(self,name,address,enabled)
        self.query_sleep=1
        self.recv_length=65536
        self.term_char=''
예제 #2
0
 def __init__(self,name="keithley199",address='GPIB0::26::INSTR',enabled=True,timeout=1):
     #if ':' not in address: address+=':22518'        
     
     VisaInstrument.__init__(self,name,address,enabled, term_chars='\r')
     self.query_sleep=0.05
     self.recv_length=65536
     self.term_char='\r' 
예제 #3
0
파일: voltsource.py 프로젝트: ziqianli/slab
 def write(self, s, port=None):
     if port is not None:
         self.write("SNDT %x,#3%03d%s\n" % (port, len(s), s))
     if self.protocol == 'serial':
         SerialInstrument.write(self, s)
     if self.protocol == 'socket':
         VisaInstrument.write(self, s)
예제 #4
0
파일: Tek70001.py 프로젝트: ziqianli/slab
    def __init__(self, name='Tek70001', address='', timeout=10000, enabled=True):
        address = address.upper()

        if address[:5] != 'TCPIP':
            address = 'TCPIP::' + address + '::INSTR'
        VisaInstrument.__init__(self, name, address, enabled, timeout)
        self.term_char = ''
예제 #5
0
파일: Tek5014.py 프로젝트: ziqianli/slab
    def __init__(self, name='Tek5014', address='', enabled=True, timeout=50):
        address = address.upper()

        if address[:5] != 'TCPIP':
            address = 'TCPIP::' + address + '::INSTR'
        VisaInstrument.__init__(self, name, address, enabled, timeout)
        self._loaded_waveforms = []
        self.current_sequence_hash = ''
예제 #6
0
파일: Tek5014.py 프로젝트: SchusterLab/slab
    def __init__(self, name='Tek5014', address='', enabled=True,timeout = 50):
        address = address.upper()

        if address[:5] != 'TCPIP':
            address = 'TCPIP::' + address + '::INSTR'
        VisaInstrument.__init__(self, name, address, enabled, timeout)
        self._loaded_waveforms = []
        self.current_sequence_hash = ''
예제 #7
0
파일: voltsource.py 프로젝트: ziqianli/slab
 def __init__(self, name="", address='COM5', enabled=True, timeout=1.0):
     # if ':' not in address: address+=':22518'
     if address[:3].upper() == 'COM':
         SerialInstrument.__init__(self, name, address, enabled, timeout)
     else:
         VisaInstrument.__init__(self, name, address, enabled)
     self.query_sleep = 0.05
     self.recv_length = 65535
     self.escapekey = 'XXYYXX'
예제 #8
0
 def __init__(self,name="Lakeshore",address='COM4',enabled=True,timeout=1):
     #if ':' not in address: address+=':22518'
     if address[:3].upper()=='COM':
         SerialInstrument.__init__(self,name,address,enabled,timeout)
     else:
         VisaInstrument.__init__(self,name,address,enabled, term_chars='\r')
     self.query_sleep=0.05
     self.recv_length=65536
     self.term_char='\r'
예제 #9
0
파일: nwa.py 프로젝트: ziqianli/slab
 def __init__(self,
              name="HP3577A",
              address='GPIB0::9::INSTR',
              enabled=True,
              timeout=None):
     VisaInstrument.__init__(self, name, address, enabled, term_chars='\r')
     self.query_sleep = 0.5
     self.recv_length = 65536
     self.term_char = '\r'
예제 #10
0
 def __init__(self,name="magnet",address='COM4',enabled=True,timeout=1):
     #if ':' not in address: address+=':22518'        
     if address[:3].upper()=='COM':
         SerialInstrument.__init__(self,name,address,enabled,timeout)
     else:
         VisaInstrument.__init__(self,name,address,enabled, term_chars='\r')
     self.query_sleep=0.05
     self.recv_length=65536
     self.term_char='\r'
     self.set_mode()
     self.set_extended_resolution()
예제 #11
0
파일: multimeter.py 프로젝트: ziqianli/slab
    def __init__(self,
                 name="HP34401",
                 address='GPIB0::30::INSTR',
                 enabled=True,
                 timeout=1.):
        #if ':' not in address: address+=':22518'

        VisaInstrument.__init__(self, name, address, enabled)
        self.query_sleep = 1
        self.recv_length = 65536
        self.term_char = ''
예제 #12
0
파일: multimeter.py 프로젝트: ziqianli/slab
    def __init__(self,
                 name="keithley199",
                 address='GPIB0::26::INSTR',
                 enabled=True,
                 timeout=1):
        #if ':' not in address: address+=':22518'

        VisaInstrument.__init__(self, name, address, enabled, term_chars='\r')
        self.query_sleep = 0.05
        self.recv_length = 65536
        self.term_char = '\r'
예제 #13
0
 def __init__(self, name="magnet", address='COM4', enabled=True, timeout=1):
     #if ':' not in address: address+=':22518'
     if address[:3].upper() == 'COM':
         SerialInstrument.__init__(self, name, address, enabled, timeout)
     else:
         VisaInstrument.__init__(self,
                                 name,
                                 address,
                                 enabled,
                                 term_chars='\r')
     self.query_sleep = 0.05
     self.recv_length = 65536
     self.term_char = '\r'
     self.set_mode()
     self.set_extended_resolution()
예제 #14
0
파일: voltsource.py 프로젝트: ziqianli/slab
 def read(self, port=None):
     if port is not None:
         self.write("CONN %x,'%s'\n" % (port, self.escapekey))
         self.read()
         self.write(self.escapekey)
     if self.protocol == 'serial':
         return SerialInstrument.read(self)
     if self.protocol == 'GPIB':
         return VisaInstrument.read(self)
예제 #15
0
파일: TDS7104.py 프로젝트: SchusterLab/slab
    def __init__(self, name = "TekTDS7104", address = "TCPIP0::MSPBMTEK"):
        VisaInstrument.__init__(self, name=name, address = address)
        try:
            rm = visa.ResourceManager()

            self.scope = rm.open_resource(address)

            reply = self.scope.query("*IDN?")

            rpl = reply.split(",")

            if rpl[0] == "TEKTRONIX" and rpl[1] == "TDS7104":
                #print "Loaded %s %s" % (rpl[0], rpl[1])
                pass
            else:
                print("Error, loaded wrong instrument?")
                print(reply)

        except Exception:
            print("Instrument not connected")
            print("Make sure utilites->LAN server status->VXI-11 Server is started")
            print("Otherwise check NI-MAX")
예제 #16
0
    def __init__(self, name="TekTDS7104", address="TCPIP0::MSPBMTEK"):
        VisaInstrument.__init__(self, name=name, address=address)
        try:
            rm = visa.ResourceManager()

            self.scope = rm.open_resource(address)

            reply = self.scope.query("*IDN?")

            rpl = reply.split(",")

            if rpl[0] == "TEKTRONIX" and rpl[1] == "TDS7104":
                #print "Loaded %s %s" % (rpl[0], rpl[1])
                pass
            else:
                print("Error, loaded wrong instrument?")
                print(reply)

        except Exception:
            print("Instrument not connected")
            print(
                "Make sure utilites->LAN server status->VXI-11 Server is started"
            )
            print("Otherwise check NI-MAX")
예제 #17
0
 def __del__(self):
     return
     if self.protocol == 'serial':
         SerialInstrument.__del__(self)
     if self.protocol == 'VISA':
         VisaInstrument.__del__(self)
예제 #18
0
 def write(self, s):
     if self.protocol == 'serial':
         SerialInstrument.write(self, s)
     if self.protocol == 'VISA':
         VisaInstrument.write(self, s)
예제 #19
0
 def read(self):
     if self.protocol == 'serial':
         return SerialInstrument.read(self)
     if self.protocol == 'VISA':
         return VisaInstrument.read(self)
예제 #20
0
 def __init__(self, name="", address='', enabled=True, timeout=1.0):
     VisaInstrument.__init__(self, name, address, enabled, timeout)
     self.term_char = ''
예제 #21
0
파일: nwa.py 프로젝트: SchusterLab/slab
 def __init__(self, name="HP3577A", address='GPIB0::9::INSTR', enabled=True, timeout=None):
     VisaInstrument.__init__(self, name, address, enabled, term_chars='\r')
     self.query_sleep = 0.5
     self.recv_length = 65536
     self.term_char = '\r'