Problems with at-mio-16e-10

Hi All,

I have written a program using comedi driver version 0.7.69
running on Linux 2.6.8. The DAQ board is a NI at-mio-16e-10 (ISA bus)
that is setup using commands to do the sampling on the analog input
subdevice. The PC is an old Pentium Pro 200, I'm setting the card to
sample at 100kHz.

To avoid having to use a realtime kernel my program actually sends one
command that samples 1024 times on 4 channels which gives my 4096
samples. Since each sample is 2 bytes this equals the same amount of
data that fits in the kernel buffer that default is 8192 bytes. In
reality that means I should have an infinite amount of time to service
reading the kernel buffer from user space since I don't issue a new
sampling command until I've read the whole kernel buffer. This also
seems to be the case, since I can suspend my program and resume it
without having read() return broken pipe. 

I still however get error message after a few minutes of running my
application: 

read failed while reading DAQ data: Broken pipe

That error message comes from the following piece of code:

/* There are bytes to read */
int ret=read(comedi_fileno(dev),&buffer[bytes_read],(DAQ_KERNEL_BUFFER - bytes_read));
if (ret<0) {
 perror("read failed while reading DAQ data");
 error_detected = TRUE;
} else if (ret > 0) {
 bytes_read += ret;
} else {
 fprintf(stderr,"End of file on read, this should not happen! Exiting...\n");
 error_detected = TRUE;
}

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?

Best Regards
Daniel Nilsson

Received on 2006-02-11Z22:35:30