Re: [Xenomai] Xenomai, rtnet and ethercat

2013-05-25 Thread Leopold Palomo Avellaneda
A Dissabte, 25 de maig de 2013, Anders Blomdell va escriure:
> On 05/25/2013 12:57 PM, Franz Engel wrote:
> > Hi,
> > 
> > I have to connect my realtime xenomai system with an lasertracker. The
> > tracker is using ethercat. Has somebody experiences to do this? I would
> > like to use rtnet as realtime stack. Is it possible to use an ethercat
> > master with rtnet driver? Or is there a realtime ethercat master
> > available?
> > 
> > I found the following Ethercat projects (but I think they have no
> > ethercat capables): http://soem.berlios.de/
> > http://etherlab.org/en/ethercat/index.php
> 
> Read the licensing terms carefully, last time I looked, the EtherCAT
> license was not compatible with open licenses like GPL (see
> https://mail.gna.org/public/xenomai-help/2009-10/msg00074.html)
> 

I'm not a lawyer and I cannot make an opinion about that. I have read a lot 
about ethercat, and its license and I have to admit that it's a bit of mess. 

My recommendation is that if you don't want to make a commercial product, or 
sell your software, you can use any of the two  ethercat master: soem and 
etherlab. I don't think that Beckhoff makes you problems. If you want to do any 
commercial product, ask to Beckoff first.

About your question, etherlab provides a ethercat master under xenomai or 
rtai. You have a limited options of drivers with both, but realtime 
capabilities.

Etherlab provides also ethercat master with standard kernel drivers with 
PREMPT_RT, so you could have a softrealtime with any NIC supported by the 
kernel.

Soem provides also ethercat master, but it doesn't provides officially support 
under xenomai (or rtai). You must use any standard driver and could work under 
PREMPT_RT. 

The orocos developers have a version of soem that works with rtnet, but it has 
not been worked quit well for us, so by now, I cannot recommend it. However, I 
have to say that I have to review it because it has been changed a lot.

We have use soem with an standard ethernet driver and xenomai and we have been 
able to communicate with or servos at 1 ms.

Hope it helps.

Regards,

Leopold








-- 
--
Linux User 152692 PGP: 0xF944807E
Catalonia
-
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

___
Xenomai mailing list
Xenomai@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai


Re: [Xenomai] Beagleboard 3.8 regression results

2013-05-25 Thread John Morris
On 05/19/2013 07:00 PM, Gilles Chanteperdrix wrote:
> On 05/19/2013 11:00 PM, John Morris wrote:
> 
>> On 05/18/2013 04:39 PM, Michael Haberler wrote:
>>> using Stephan's 3.8 patch for the BeagleBoard and running
>>>
>>> arm:/usr/xenomai/bin# ./xeno-regression-test -l 
>>> "/usr/lib/xenomai/testsuite/dohell -m /tmp 100" -t 2
>>>
>>> gives 
>>>
>>> select service with posix message queues: success
>>> ++ start_load
>>> ++ echo start_load
>>> ++ check_alive /usr/xenomai/bin/switchtest
>>> ++ echo check_alive /usr/xenomai/bin/switchtest
>>> ++ check_alive /usr/xenomai/bin/switchtest -s 1000
>>> ++ echo check_alive /usr/xenomai/bin/switchtest -s 1000
>>> ++ check_alive /usr/xenomai/bin/latency -t 2
>>> ./xeno-regression-test failed: dead child 1988 not found!
>>
>> Be sure that the path to dohell is correct.  I think that's the correct
>> path for 2.6.0 and earlier, but in 2.6.2.1 it should be
>> /usr/lib/xenomai/dohell or similar.
> 
> 
> dohell is installed in the directory you pass to --with-testdir
> configure script option. If you do not pass this option, it gets
> installed in $bindir, that is $prefix/bin. I do not think this changed
> for 2.6.2.1.

Thank you.  The documentation at
http://wiki.linuxcnc.org/cgi-bin/wiki.pl?XenomaiKernel is updated.

Also, I was wrong about the location for the Debian package
configuration, which put dohell in /usr/lib/xenomai/testsuite/dohell.

John

___
Xenomai mailing list
Xenomai@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai


Re: [Xenomai] Xenomai, rtnet and ethercat

2013-05-25 Thread Anders Blomdell

On 05/25/2013 12:57 PM, Franz Engel wrote:

Hi,

I have to connect my realtime xenomai system with an lasertracker. The tracker 
is using ethercat. Has somebody experiences to do this? I would like to use 
rtnet as realtime stack. Is it possible to use an ethercat master with rtnet 
driver? Or is there a realtime ethercat master available?

I found the following Ethercat projects (but I think they have no ethercat 
capables):
http://soem.berlios.de/
http://etherlab.org/en/ethercat/index.php


Read the licensing terms carefully, last time I looked, the EtherCAT 
license was not compatible with open licenses like GPL (see 
https://mail.gna.org/public/xenomai-help/2009-10/msg00074.html)



Regards

Anders Blomdell


___
Xenomai mailing list
Xenomai@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai


Re: [Xenomai] RTDM for a GPIO line in RT mode

2013-05-25 Thread Gilles Chanteperdrix
On 05/25/2013 01:22 PM, Gilles Chanteperdrix wrote:

> On 05/25/2013 12:28 PM, CF wrote:
> 
>> Le 23/05/2013 09:14, Gilles Chanteperdrix a écrit :
>>> On 05/23/2013 12:10 AM, CF wrote:
>>>
 Hello,

 Despite my munerous reading, i'm locked in how to perform a basic RTDM
 for a simple ppc board.

 This is a simple pin level setting. The linux kernel module i developped
 follow theses steps:
 -reading DTS for IOCTL et GPIOCTL base adress registers
 - out_be32(addr, value) at theses register to set line as an output and
 then set the logical level with setbits32(addr, bit) or clrbits32(addr,bit)

 Basically, it works but in NRT  ops modes, so i'm unable (or at least i
 lack indication) to do this in RT ops mode (i don't think it is
 important, but i use ioctl to make my changes). I based my work on
 tut01/tut02 drivers, except i end up in using ioctl instead or
 read/write in the RTDM driver.

 I guess i still could read the DTS in nrt mode (because it is done at
 rtdm_dev_register() time and won't interfere with RT task), but how can
 i drive the hardware directly in RT op mode ?
>>>
>>> Hi,
>>>
>>> I am not sure I understand the problem you have. If the board you use
>>> uses gpiolib (I do not know if gpiolib is customary on ppc), you simply
>>> have to check that the gpiolib callbacks do not use any Linux services
>>> which can not be called from RT mode (if it uses a spinlock, the usual
>>> method is to turn the spinlock into an I-pipe spinlock, see:
>>> http://www.xenomai.org/index.php/I-pipe-core:ArmPorting#GPIOs_in_real-time_drivers)
>>>
>>> If you are accessing directly the GPIO controller registers, and need a
>>> "read-modify-write" operation, which what you posted seem to suggest,
>>> you probably want to put a spinlock around these operations, but apart
>>> from that, you can do this from an RT driver ioctl callback.
>>>
>>> Regards.
>>>
>>
>> Thank you Gilles, very much.
>>
>> Precisely, my main concern is how to know if i use linux services (in
>> others words, how can i say a function - in my case in_beX() or
>> out_beX() - is RT compatible ?). If you have some documentations about
>> this, thank you :)
> 
> 
> Anything which relies on a Linux critical section (spinlocks, mutex,
> local_irq_save) to ensure some software data coherency can not work when
> in xenomai domain, because the Xenomai domain can interrupt Linux at any
> point including in the middle of a critical section.
> 
> 

So, to answer your question, yes, you can use the in_beX out_beX since
they only perform read/write to mmio registers. The only thing you have
to pay attention to, is to make sure that Linux could not have been
interrupted while writing to the same register, for this you use an
ipipe_spinlock.

-- 
Gilles.

___
Xenomai mailing list
Xenomai@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai


[Xenomai] uml question

2013-05-25 Thread lux-integ
Greetings

I have some DAS  boards to develop linux-device drivers for. So I am planning 
a driver-development-system. In my search on the internet for hints and clues  
I came across links of RTAI with user-mode-linux but none with xenomai and 
user-mode-linux.

I am attracted to doing  the driver-developments using the analogy-API of 
xenomai. So I would like to know if  xenomai can  be run on a user-mode-linux 
setup .



thanks in advance

sincerely
luxInteg

___
Xenomai mailing list
Xenomai@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai


Re: [Xenomai] RTDM for a GPIO line in RT mode

2013-05-25 Thread Gilles Chanteperdrix
On 05/25/2013 12:28 PM, CF wrote:

> Le 23/05/2013 09:14, Gilles Chanteperdrix a écrit :
>> On 05/23/2013 12:10 AM, CF wrote:
>>
>>> Hello,
>>>
>>> Despite my munerous reading, i'm locked in how to perform a basic RTDM
>>> for a simple ppc board.
>>>
>>> This is a simple pin level setting. The linux kernel module i developped
>>> follow theses steps:
>>> -reading DTS for IOCTL et GPIOCTL base adress registers
>>> - out_be32(addr, value) at theses register to set line as an output and
>>> then set the logical level with setbits32(addr, bit) or clrbits32(addr,bit)
>>>
>>> Basically, it works but in NRT  ops modes, so i'm unable (or at least i
>>> lack indication) to do this in RT ops mode (i don't think it is
>>> important, but i use ioctl to make my changes). I based my work on
>>> tut01/tut02 drivers, except i end up in using ioctl instead or
>>> read/write in the RTDM driver.
>>>
>>> I guess i still could read the DTS in nrt mode (because it is done at
>>> rtdm_dev_register() time and won't interfere with RT task), but how can
>>> i drive the hardware directly in RT op mode ?
>>
>> Hi,
>>
>> I am not sure I understand the problem you have. If the board you use
>> uses gpiolib (I do not know if gpiolib is customary on ppc), you simply
>> have to check that the gpiolib callbacks do not use any Linux services
>> which can not be called from RT mode (if it uses a spinlock, the usual
>> method is to turn the spinlock into an I-pipe spinlock, see:
>> http://www.xenomai.org/index.php/I-pipe-core:ArmPorting#GPIOs_in_real-time_drivers)
>>
>> If you are accessing directly the GPIO controller registers, and need a
>> "read-modify-write" operation, which what you posted seem to suggest,
>> you probably want to put a spinlock around these operations, but apart
>> from that, you can do this from an RT driver ioctl callback.
>>
>> Regards.
>>
> 
> Thank you Gilles, very much.
> 
> Precisely, my main concern is how to know if i use linux services (in
> others words, how can i say a function - in my case in_beX() or
> out_beX() - is RT compatible ?). If you have some documentations about
> this, thank you :)


Anything which relies on a Linux critical section (spinlocks, mutex,
local_irq_save) to ensure some software data coherency can not work when
in xenomai domain, because the Xenomai domain can interrupt Linux at any
point including in the middle of a critical section.


-- 
Gilles.

___
Xenomai mailing list
Xenomai@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai


[Xenomai] Xenomai, rtnet and ethercat

2013-05-25 Thread Franz Engel
Hi,

I have to connect my realtime xenomai system with an lasertracker. The tracker 
is using ethercat. Has somebody experiences to do this? I would like to use 
rtnet as realtime stack. Is it possible to use an ethercat master with rtnet 
driver? Or is there a realtime ethercat master available?

I found the following Ethercat projects (but I think they have no ethercat 
capables):
http://soem.berlios.de/
http://etherlab.org/en/ethercat/index.php

Thanks and regards,
 Franz
___
Xenomai mailing list
Xenomai@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai


Re: [Xenomai] RTDM for a GPIO line in RT mode

2013-05-25 Thread CF
Le 23/05/2013 09:14, Gilles Chanteperdrix a écrit :
> On 05/23/2013 12:10 AM, CF wrote:
>
>> Hello,
>>
>> Despite my munerous reading, i'm locked in how to perform a basic RTDM
>> for a simple ppc board.
>>
>> This is a simple pin level setting. The linux kernel module i developped
>> follow theses steps:
>> -reading DTS for IOCTL et GPIOCTL base adress registers
>> - out_be32(addr, value) at theses register to set line as an output and
>> then set the logical level with setbits32(addr, bit) or clrbits32(addr,bit)
>>
>> Basically, it works but in NRT  ops modes, so i'm unable (or at least i
>> lack indication) to do this in RT ops mode (i don't think it is
>> important, but i use ioctl to make my changes). I based my work on
>> tut01/tut02 drivers, except i end up in using ioctl instead or
>> read/write in the RTDM driver.
>>
>> I guess i still could read the DTS in nrt mode (because it is done at
>> rtdm_dev_register() time and won't interfere with RT task), but how can
>> i drive the hardware directly in RT op mode ?
>
> Hi,
>
> I am not sure I understand the problem you have. If the board you use
> uses gpiolib (I do not know if gpiolib is customary on ppc), you simply
> have to check that the gpiolib callbacks do not use any Linux services
> which can not be called from RT mode (if it uses a spinlock, the usual
> method is to turn the spinlock into an I-pipe spinlock, see:
> http://www.xenomai.org/index.php/I-pipe-core:ArmPorting#GPIOs_in_real-time_drivers)
>
> If you are accessing directly the GPIO controller registers, and need a
> "read-modify-write" operation, which what you posted seem to suggest,
> you probably want to put a spinlock around these operations, but apart
> from that, you can do this from an RT driver ioctl callback.
>
> Regards.
>

Thank you Gilles, very much.

Precisely, my main concern is how to know if i use linux services (in
others words, how can i say a function - in my case in_beX() or
out_beX() - is RT compatible ?). If you have some documentations about
this, thank you :)

CF

___
Xenomai mailing list
Xenomai@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai