[prev in list] [next in list] [prev in thread] [next in thread] 

List:       orocos-users
Subject:    [Orocos-users] Motion control design pattern with Orocos
From:       peter.soetens () fmtc ! be (Peter Soetens)
Date:       2009-02-16 8:25:27
Message-ID: 200902160925.27977.peter.soetens () fmtc ! be
[Download RAW message or body]

On Wednesday 11 February 2009 17:55:19 Philippe Hamelin wrote:
> Hello,
>
> I'm currently working on the implementation of Orocos in a motion
> control system, whose motors are current-controlled. Thus, the
> calculation of the real-time control laws will be made in Orocos. As I
> know, the typical execution sequence is :
>
> 1. Read I/O
> 2. Calculate control law
> 3. Write I/O
> 4. Wait until next step
>
> We would like to implement our device drivers with the Orocos Device
> Interface to benefit from the IO Component. I see three solutions :
>
> SOLUTION #1
>
> The device interfaces are added to the IOComponent and then become
> available as ports. The Controller component is connected to the IO
> Component with these ports. However, the updateHook function of the
> IOComponent does both read and write. So, the execution sequence would
> be :

What you clearly missed is the fact that you can have any number of 
IOComponents. So just instantiate two, add 'read' drivers to one, and write 
drivers to the other and you're set.

Speaking of patterns, we use (many) 'Adaptor' components in our applications 
to get the data out or in. They are similar to IOComponents, but calling them 
adaptor makes it for everyone clear what the component is supposed to do : 
plug the data ports to real IO. 
Reconfiguring the hardware (for example move from comedi to CAN) is then done 
by only setting up a new adaptor.

Peter
-- 
Peter Soetens -- FMTC -- <http://www.fmtc.be>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic