09-24-2010 01:48 PM
One small LabVIEW note: you can assign a default value to a control by typing that value into the control, then right-clicking and choosing Data Operations -> Make Current Value Default. That may be more helpful than putting a note next to the control.
If you're only reading 2500 points per channel at a time (which you say is your default), and your FPGA loop time is 10 usec, then your FPGA is acquiring 100,000 points per second per channel and your host loop will need to run at 40ms to keep up. Time the while loop to see how fast it is actually running (wire the output of the Wait to a shift register, then subtract the current value from the shift register value). Try reading 25,000 points per channel instead so that it can run at 400ms. Of course you will need to increase the DMA FIFO depth on the host in order to do this. Or, if you don't need that much data, simply increase the FPGA loop time to 100usec.
You can simplify the array manipulation in the host code. There is no need to build all the channels into a 2D array and then index them back out. Convert and scale the output of FIFO Read, then wire from the decimate array directly to the graphs and TDMS Write.