RTAI and Comedi: Problems with commands

Hi everybody,

I am trying to use the comedi commands using RTAI (RTAI 3.3CV, latest comedi/comedilib).
On the RTAI CVS I have found an (old?) example testa.c that I used as base.
(see attached testa.c).
The program testa sets up a command to sample from the first AIN channel
a couple of times.
The test compiles and runs (10 lines are printed out), however the data value
is always 0.
I have debugged into the driver (I use a simple PCI NI 6024-E) and I found out
that the data is transferred correctly via DMA to the async prealloc_buf.
It seams as the only thing that misses is the transfer from the internal (kernel space) memory
that holds the input values (written by DMA) to the user space value.

One strange thing that I have detected was the following:
The function rt_comedi_alloc_cmd() sets internally the values of cmd->data and
cmd->chanlist and returns the values in the arguments **chanlist and **data.
However, when testa returns from comedi_command_test() the value of
cmd->data has changed - it points now somewhere in a 0xexxxxxxx address space.
Could this be an issue?

Is there somewhere a running example available that shows working comedi commands
with RTAI?

Thanks for any help on this issue.

Mathias

-- 
Mathias Koehrer
mathias_koehrer_at_arcor.de


Viel oder wenig? Schnell oder langsam? Unbegrenzt surfen + telefonieren
ohne Zeit- und Volumenbegrenzung? DAS TOP ANGEBOT JETZT bei Arcor: günstig
und schnell mit DSL - das All-Inclusive-Paket für clevere Doppel-Sparer,
nur  44,85 €  inkl. DSL- und ISDN-Grundgebühr!
http://www.arcor.de/rd/emf-dsl-2

Received on 2006-11-06Z12:14:06