Multifunction DAQ

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. 





Outside Loop

Outside Loop.PNG


Inside Loop

Inside Loop.PNG

0 Kudos
Message 1 of 2

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.

0 Kudos
Message 2 of 2