08-28-2020 01:19 PM
Hi Jim,
@JimMarihew wrote:
But it's set to read 10 samples in the TC task.
The setting in the task definition is irrelevant when you use DAQmxRead in "1 sample" mode: you request one sample, you get one sample!
@JimMarihew wrote:
The DI was just added yesterday. Before that it ran for hours with no errors. Right now I am running it with the DI task disabled and it is over 40k iterations without the error.
So you have a loop running fast enough to handle those 100 S/s for the TC task even with reading one sample per iteration (or: less than 10ms execution time per iteration). Now you added more code, which increases the execution time per iteration to >10ms: Now the TC task will give a "buffer overrun error" after some time/iterations…
Again:
Run all those DAQmx tasks in parallel. Don't chain them (THINK DATAFLOW!) due to using a single error wire from one to the next!
I still recommend to place each task in its own loop…