[etherlab-users] Accessing the EtherCAT master from 2 tasks

Jürgen Kunz kunz at sim.tu-darmstadt.de
Thu Nov 14 14:36:47 CET 2013


Hello Aiser,

you can do this in one process with different threads. One of your
thread, maybe your main thread, calls ecrt_request_master(). You
register each EtherCAT board in a separate domain. Then you are able to
access the different boards individually through the different domains.
The only thing you have to consider is that every time you call the
master with one thread, you need to lock it with a global mutex, so that
it cannot be accessed the same time by different threads.

Best regards,
Jürgen

Am 14.11.2013 13:37, schrieb Asier Tamayo:
>
> Hello all,
>
>  
>
> I'm a new user to the EtherCAT Master, so I beg your pardon if this
> question has already been answered or it is a RT*M type question. I'm
> using the master with Xenomai.
>
>  
>
> I want to access EtherCAT from two different tasks, each one accessing
> to different EtherCAT boards. Is there any way I can do it? The
> ecrt_request_master() function reserves the EtherCAT master for
> exclusive use, and therefore I can't call it again from the second
> task. Do I have to create a Xenomai RTDM driver that would reserve the
> master for itself and then let the tasks execute ioctl's to that
> driver? Is it possible?
>
>  
>
> Best regards,
>
>  
>
> Asier
>
>  
>
>
>
> _______________________________________________
> etherlab-users mailing list
> etherlab-users at etherlab.org
> http://lists.etherlab.org/mailman/listinfo/etherlab-users

-- 
Dipl.-Inform. Jürgen Kunz

Technische Universität Darmstadt <http://www.tu-darmstadt.de>
FG Simulation, Systemoptimierung und Robotik
<http://www.sim.tu-darmstadt.de>
Hochschulstr. 10
64289 Darmstadt

Tel.: ++49 (0) 6151-16-70383
Fax: ++49 (0) 6151-16-6648
E-Mail: kunz(at)sim.tu-darmstadt.de
Homepage: http://www.sim.tu-darmstadt.de
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20131114/1a6113c7/attachment-0003.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kunz.vcf
Type: text/x-vcard
Size: 464 bytes
Desc: not available
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20131114/1a6113c7/attachment-0004.vcf>


More information about the Etherlab-users mailing list