08-16-2017 05:29 PM
Hello everyone,
I want to generate square at an accurate frequency and duty-cycle. I tried USB-6009 but it doesn't really work for this problem. So I find a USB-6351 in our lab. I can use test panel in NI MAX to generate impulse sequences at a freq and duty-cycle. But when it comes to controlled by python, some other problems happen.
import nidaqmx from nidaqmx.types import CtrTime with nidaqmx.Task() as task: task.co_channels.add_co_pulse_chan_time("Dev2/ctr0") sample = CtrTime(high_time=0.001, low_time=0.002) print('1 Channel 1 Sample Write: ') print(task.write(sample))
DaqError: Specified operation did not complete, because the specified timeout expired. Task Name: _unnamedTask<0> Status Code: -200474
I turn to use CtrFreq(duty_cycle, freq) and same problem happens.
Thanks!