Ejemplo n.º 1
0
 def __init__(self, **kw):
     BaseDriver.__init__(self, **kw)
     self.deviceID = kw['deviceID']
     self.n_ch = 2
     self.wave = {}
     self._node_datatypes = {}
     self.aux_n_ch = 4
     self.aux_out = False
Ejemplo n.º 2
0
 def performSetValue(self, quant, value, **kw):
     if quant.name == 'Waveform':
         if len(value) > self.max_waveform_size:
             value = value[:self.max_waveform_size]
         value = np.array(value)
         vpp  = value.max() - value.min()
         offs = (value.max() + value.min())/2.0
         if vpp == 0:
             self.DC(offs)
             return
         name = kw['name'] if 'name' in kw.keys() else 'ABS'
         freq = kw['freq'] if 'freq' in kw.keys() else None
         self.update_waveform(2*(value-offs)/vpp, name=name)
         self.use_waveform(name, vpp=vpp, offs=offs, freq=freq)
     else:
         BaseDriver.performSetValue(self, quant, value, **kw)
Ejemplo n.º 3
0
 def performGetValue(self, quant, **kw):
     if quant.name == 'Data':
         if 'count' in kw.keys():
             count = kw['count']
         else:
             count = 100
         return self.get_Data(count)
     else:
         return BaseDriver.performGetValue(self, quant, **kw)
Ejemplo n.º 4
0
 def performGetValue(self, quant, **kw):
     if quant.name == 'WList':
         quant.value = self.waveform_list
         return self.waveform_list
     elif quant.name == 'SList':
         quant.value = self.sequence_list
         return self.sequence_list
     else:
         return BaseDriver.performGetValue(self, quant, **kw)
Ejemplo n.º 5
0
 def performSetValue(self, quant, value, **kw):
     if quant.name == '':
         return
     else:
         return BaseDriver.performSetValue(self, quant, value, **kw)
Ejemplo n.º 6
0
 def __init__(self, **kw):
     BaseDriver.__init__(self, **kw)
     self.ip = kw['IP']
     self.model = 'PG_ADC'
Ejemplo n.º 7
0
 def __init__(self, **kw):
     BaseDriver.__init__(self, **kw)
     self.chassis = kw['CHASSIS']
     self.slot = kw['SLOT']
Ejemplo n.º 8
0
 def __init__(self, **kw):
     BaseDriver.__init__(self, **kw)
     self.deviceID = kw['deviceID']