Exemplo n.º 1
0
                def initDoTask():

                    # Create channels.
                    self.do_task = nicontrol.DigitalWaveformOutput(digital_data[0][0], digital_data[0][1])
                    for i in range(len(digital_data) - 1):
                        self.do_task.addChannel(digital_data[i+1][0], digital_data[i+1][1])

                    # Add waveform
                    return self.do_task.setWaveform(waveform, frequency, clock = self.waveform_clock)
Exemplo n.º 2
0
            def startDoTask():

                try:
                    # Create channels.
                    self.do_task = nicontrol.DigitalWaveformOutput(digital_data[0][0], digital_data[0][1])
                    for i in range(len(digital_data) - 1):
                        self.do_task.addChannel(digital_data[i+1][0], digital_data[i+1][1])

                    # Add waveform
                    self.do_task.setWaveform(waveform, frequency, clock = wv_clock)

                    # Start task.
                    self.do_task.startTask()
                except nicontrol.NIException:
                    return True

                return False