[etherlab-users] Controlled by userspace application

Florian Pose florian at keenkiwi.de
Mon Feb 4 10:06:22 CET 2008

Hi Frank,

On Sun, Feb 03, 2008 at 10:16:41PM +0100, Frank Werner wrote:
> Hi all,
> I need to control some Beckhoff EL1004/EL2004 (Digital I/O) modules from a 
> Linux userspace application. Realtime is not a request for this projekt.
> So I wrote a kernel module (ec_control), which talkes via a character device 
> to the userspace application.
> I use etherlab 1.3.2 and a Kernel.
> I need some assistance to talk from my ec_control module to the ec_master 
> module. I read the doc generated by doxygen (shipped with etherlab 1.3.2). I 
> miss some infos about how to set the outputs or how to read the inputs. How 
> can I obtain infos about the slaves (inside my kernel module, I know about 
> lsec from etherlab)

You'll have to register the slaves' PDOs inside a domain using
ecrt_master_create_domain() and ecrt_domain_register_pdo() or -like in
the minimal example (l. 191ff)- ecrt_domain_register_pdo_list(). Then
you can access the PDOs with the supplied process data pointers (l.
64ff) and the EC_(READ|WRITE)_* macros (l. 94).

If this doesn't help you, consider posting an excerpt of your code, so
we can have a look at it.

Best regards,
Florian Pose


More information about the Etherlab-users mailing list