I've made a VI for controlling a laser scanner. This scanner outputs a voltage signal each for the X and Z co-ordinates and an up/dn count for the Y. While making the interface and testing, I noticed it ran quite slow as I was unable to get an acquisition rate much better than 300Hz. I have a DAQCard-6036E which is a 200kS/s card, and I was requesting 20 samples at a rate of 100kS/s, which without any overhead would be 5000Hz. Once I add in my interpolation routine and a couple others, the rate drops to a crawl at 50Hz or less.
As I'm without the hardware for a week or so, I substituted the DAQ Assistant VI's (which I was using to input the X,Y,Z signals from the DAQ card) with three "Simulate Signal" VI's, and set them for sine and square wave signals of varying frequencies and amplitudes to simulate the approximate motion of the scanner. It ran -extremely- slowly, at only 12 to 13Hz, so I ran the profiler and found that the main offenders were these 3 Simulate Signal VI's.
After blowing it open and trying to trim it down some, and after doing alot of searching around the forum, I made this little VI to test changes. With my system right now, I can get a rate of about 3000Hz out of this, while the maximum rate (100,000 / 20) would be 5000Hz. Is there a simpler method to get a faster result using lower level VI's? I hope to apply the same logic by replacing the DAQ Assistant VI's. None of the parameters are changed during runtime.