Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Fast Task Restart

Hello,

    I am using a NI USB-6211 and need to synchronize a voltage ramp and a square wave with an external clock. I would simply use the external clock as the clock for an analog output and counter task, however the external clock has a much lower frequency than I need to generate a smooth enough ramp. I would like to instead create two tasks, an analog output task using an internal clock that is fast enough for my needs with finite sample generation and a timed digital pulse task and then configure both to be started on a rising edge of the external clock I am trying to synchronize, this way the start of each ramp would begin on a rising edge of the external clock. The way I have implemented this is by hooking a callback function to the task done event and then within that callback function I call DAQmxStopTask and DAQmxStartTask. This does what I want, however the time it takes to stop and then start the task is to slow (~63ms). Is there a faster way to restart the task or is there a better way to go about doing this? Any help would be appreciated.

-Zach

0 Kudos
Message 1 of 2
(2,760 Views)
0 Kudos
Message 2 of 2
(2,730 Views)