Hi Hofrat Let's say I have a pendulum and I want to control. I have my algorithm whose parameters may change to tune the system. My idea was to have a small and simple program which would retrieve data from a sensor and send it to a second program running in user-space, which would calculate a parameter according to the data sent from rtl and the algorithm. This parameter would be sent back to rtl, which would send an output to a data/adquisition card. The whole cycle is: (1)rtl->fifo->user-space->fifo->rtl(2) To measure the time it takes I send an output (square wave) to the parallel port, pin 1, when it starts (1) and a the same output to the pin 2 when it finishes (2), I monitor it with a digital oscilloscope (two channels) and calculate the delay between the two square waves. In order to compare the results I also used the function gethrtime() in (1) and (2) and substracted the results, thus I get the diffence, that is the cycle time. The results using both ways are identical. The results I get do puzzle me. I do not run anything but the module and the user-space app. The cycle times I obtained can be groupped in three times: 350 microseconds 7,8 msec 15 msec When I load the module and run the app I will have a constant cycle time for a while but eventually it will change. For instance at the beginning there may be 7,8 msec delay and at some point it changes to 15 msec and stays there for another while. I have attached the two files I'm using in case you can see an flaw or you may want to try them in your machine. I know that while working within user-space no real time process can be guaranteed, the question is if I have a program running in real time linux how can I update the user about the status of my process? Well, thank you very much in advance Raul >this is not very conforting four you , but I'm trying to set it up here to >reproduce it. my understanding of what your are trying to do is > >rt_task -> fifo -> user-space-app > >and your problem is that you can't transfere data from the rt-side to the >non-rt-side faster thatn with about 100Hz . is there a problem in sing a >buffer on the rt-side and trasnfering the buffer ?? the user-side will >never >be realtime, it can be faster in an unloaded box but if you heavally load >the box it can go down to zerro aswell. so you will not be able to do a >guearanteed update of data on the user space side with ANY frequency .If >you have realtime constraints in your user app then you need to move some >parts of it or all into the realtime-part. > >if you send me details on what you are trying to do , I'll give it a try. > >hofrat ________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED] --- For more information on Real-Time Linux see: http://www.rtlinux.org/rtlinux/
