06-20-2017 03:10 PM - edited 06-20-2017 03:23 PM
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
---------------------------------------------
Inside Loop
06-21-2017 07:07 AM
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.