I think there may be some confusion as to what is actually occuring in your program. Below is a short summary of what is going on:
1) The DAQ Assistant is configured to automatically (in hardware) acquire data at a rate of 1 kHz. Because you don't know exactly how frequently you will be pulling the data points into LabVIEW, by setting Samples to Read you are allocating a 100 point buffer in RAM. Note that at a rate of 1 kHz, storing 100 points means that you can hold 0.1 seconds of data total. Attempting to check the buffer less frequently than 0.1 seconds will cause a buffer overflow error.
2) The DAQmx Write in your loop is configured for software timing. This means that you want to output only one sample per loop iteration.
3) A loop timer sets (roughly) the rate of your loop. Note that Windows can switch between tasks (anti-virus, LabVIEW, MS Word, etc) so it is impossible to say whether the delay will be 0.1 seconds, 0.099 seconds, or 0.012 seconds. Any of these are possible, which is the reason that you are buffering the DAQ Assistant analog input data.
It sounds like you wish to update your relays at a slower rate, which means that (as currently programmed), you need to increase the loop delay from 100 ms to something larger. But, when you do this you receive an error that says your DAQ Assistant buffer is overflowing! This is because your analog input buffer can only hold 0.1 seconds of data as programmed.
This can be fixed fairly easily. If you are simply attempting to collect analog data at 1 kHz all of the time and output digital data at a much slower rate, you can adjust the Number of Samples to Read on the DAQ Assistant to a larger value. For example, if you wish to output digital data every 1 second, and constantly input analog data at 1 kHz, you can set the Number of Samples to Read to a value of 1000 points. Since the DAQ Assistant continuous read is a blocking call (we must wait until the Number of Samples to Read are available), there is no need for a time delay in your loop; you can delete this.
If you wish to grab only the first 100 data points at 1 kHz after a digital output (e.g. every 1 second), you should use the N sample mode instead of continuous acquisition.
I hope this helps!
Casey Weltzin
Applications Engineer
National Instruments