On 2013-05-02 00:15, Sebastian Pavez wrote: > Hi everyone, > > I haven't install RTnet yet because I wanna to make sure if this will > help me. First of all a little contextualization: > I'm working with Xenomai on a educational project. The idea is quite > simple, develop a control system (for position and velocity control of a > DC motor) and study his performance with a "perturbation" task (wich is > no more than a "for" loop to increase the execution time of this task), > working with the highest priority for the perturbation and show how the > situation is improved when the priority is higher for the control task. > Even if it seems easy, it hadn't been for me because I don't have much > background with linux, RT issues and only a little bit with C languaje. > But I managed to make it work. > > Now the idea is to develop a remote lab wich could be controlled via EJS > (Easy Java Simulations). My problem is with the communication, I have an > operative example of a TCP/IP server on C and the client on Java (EJS). > But my doubts are with the real time issues, I don't know how to connect > the server with the control task (I'm thinking on shared memory). That's > why my teacher asked in the Xenomai mail list if the above is possible > and the answer he get was: use RTnet ... > > Now, is it that true? I mean, How do I do that? I have to create the > server like another thread in the program that already have the control > and perturbation threads? > Is there any problems if the client is not a real time task? I would > have to make some serious modifications to the client I already have in > Java? If it possible, somebody have some information to start with? I > already saw that you have an example for a tcp server.
Is the Java application part of your control loop (physical process -> sensor -> control algorithm -> actuator -> physical process)? If so, you would first of all have to pick real-time Java VM before thinking about real-time communication. But that's asking for complexity you likely do not want for such a simple task. Writing some non-RT configuration and monitoring front-end in Java is fine, but the actual control task is better done in C (or C++ if you like). The RT process containing the control task could then have a another thread, low priority, that does the non-RT communication with the front-end via TCP and transfers any parameter updates to the RT task (lock-free or synchronized with a compatible locking mechanism). That's the standard design pattern for real-time control applications. Jan
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. This 200-page book is written by three acclaimed leaders in the field. The early access version is available now. Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
_______________________________________________ RTnet-users mailing list RTnet-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rtnet-users