Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

USB-6351 Python Wave generation error

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!

0 Kudos
Message 1 of 1
(1,186 Views)