Hello. One thought would be to read fewer samples per iteration. It looks like you are reading about 2000 samples every time the DAQmx Read executes. At 20kSamples/sec, this alone will take a tenth of a second. Reading fewer samples will allow the DAQmx Read to return faster, allowing the DAQmx Write to execute quicker. That will give you a faster response, by allowing your loop to run faster. I also noticed you have a 50 ms wait in your loop. Depending on how many samples you choose to read, that might be a limiting factor as well. Something to note, you aren't really doing any heavy processing between the read and the write, so you probably won't be able to speed up the actual execution time between the Read and Write. But my earlier suggestions should give you a faster response.