comedi and rtai 3.1

Peter Dettori dettori at
Mon Oct 4 16:53:53 CEST 2004

Wolfgang Pichl wrote:
> On Fri, 1 Oct 2004, Peter Dettori wrote:
> Hi,
>>I am trying to build rtai-3.1-test5 with comedi support.  I have comedi
>>comedi-0.7.68 and comedilib-0.7.21 installed.
> I have tried the same thing last week and did not get it to work. The
> kernel-space RTAI support in Comedi works very well, but the user-space
> LXRT interface seems to be buggy.
>>I then noticed in a september post
>>that it should work with comedi cvs.  Is that right?
> Unfortunately not. My personal experience:
> If I use the latest stable comedi and comedilib, RTAI does not even
> compile if the Comedi-LXRT is enabled.
> Using the comedi cvs, it does compile, but the comedi-rtai module cannot
> be loaded due to unresolved symbols.
> Please note: in the compilation of RTAI, the header comedilib.h from
> the *comedi* package, not that from *comedilib* must be used. This
> information was somewhere in an earlier posting in this mailing list.
> However, even if this is done correctly, it does not work.

I have it working well enough for my purposes now.  I can submit a 
tests.c for the showroom if it will be added.  I have only tested the 
analog output though.

I encountered 2 problems, the first is that comedi_close function in the 
comedi distribution does not check if the device is NULL.  So one gets 
an oops if the comedi_config is not done before running tests, as it is 
coded in 0.7.68.

calling comedi_data_write seemed to cause a crash a couple of times when 
i was trying to gets things running.  I guess this was a result of 
something else I had done wrong since it seems stable now.  but my 
feeling is that there is not enough error checking in the kernel modules 
(presumably comedi since rtai just passes things on.) to safeguard 
against "beginners" mistakes.

> One last question: if you only want analog input, do you really need LXRT?
> Using the "command" facility of comedi and the kernel-based RTAI support,
> you get a data stream in real-time to the comedi device (e.g.
> /dev/comedi0), which your application can read continuously in
> non-realtime. At least for me, this turned out to be completely
> sufficient, so I did not bother any more about LXRT.

I want analog output not input.


> best regards
> Wolfgang Pichl
> ******************************************************************
> a.o.Prof.Dr.Wolfgang Pichl
> Institut f. Materialphysik         University of Vienna
> Boltzmanngasse 5
> A-1090 Wien     AUSTRIA
> Tel. (+43 1) 4277 51382
> Fax  (+43 1) 4277 9513
> email pichl at
> *****************************************************************

More information about the Rtai mailing list