Marco Arrigucci arebour at gmail.com
Mon Sep 19 23:28:24 CEST 2011

Hi to everyone,
I'm trying to develop an S-Function in matlab to perform a streaming
acquisition on multiple channels using comedi commands.
I attached my source code for the S-function.

I've looked at the example cmd.c in the rtai cvs showroom, tried to run it
but it doesn't work.
The problem is that the function rt_comedi_command_data_wread always returns
a negative number and the data is 0, it neither doesn't wait the TIMEOUT: it
returns immediately. rt_comedi_wait, which should wait for the interrupt
without timeout returns immediately as well. I run it in user-space.

Why the wait doesn't work? And why no interrupt is arriving?

If I run a command and make just a rt_comedi_command_data_read I'm able to
read from the board, which is a NI PCI 6036E, but this approach is not

I'm using RTAI 3.7 + comedi 0.7.76 on Debian.

If I look in /proc/interrupts I see :
18:    0      IO-APIC-fasteoi    ni_pcimio
so there are no conflicts on that IRQ number but the interrupt count is
always 0.

How can I get the example in the showroom (cmd.c) to work?
Is there any way to know if interrupts are working for that board?

Please help me

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.rtai.org/pipermail/rtai/attachments/20110919/41b0b189/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sfun_comedi_data_mulreadX.c
Type: text/x-csrc
Size: 8707 bytes
Desc: not available
URL: <http://mail.rtai.org/pipermail/rtai/attachments/20110919/41b0b189/attachment.c>

More information about the Rtai mailing list