def __init__(self, interface, hostname='', device=''): if interface == 'serial': SCPI.__init__(self, interface=interface, device=device, baudrate=19200) self.f.timeout = 5 if interface == 'lan': SCPI.__init__(self, interface=interface, hostname=hostname) self.channel_names = {1: 'a', 2: 'b'}
def __init__(self, interface, device='/dev/ttyUSB0'): if interface == 'serial': SCPI.__init__(self, interface='serial', device=device, baudrate=9600) self.scpi_comm('FORMAT:ELEMENTS READ') # Set short read-format
def __init__(self, output, interface, hostname='', device='', tcp_port=0): if interface == 'lan': SCPI.__init__(self, 'lan', tcp_port=tcp_port, hostname=hostname) if interface == 'serial': SCPI.__init__(self, 'serial', device=device) if not (output == 1 or output == 2): raise InterfaceOutOfBoundsError(output) else: self.output = str(output)
def __init__(self, interface, hostname='', device='', baudrate=9600): if interface == 'serial': SCPI.__init__(self, interface=interface, device=device, baudrate=baudrate, line_ending='\n') self.comm_dev.timeout = 2 self.comm_dev.rtscts = False self.comm_dev.xonxoff = False print(self.comm_dev) if interface == 'lan': SCPI.__init__(self, interface=interface, hostname=hostname) self.channel_names = {1: 'a', 2: 'b'}
def __init__(self, interface='lan', hostname='', connection_string=''): if interface == 'lan': # the LAN interface SCPI.__init__(self, interface=interface, hostname=hostname, line_ending='\n') if interface == 'file': # For distributions that mounts usbtmc as a file (eg. ubuntu) SCPI.__init__(self, interface=interface, device='/dev/usbtmc0') if interface == 'usbtmc': # For python-usbtmc (preferred over file) SCPI.__init__(self, interface=interface, visa_string=connection_string)
def __init__(self, interface='lan', hostname=''): if interface == 'lan': SCPI.__init__(self, interface=interface, hostname=hostname)
def __init__(self, interface='lan', hostname=''): if interface == 'lan': SCPI.__init__(self, interface=interface, hostname=hostname) if interface == 'file': SCPI.__init__(self, interface=interface, device='/dev/usbtmc0')
def __init__(self, name='microreactor-agilent-34972a'): #SCPI.__init__(self,'/dev/usbtmc1','file') SCPI.__init__(self, interface='lan', hostname=name)
def __init__(self, name='volvo-agilent-34972a'): SCPI.__init__(self, interface='lan', hostname=name)