Johnny-
Without getting into the details of your program operation, I'd like to make a suggestion. In order to achieve better loop rates with your AI, I would suggest lowering your Samples/Channel to something like 100 or even 50. As you currently have it configured, each AI read takes about 1 second and then you compute stastics form that 1 seconds worth of data. Lowering your samples to read means that you will only be analyzing a fraction of a seconds worth a data each loop iteration, but it will speed up your loop and should make your program react more quickly.
Setting the samples to read too low means you run the risk of underflowing your read buffer, but at 1kHz sampling rate, you should be able to run with smaples/channle in the single digits without much difficulty (depengin on how fast your computer is)
Xaq