LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx continuously update output array from example

Solved!
Go to solution

Hello,

 

I am using the example Synch_AI-AO in the DAQmx folder and it works great for sine waves, pulses, triangle waves or anything periodic. However, I would like to output a noise array which is generated from the WhiteNoise function, which is continously updated every N seconds. 

 

I have tried calling the StopCallback then the StartCallback after delaying for N seconds, but since I have to be in function when I call these callbacks I end up getting back to the place where I called them before exiting them (like recursion), which kills my program.

 

Is there a way to update output so that it doesn't cause the recursion issue that locks up my program?

 

Thanks.

0 Kudos
Message 1 of 2
(3,884 Views)
Solution
Accepted by topic author EricJR

Hi EricJR,

 

Rather than calling the StopCallback and StartCallback functions, have you tried calling the DAQmxWriteAnalogF64 function every time new samples are generated?

Julia P.
0 Kudos
Message 2 of 2
(3,816 Views)