Ejemplo n.º 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=''
Ejemplo n.º 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' 
Ejemplo n.º 3
0
 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)
Ejemplo n.º 4
0
    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 = ''
Ejemplo n.º 5
0
    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 = ''
Ejemplo n.º 6
0
    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 = ''
Ejemplo n.º 7
0
 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'
Ejemplo n.º 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'
Ejemplo n.º 9
0
Archivo: nwa.py Proyecto: 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'
Ejemplo n.º 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()
Ejemplo n.º 11
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 = ''
Ejemplo n.º 12
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'
Ejemplo n.º 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()
Ejemplo n.º 14
0
 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)
Ejemplo n.º 15
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")
Ejemplo n.º 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")
Ejemplo n.º 17
0
 def __del__(self):
     return
     if self.protocol == 'serial':
         SerialInstrument.__del__(self)
     if self.protocol == 'VISA':
         VisaInstrument.__del__(self)
Ejemplo n.º 18
0
 def write(self, s):
     if self.protocol == 'serial':
         SerialInstrument.write(self, s)
     if self.protocol == 'VISA':
         VisaInstrument.write(self, s)
Ejemplo n.º 19
0
 def read(self):
     if self.protocol == 'serial':
         return SerialInstrument.read(self)
     if self.protocol == 'VISA':
         return VisaInstrument.read(self)
Ejemplo n.º 20
0
 def __init__(self, name="", address='', enabled=True, timeout=1.0):
     VisaInstrument.__init__(self, name, address, enabled, timeout)
     self.term_char = ''
Ejemplo n.º 21
0
 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'