10-14-2009 12:00 PM
Hi there,
I currently have fully functional code that sends commands to my NI-6731 digital-to-analog card. The code is designed to work in a loop where desired output voltages are determined in real time then output inside the loop.This has been working well, but I need it to run faster. It appears there is a ~5ms delay between determining the necessary voltage and the actual output from the card. I presume the delay is somewhere in the buffering process. If you could look at the stripped down version of my code and tell me how I can shorten the delay between sending voltages to the card and the output of the card, I would appreciate it tremendously!
Cheers
10-19-2009 05:55 AM
How are you determining the delay is approximately 5 ms? Try running this example and see if the delay still exists.
10-20-2009 10:31 AM
My system works by sending a voltage to a fast steering mirror that steers a laser beam into a high-speed camera. The camera reads out at 500 frames/sec. I know that there is a delay because when I command the card to jump between two voltages at faster than 5ms and look at the camera, the system becomes unstable. It is not the camera and it is not the mirror, I have independently checked those.
As for the example, I have run it and it is just fine. The problem is not with the speed at which the card itself can send out voltages (it can do that at ~2 MHz). The problem is with updating the buffer. The example you gave me runs the same data over and over and over ad nauseum. My problem is when you change the values of the array titled 'data', it takes about 5ms for that change to find its way into the card. As I said before, I am sure it is simply a mistake in my code, but since I built the code on previous examples, I am out of ideas on how to fix the problem.
Cheers