From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Write AO inside a loop

I have been trying to output AO voltage to a power supply to control the current. It has been working outside a loop, but not inside. I am attaching both versions. I would appreciate any feedback about how I can modify the one inside a loop to write the Output. 

 

Thanks,

Waddah

------------------------

Outside Loop

Outside Loop.PNG

---------------------------------------------

Inside Loop

Inside Loop.PNG

0 Kudos
Message 1 of 2
(2,357 Views)

What do you mean by "doesn't work". Apart from outputting 10001 values and looping 10000 times (not a problem, just won't write your last element) and the seeming pointlessness (writing the same value over and over at 10kHz - presumably this is to simplify the demo) it's not clear what shouldn't work.

 

Do you mean it takes much longer? Perhaps you receive a timeout error? If so, the issue is likely to be the fact that you're trying to run a loop iteration in less than 0.1ms to be able to keep up with the sample rate - you should take N points instead of 1 Point and reduce the number of iterations of the loop.


GCentral
0 Kudos
Message 2 of 2
(2,307 Views)