Пример #1
0
 def __init__(self, interface, hostname='', device=''):
     if interface == 'serial':
         SCPI.__init__(self, interface=interface, device=device)
         self.f.baudrate = 19200
         self.f.timeout = 5
     if interface == 'lan':
         SCPI.__init__(self, interface=interface, hostname=hostname)
     self.channel_names = {1: 'a', 2: 'b'}
Пример #2
0
 def __init__(self, output, interface = 'serial', 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)
Пример #3
0
 def __init__(self, interface='serial', 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)
     self.unit_list = [
         'VDC', 'VAC', 'ADC', 'AAC', 'OHM', 'OHM4W', 'HZ', 'SECS', 'C', 'F',
         'K'
     ]
Пример #4
0
 def __init__(self, interface = 'serial', 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)
     self.unit_list = ['VDC', 'VAC', 'ADC', 'AAC', 'OHM', 'OHM4W', 'HZ', 'SECS', 'C', 'F', 'K']
Пример #5
0
 def __init__(self, port='ttyUSB0', name='microreactor-agilent-34972a'):
     #SCPI.__init__(self,'/dev/usbtmc1','file')
     SCPI.__init__(self, interface='serial', device = port, hostname=name)
Пример #6
0
 def __init__(self):
     SCPI.__init__(self, '/dev/ttyS0', 'serial')
     self.f.baudrate = 19200
     self.f.timeout = 5
Пример #7
0
 def __init__(self, name='microreactor-agilent-34972a'):
     #SCPI.__init__(self,'/dev/usbtmc1','file')
     SCPI.__init__(self, name, 'lan')
Пример #8
0
 def __init__(self, port='ttyUSB0', name='microreactor-agilent-34972a'):
     #SCPI.__init__(self,'/dev/usbtmc1','file')
     SCPI.__init__(self, interface='serial', device=port, hostname=name)
Пример #9
0
 def __init__(self,output,usbchannel = 0):
     SCPI.__init__(self,'/dev/ttyACM' + str(usbchannel),'serial')
     if not (output == 1 or output == 2):
         raise InterfaceOutOfBoundsError(output)
     else:
         self.output = str(output)
Пример #10
0
 def __init__(self, interface = 'lan', hostname=''):
     if interface == 'lan':
         SCPI.__init__(self, interface=interface, hostname=hostname)
Пример #11
0
 def __init__(self, name='microreactor-agilent-34972a'):
     #SCPI.__init__(self,'/dev/usbtmc1','file')
     SCPI.__init__(self, interface='lan', hostname=name)