Syncronization problem in rtmain.c and scicos test
roberto.bucher at supsi.ch
Wed Aug 9 11:08:36 CEST 2006
You are not the first who ahs this (strange) behaviour with the
synchronisation between the RT task and the rtMain task. Perhaps it can be
connected with the send/receive mechanism, which gives some troubles in the
new version of RTAI with the provided msg.c from Paolo Mantegazza. We are
still investigating why this module dosn't work correctly with rtmain in both
Matlab and Scilab environments. I think that your solution can be introduced
to solve this problem.
The "test.cos" file is not compatible with the RTAI-3.3 version, I'm sorry for
this. I posted a corrected version on my homepage.
It should be OK for the next RTAI-3.4 release. In this new version I canged a
lot in the Scicos part, but I lived the old modules for compatibility. I now
substituted all the RTAI/Scicos bock with function type "4" instead of the
function type "2004" used in the other RTAI-3.x versions. Writing new scicos
blocks should be now easy, because Scicos interface and corrsponding C
function are now better separate.
I'll check your new rtmain.c files ASAP.
On Wednesday 09 August 2006 10:44, Gianluca Palli wrote:
> Hi Roberto
> i found a problem in the realtime applications generated both from
> matlab7/simulink/rtw and scilab-4.0/scicos with rtai-3.3
> During the first run of the application after the rtai modules loading, all
> works fine, but at any subsequent run the application seems to be blocked
> before the resuming of the rt_BaseRate task. I think the problem is in
> which task is running after the rt_send/rt_receive calls (may be a bug?).
> I solved the problem replacing the syncronization between the rt_Main task
> and rt_BaseRate made by means of rt_send and rt_receive with a semaphore
> based syncronization.
> I send you the modified rtmain.c
> Another problem is in the test.cos example: to compile this example
> correctly i replaced the rtai blocks with the corresponding ones from the
> RTAI-Lib palette. It seems the blocks in the example come from an older
> version of the RTAI-Lib.
> Best Regards
University of Applied Sciences of Southern Switzerland
Dept. Innovative Technologies
More information about the Rtai