03-03-2016 07:54 AM
I am trying to write an array of U8 samples to port0 of a USB6356 DAQ with a 1MHz rate. When I send the data it seems like the Wait Until Done vi always times out, no matter hogy high I set the timeout. What could I be doing wrong?
Thanks
03-03-2016 08:57 AM
Ok so I discovered I had sample regeneration activated in NI-MAX and I deactivated it thinking that it might solve the problem. Now I get Error -200290 instead:
Possible reason(s):
The generation has stopped to prevent the regeneration of old samples. Your application was unable to write samples to the background buffer fast enough to prevent old samples from being regenerated.
To avoid this error, you can do any of the following:
1. Increase the size of the background buffer by configuring the buffer.
2. Increase the number of samples you write each time you invoke a write operation.
3. Write samples more often.
4. Reduce the sample rate.
5. If your data transfer method is interrupts, try using DMA or USB Bulk.
6. Reduce the number of applications your computer is executing concurrently.
In addition, if you do not need to write every sample that is generated, you can configure the regeneration mode to allow regeneration, and then use the Position and Offset attributes to write the desired samples.
03-03-2016 09:30 AM
It is sounding like you have the task configured to use Continuous Sampling. You want Finite Samples. It would help us more if you could supply a screenshot of your task configuration in MAX.
03-03-2016 09:50 AM
Yes I use continuous sampling as I don't know the number of samples in advance. Although I tried to set finite samples but in that case nothing happens, the program instantly executes without any error but nothing is written to the port either.