Re: Problems with at-mio-16e-10

On Mon, 13 Feb 2006, Daniel Nilsson wrote:

> On Sat, Feb 11, 2006 at 11:35:30PM +0100, Daniel Nilsson wrote:
> > I still however get error message after a few minutes of running my
> > application: 
> > 
> > read failed while reading DAQ data: Broken pipe
> > 
> > 
> > The kernel reports the following through dmesg:
> > ni_mio_common: ai error a_status=e4f3
> > 
> > That is the only message from the kernel though. I know that while I
> > was having buffer overflow problems the kernel driver did report
> > buffer overflow which doesn't seem to be the case now. I don't know
> > what this e4f3 status means, is there an error in my application (the
> > way I use the card/drivers) or is there some other kind of problem?
> 
> Hi All,
> 
> I have done some more debugging on my problem, using the "scope"
> application from comedi_examples. While running the scope application
> at 10kHz sampling rate on 4 channels I get almost the same problem:
> 
> Scope reports:
> 
> scope: read: Broken pipe
> 
> and the kernel reports:
> 
> ni_mio_common: ai error a_status=e433
> 
> This happens after a while though, usually a few minuted of running
> the application but sometimes longer. The PC is an Pentium Pro 200,
> the card is a NI AT-MIO-16E-10 (ISA bus), driver version 0.7.69 and
> kernel version is 2.6.8. The machine is diskless, root filesystem is
> NFS mounted.
> 
> Based on the source for the kernel driver I come to the conclusion
> that this is the FIFO buffer on the HW that is getting full. Since the
> buffer is 512 bytes and I sample at 10kHz I calculated that the buffer
> needs approximately 25.6ms to fill up (assuming 2 bytes per sample). I
> seems like a long time to me taking into account that the HW will
> interrupt the kernel to empty the buffer, which should take that long?

With these cards, I think when one says sampling at 10kHz,
it means you are doing a scan of all channels you are sampling
at 10 kHz. So if you are sampling 4 channels _at_ 10 kHz I think you get:

10000 scans/sec * 4 channels/scan * 2 bytes/channel = 80000 bytes/sec
So if your fifo is 512 bytes then:
80000 bytes/sec * 1 fifo/512 bytes = 156.25 fifo/sec
or 1 sec/156.25 fifo = 0.00639 sec/fifo
So there is only 6.3 ms to dump the fifo.

> 
> Should I expect to be able to sample at 10kHz using this card? How can
> I figure out why the FIFO is not emptied?
> 

I don't know...though a few years ago I was running a
NI AT-MIO-16E-1 (yup the 16E-1) with a 450 MHz machine,
with RTAI. My scan rate was 200 kHz with 4 channels. The
16E-1 however has a 8196 byte fifo. When I switched to
the PCI version of the card, which does only have
a 512 byte fifo, my 3 GHz machine with RTAI
was not fast enough, until I went to DMA.
 
Cheers,

Jim (just a reader of the list...not a comedi guru)

Received on 2006-02-13Z20:28:07