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=''
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'
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)
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 = ''
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 = ''
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 = ''
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'
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'
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'
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()
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 = ''
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'
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()
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)
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")
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")
def __del__(self): return if self.protocol == 'serial': SerialInstrument.__del__(self) if self.protocol == 'VISA': VisaInstrument.__del__(self)
def write(self, s): if self.protocol == 'serial': SerialInstrument.write(self, s) if self.protocol == 'VISA': VisaInstrument.write(self, s)
def read(self): if self.protocol == 'serial': return SerialInstrument.read(self) if self.protocol == 'VISA': return VisaInstrument.read(self)
def __init__(self, name="", address='', enabled=True, timeout=1.0): VisaInstrument.__init__(self, name, address, enabled, timeout) self.term_char = ''