Example #1
0
 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'}
Example #2
0
 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
Example #3
0
 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)
Example #4
0
 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)
Example #5
0
    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'}
Example #6
0
    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'}
Example #7
0
 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='', 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)
Example #9
0
 def __init__(self, interface='lan', hostname=''):
     if interface == 'lan':
         SCPI.__init__(self, interface=interface, hostname=hostname)
Example #10
0
 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')
Example #11
0
 def __init__(self, name='microreactor-agilent-34972a'):
     #SCPI.__init__(self,'/dev/usbtmc1','file')
     SCPI.__init__(self, interface='lan', hostname=name)
Example #12
0
 def __init__(self, name='microreactor-agilent-34972a'):
     #SCPI.__init__(self,'/dev/usbtmc1','file')
     SCPI.__init__(self, interface='lan', hostname=name)
Example #13
0
 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
Example #14
0
 def __init__(self, interface='lan', hostname=''):
     if interface == 'lan':
         SCPI.__init__(self, interface=interface, hostname=hostname)
Example #15
0
 def __init__(self, name='volvo-agilent-34972a'):
     SCPI.__init__(self, interface='lan', hostname=name)