- From: <mono_at_arquimedes.utp.edu.co>
- Date: Mon, 05 Aug 2002 15:10:07 -0500 (COT)
I'm coding a program for control of an induction motor using rtai and comedi. Since the date to deliver the project is close i have no time to learn how to use kcomedilib and change the code so i used lxrt to access comedi from user space. The program uses comedi to read a data from the dac board then it procesess that data throught a neural algoritm and writes the result to the dac board. Lxrt is used to manage the period between data acquisitions. The program works fine some times but other times it blocks the computer completelly. First I used POSIX mutexes to manage access to shared memory between the control thread and the UI thread but it blocked so then i pass it to rtai semaphores but it still blocked finally i have changed it to mailboxes and i have also eliminated the shared memory, now it is much more stable but still blocks. Can someone please take a look at the code attached to this message and tell me what I am doing wrong?. The complete code (with automake/autoconf stuff) can be founded in http://arquimedes.utp.edu.co/~mono/control/control_motor2.tgz. Thanks in advance for any help you can give me. P.D.: Just in case someone is asking. The lxrt_wrapper stuff is used because I was not able to include the lxrt headers in c++ directly. It gave me a sintaxis error in some inline asambler code it has.
Attachments
- application/octet-stream attachment: control_window.cc
- application/octet-stream attachment: control_module.c
- application/octet-stream attachment: lxrt_wrapper.c
Received on 2002-08-05Z19:10:07