01-09-2009 03:33 PM
I am using a 9401 module in slot 5 of the compact DAQ 9172 chassis to count pulses. About every 5th execution of my VI, I get error 200141: "Data was overwritten before it could be read by the system". I am using a 100kHz clock rate. I am using DAQmx VI's, not DAQmx base. (I understand that there's a DMA issue with DAQmx base.)
Can anyone make a suggestion? I have attached my VI.
Thanks in advance.
01-12-2009 09:03 AM
Hi VI Joe,
Thanks for the post and I hope your well.
I have looked at your code and the error. I wondered if you were mainting the same configuration each time you run your code - the error would suggested your sampling rate is set too high.
Do you see the same effect if you use one of the DAQmx Example in the NI Example Finder (help>>Finder Examples.. Hardware Input/Output>>DAQmx..)?
01-12-2009 12:13 PM
01-12-2009 02:43 PM
Hi Joe,
I went ahead and setup a 9172 chassis with a 9401 module in slot 5, and ran your code. I placed a while loop around the code and let it run for quite awhile without any trouble (see attached screenshot). I also ran a task in MAX (finite and continuous) many times without getting the error. I am not sure why your system is having trouble when using a clock rate of 100 kHz. Generally, the USB Signal Stream can transfer the data faster than that, though for some reason the 2 sample FIFO on your cDAQ chassis is getting overwritten faster than the USB can transfer the data. Do you have anything else running on the chassis at the same time or any other USB communication occurring such as with another DAQ device? The only time I have seen this error occur was when running a buffered edge counting task while synchornizing it with multiple analog input channels. I am also wondering if you can run the program on another system to see if the performance of the USB is better.
To answer your question about using a slower clock, there is not one you can directly choose such as the 100 kHz timebase, though you could provide a clock from another task (such as an AI/AO Sample Clock or from the other counter). I went ahead and created an example program which produces a pulse train on ctr1 and uses this as the clock for ctr0 (attached below). When running this code, I did not start to receive the -200141 error until I increased the clock to about 1 MHz. Hope this helps,
01-14-2009 03:10 PM
01-14-2009 03:28 PM
Hi Joe,
I am glad to hear that you got it working. It sounds like you were definitely running into some limitations of the slower USB bus. Thanks for the follow-up to let us know you got it working with the other system!
Regards,