Re: RTAI and Comedi: Problems with commands

RTAI-Lab runs without problems using the COMEDI devices. 

Please be shure to have all the needed rtai modules loaded (including the 
rtai_comedi.ko module!)

Roberto


On Monday 06 November 2006 13:14, M. Koehrer wrote:
> 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

-- 
University of Applied Sciences of Southern Switzerland
Dept. Innovative Technologies
CH-6928 Lugano-Manno
http://www.dti.supsi.ch/~bucher

Received on 2006-11-06Z13:16:11