Ejemplo n.º 1
0
 def do_get_input(self, channel, average=True, 
                     minvol = -10.0, maxvol = 10.0, 
                     trigger=False,
                     trig_slope='POS',
                     pre_trigger_samples=2,):
     '''Read the specified number of samples from the input.'''
     # Gabriele added the average parameter
     devchan = '%s/%s' % (self._id, channel)
     #Jan added samples=self._samples and freq=self._fraq
     self._pre_trigger_samples = pre_trigger_samples
     if self._pre_trigger_samples < 2 :
         raise ValueError('The number of pre_trigger samples has to be ' +
                             'larger than 1.')
     if self._samples < (self._pre_trigger_samples + 2):
         raise ValueError('The total number of samples has to be larger ' +
                             'than the number of pre trigger samples + 1') 
     values = nidaq.read(devchan, 
                         config=self._chan_config, 
                         samples=self._samples, 
                         freq=self._freq, 
                         averaging=average, 
                         minv=minvol, 
                         maxv=maxvol, 
                         triggered=trigger, 
                         trigger_slope=trig_slope,
                         pre_trig_samples=pre_trigger_samples)
     return (values * 1000.0)
Ejemplo n.º 2
0
 def do_get_input(
     self,
     channel,
     average=True,
     minvol=-10.0,
     maxvol=10.0,
     trigger=False,
     trig_slope='POS',
     pre_trigger_samples=2,
 ):
     '''Read the specified number of samples from the input.'''
     # Gabriele added the average parameter
     devchan = '%s/%s' % (self._id, channel)
     #Jan added samples=self._samples and freq=self._fraq
     self._pre_trigger_samples = pre_trigger_samples
     if self._pre_trigger_samples < 2:
         raise ValueError('The number of pre_trigger samples has to be ' +
                          'larger than 1.')
     if self._samples < (self._pre_trigger_samples + 2):
         raise ValueError('The total number of samples has to be larger ' +
                          'than the number of pre trigger samples + 1')
     values = nidaq.read(devchan,
                         config=self._chan_config,
                         samples=self._samples,
                         freq=self._freq,
                         averaging=average,
                         minv=minvol,
                         maxv=maxvol,
                         triggered=trigger,
                         trigger_slope=trig_slope,
                         pre_trig_samples=pre_trigger_samples)
     return (values * 1000.0)
Ejemplo n.º 3
0
 def do_get_input(self, channel):
     devchan = '%s/%s' % (self._id, channel)
     #Jan added samples=self._samples and freq=self._fraq
     return nidaq.read(devchan,
                       config=self._chan_config,
                       samples=self._samples,
                       freq=self._freq)
Ejemplo n.º 4
0
 def do_get_input(self, channel):
     devchan = '%s/%s' % (self._id, channel)
     return nidaq.read(devchan, config=self._chan_config)
Ejemplo n.º 5
0
 def do_get_input(self, channel):
     devchan = '%s/%s' % (self._id, channel)
     #Jan added samples=self._samples and freq=self._fraq
     return nidaq.read(devchan, config=self._chan_config, samples=self._samples, freq=self._freq)
Ejemplo n.º 6
0
 def do_get_input(self, channel):
     devchan = '%s/%s' % (self._id, channel)
     return nidaq.read(devchan, config=self._chan_config)