Пример #1
0
 def __init__(self, name='Dev1', *args, **kwargs):
     self._daq = ni.NIDAQ(name)
     super(NIDAQ, self).__init__(None, "NIDAQ", includeSCPI=False, **kwargs)
     for chan in self._daq.get_AI_channels():
         self.add_property(chan)
     for chan in self._daq.get_AO_channels():
         self.add_property(chan, set=True)
Пример #2
0
    def __init__(self,
                 zero=False,
                 dev_name='Dev1',
                 input_range=10,
                 output_range=10):
        self._daq = ni.NIDAQ(dev_name, input_range, output_range)
        self._dev_name = dev_name
        self._input_range = input_range
        self._output_range = output_range

        self.setup_inputs()
        self.setup_outputs()

        if zero:
            self.zero()
Пример #3
0
    def __init__(self,
                 zero=False,
                 dev_name='Dev1',
                 input_range=10,
                 output_range=10):
        self._daq = ni.NIDAQ(dev_name, input_range, output_range)
        self._dev_name = dev_name
        self._input_range = input_range
        self._output_range = output_range

        self._ins = self._daq.get_AI_channels()
        self._outs = self._daq.get_AO_channels()

        for chan in self._ins:
            setattr(self, chan, InputChannel(self._daq, name=chan))

        for chan in self._outs:
            setattr(self, chan, OutputChannel(self._daq, name=chan))

        if zero:
            self.zero()