Ray Henry | 4 Dec 00:45
Favicon

Ethernet, rtai, and rtnet


http://www.ce.utwente.nl/rtweb/publications/MSc2004/pdf-files/011CE2004_Buit.pdf

An interesting study of RTnet.  In it they say; 

        "RTnet communication times are mostly determined by the
        hardware. Not only processor speed but also architecture and
        type of network interface card (NIC) are of great importance.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Rafael Skodlar | 6 Dec 00:11

Re: Ethernet, rtai, and rtnet

Ray Henry wrote:
> http://www.ce.utwente.nl/rtweb/publications/MSc2004/pdf-files/011CE2004_Buit.pdf
> 
> An interesting study of RTnet.  In it they say; 
> 
>         "RTnet communication times are mostly determined by the
>         hardware. Not only processor speed but also architecture and
>         type of network interface card (NIC) are of great importance.
>         
> 
That's a bit disturbing isn't it?

I'm following this and other related threads closely. Having experience
with computers including PCs since XT times I was disappointed on more
than one occasion seeing interfaces being (ab)used for other than their
intended use. Parallel port was definitely in that category because of
it's price but that's history now.

If I were asked to select the most common port, bus, or interface in PC
for use in RT environment I would say either floppy or ATA bus. They are
present on most motherboards. However, they are now practically obsolete
and bad candidates for future EMC direction IMO. What's left for RT
interface on the common motherboard are PCI and SATA buses. SATA seem to
be the most suitable for RT use because it's on all motherboards and it
already handles mechanical devices directly with rich command protocol.

Let's compare SATA and Ethernet and the complexity of using either one
for "direct CNC."

Case 1, Ethernet-CNC:
(Continue reading)

John Kasunich | 6 Dec 02:02
Favicon

Re: Ethernet, rtai, and rtnet

Rafael Skodlar wrote:
> 
> If I were asked to select the most common port, bus, or interface in PC
> for use in RT environment I would say either floppy or ATA bus. They are
> present on most motherboards. However, they are now practically obsolete
> and bad candidates for future EMC direction IMO. What's left for RT
> interface on the common motherboard are PCI and SATA buses. SATA seem to
> be the most suitable for RT use because it's on all motherboards and it
> already handles mechanical devices directly with rich command protocol.
> 
> Let's compare SATA and Ethernet and the complexity of using either one
> for "direct CNC."
> 
> Case 1, Ethernet-CNC:
> To implement Ethernet-CNC we have to have a working motherboard/Linux
> drivers combo, Ethernet/CNC adapter, and special Ethernet driver. That's
> one port, two different drivers, one of which will always depend on
> Ethernet chip architecture which changes a lot, and Ethernet to CNC
> adapter (DIO, etc.) in order to communicate with CNC machine. Two sets
> of chip/drivers needed.

You need an Ethernet adapter, and a realtime driver for it.  Not two
drivers, ONE driver.  The Ethernet adapter for CNC control has nothing
to do with a "normal" network connection, and does NOT need or want a
Linux driver.

At the other end of the wire, you need an FPGA or embedded controller
with an Ethernet interface.  Such things are much easier to find than
the same thing with an SATA interface.

(Continue reading)

Rafael Skodlar | 6 Dec 07:07

Re: Ethernet, rtai, and rtnet

John Kasunich wrote:
> Rafael Skodlar wrote:
>> If I were asked to select the most common port, bus, or interface in PC
>> for use in RT environment I would say either floppy or ATA bus. They are
>> present on most motherboards. However, they are now practically obsolete
>> and bad candidates for future EMC direction IMO. What's left for RT
>> interface on the common motherboard are PCI and SATA buses. SATA seem to
>> be the most suitable for RT use because it's on all motherboards and it
>> already handles mechanical devices directly with rich command protocol.
>>
>> Let's compare SATA and Ethernet and the complexity of using either one
>> for "direct CNC."
>>
>> Case 1, Ethernet-CNC:
>> To implement Ethernet-CNC we have to have a working motherboard/Linux
>> drivers combo, Ethernet/CNC adapter, and special Ethernet driver. That's
>> one port, two different drivers, one of which will always depend on
>> Ethernet chip architecture which changes a lot, and Ethernet to CNC
>> adapter (DIO, etc.) in order to communicate with CNC machine. Two sets
>> of chip/drivers needed.
> 
> You need an Ethernet adapter, and a realtime driver for it.  Not two
> drivers, ONE driver.  The Ethernet adapter for CNC control has nothing

I know that it's not normal network connection and that it requires
special driver. You always need special driver for RT.

> to do with a "normal" network connection, and does NOT need or want a
> Linux driver.

(Continue reading)

Alex Joni | 6 Dec 10:07

Re: Ethernet, rtai, and rtnet


> There is no such thing as "Linux driver." Call it GNU/Linux RT driver
> for Ethernet interface or whatever. That too needs to be isolated from
> the regular Ethernet driver as you would need to isolate SATA-CNC driver
> from the default SATA driver.

Before making such statements, please read up on the way things are done in 
emc2 (and any other RTAI application that uses hardware access).
Once a patched kernel exists there are basicly 2 different domains running 
on the same PC (the RTAI RT domain, and the linux domain).
All linux drivers are available only to the linux domain.
The emc2 code runs inside the RTAI domain, and has _no_ access to any linux 
drivers.
That said, any hardware you want to support from emc2 needs special drivers 
that use only RTAI system calls. Such a driver exists for some ethernet 
cards (check RTNet), for serial ports (rtserial), for parport (a few 
actually, emc2 has one), for special hardware (check COMEDI and emc2 
drivers).
The fact that there is a RTAI driver for a piece of hardware doesn't mean 
that we can use it directly in emc2, but it means such a driver can be 
written to run in RT context (that means we can probably use it from emc2).
The issues I see with SATA:
* there is usually only one controller on the motherboard. that means you 
would need to access it from 2 different domains (to separate one port for 
RT). That will surely lead to problems, as the RTAI domain has higher 
priority and can preempt the linux domain at any time. The SATA/whatever 
controllers have some setup procedures before you can actually send/receive 
data from a certain port, so 2 domains will probably lead to problems. This 
can be fixed by using a separate SATA controller board, but that is way more 
expensive than an addon ethernet card. (remember the thread started because 
(Continue reading)

Marc Bodmer | 6 Dec 11:58

Re: Ethernet, rtai, and rtnet


> So does SAS and now SATA. The distances are not the same by default but
> could be extended when needed. You and Marc Bodmer both talk about
> expensive Ethernet industrial controllers. Who's going to buy "3/6 Axis
> DC Servo controller (~900Eur)" for hobby or small shop use?
> 
> It would be way less expensive to buy DIO, ADC, or DAC PCI card with
> small PC box next to the CNC machine when PP is not available anymore.
> 
> I thought that EMC is mainly for small installations with an occasional
> large one. When you start talking about PLCs, SERCOS PCI-Board, etc.
> that's another ball game. Nothing against it, just that a lot of people
> will be left out.
> 

I did not mean everybody should just go and buy those not so inexpensive
900Euro Axis controllers. Just wanted to show that there acutally
exist some devices. And compared to the really expensive industrial
devices this is actually not so much. I agree it's too much for hobby
use, I would only buy it if there is no alternative. But neverthless
it's an interesting device.

More interesting than this 900Euro thing are the bus connection chips
and controllers i have in my list. And they are actually not so
expensive. This would allow to do some interesting and inexpensive
stuff.

I am not starting to talk about PLC. EMC does a good job in taking over
this part. Even in industry plcs are disappearing more and more. Their
job is taken over by SoftPLCs on the CNC PC - same as with EMC long ago.
(Continue reading)

Jon Elson | 6 Dec 19:52

Re: Ethernet, rtai, and rtnet

Rafael Skodlar wrote:
> You seem to like low cost stuff as quoted later but I doubt that you'll
> find that together with Ethernet/CNC controllers.
>
>   
NXP, Atmel and a bunch of other outfits have $12 - 15 chips that have an 
ARM7 CPU and a 10/100 Ethernet port on one chip, with additional I/O.
I make a line of parallel port-controlled motion interfaces.  The driver 
currently (with a big thanks to John Kasunich!) almost builds a packet 
and interrogates the board, and then sends back a packet of commands.  
The architecture is half way there to doing this like you would over 
networking hardware.  I think I could make a $50 "converter" that goes 
between the ethernet and the existing parallel port to control one or 
more of my boards.
Later I could get rid of the parallel interface and go with just the 
Ethernet.
>
>
> How do they coexist with parallel port or Mesa card for example?
>   
The various devices are SEPARATE hardware, and therefore can be isolated.
If all the SATA ports on a motherboard are on ONE chip, it may be 
impossible to isolate them.
SATA is not intended for network-like communications, and is meant for 
very short runs.  Ethernet has the VERY important feature of full 
electrical isolation, which should be quite helpful in making reliable 
systems.

Jon

(Continue reading)

Marc Bodmer | 6 Dec 02:02

Re: Ethernet, rtai, and rtnet

In industry ethernet based realtime protocols are used more and more
with good success on pretty inexpensive and reliable hardware.
Especially I have SERCOS and EtherCAT in mind.

Both of these buses have fast cycles from 30us up, both have software
masters on a standard ethernet controller and both need special
slave devices.

Interesting for us hobbyists:

SLAVES
 - SERCOS offers a free IP Core for 64bit I/O
   http://www.sercos.de/Easy-I-O.299.0.html
 - EtherCAT slaves can be implemented with
   Xilinx & Altera IP Cores (Altera MegaCore)
http://www.altera.com/products/ip/getting-started/ipm-evaluate-download.html
 - Hilscher NetX Arm controller can be used for
   Sercos and Ethercat (NetSTIK 59Eur, NetX50 30Eur 1pc / 15Eur 100pcs)
http://de.hilscher.com/products_details_hardware.html?p_id=P_47614930462d6&bs=15
 - Fieldbus Modules:
http://www.anybus.com/products/abs.shtml
http://www.ixxat.com/ethercat_module_en.html
 - 3/6 Axis DC Servo controller (~900Eur)
http://www.zub.ch/pdf/DS_MACS4_DSP.pdf
http://www.zub.ch/pdf/DS_MACS4-DC-6.pdf

MASTERS
 - http://www.etherlab.org/en/ethercat/index.php
 - http://developer.berlios.de/projects/ethercatmaster/
 -
(Continue reading)


Gmane