Re: [Emc-developers] Help me understand Ethernet motion control

2014-07-28 Thread Marius Liebenberg
Thanks a lot guys. A lot of information as usual. I am very proud to be 
part of this community of very clever and helpful people.
I will no doubt have lot to ask at a later stage about this topic. I 
have a lot of code to go scan and reading up to do.
Any suggestions as to where to start. What is the simplest driver to 
look at for now?

On 2014-07-28 14:11, Marius Liebenberg wrote:
> I am wondering about how Ethernet motion control works together with
> linuxcnc. How is the synchronized motion achieved over the link? Or what
> kind of information is passed over the link to the controller?
>

-- 

Regards /Groete

Marius D. Liebenberg
+27 82 698 3251
+27 12 743 6064
QQ 1767394877


--
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers


[Emc-developers] LinuxCNC 2.6.0 is out!

2014-07-28 Thread Sebastian Kuzminsky
Howdy folks, at long last LinuxCNC 2.6.0 is here.

Here is a summary of changes since 2.5, although if you've been
following the 2.6 pre-release announcements you already have more detail
than what's here:

http://wiki.linuxcnc.org/cgi-bin/wiki.pl?Released_2.6.X


If you want to upgrade from an existing LinuxCNC 2.5 installation,
carefully follow the instructions here:

http://wiki.linuxcnc.org/cgi-bin/wiki.pl?UpdatingTo2.6


If you want to make a fresh install of LinuxCNC 2.6, the easiest way is
to use the Debian Wheezy installer, instructions here:

http://article.gmane.org/gmane.linux.distributions.emc.user/52401


Thanks to the many, many people who have contributed to this effort by
writing code, testing, reporting bugs, and helping each other on the
mailing lists, forums, and IRC.

Here's to many more years of progress together.


-- 
Sebastian Kuzminsky

--
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers


Re: [Emc-developers] Help me understand Ethernet motion control

2014-07-28 Thread Charles Steinkuehler
On 7/28/2014 6:20 PM, Jeff Epler wrote:
> A dedicated, point-to-point ethernet connection is used, so there are no
> ethernet switches or other devices connected that can interfere to add
> latency or the potential to packets lost due to collision.  On the
> remote side, a dedicated part of the FPGA chip handles packets in real
> time as well.  On the Linux side, the PREEMPT-RT kernel has apprently
> removed most latency even from the regular kernel ethernet drivers.
> (so no need for special "rtnet" drivers)

It's also possible to communicate via raw packets using the low-latency
hooks provided in most Linux Ethernet drivers (as used for things like
libpcap, the high-speed stock trading folks, and the HPC world).  This
avoids most of the IP stack latency overhead you get with the standard
Linux kernel but still allows use of stock Linux Ethernet drivers, so
you get broad hardware support and other folks will maintain the driver
code for you.  :)

-- 
Charles Steinkuehler
char...@steinkuehler.net



signature.asc
Description: OpenPGP digital signature
--
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers


Re: [Emc-developers] Help me understand Ethernet motion control

2014-07-28 Thread Jeff Epler
Mesa's 7i80 cards have a HostMot2 firmware that communicates via an
ethernet interface using standard UDP packets.  The LinuxCNC HAL driver,
hm2_eth, simply uses these UDP packets as a communications bus, just
like it uses the PCI bus for a PCI Mesa card.

So for instance, to write all 72 GPIOs on the 7i80hd, you send a packet
with the contents (expressed in hex)
83C2  (write 3 words in sequential addresses in memory space 0)
0010  (starting at address 0100, the GPIO module)
 (4 bytes for first header's GPIO outputs)
 (4 bytes for second header's GPIO outputs)
 (4 bytes for third header's GPIO outputs)
(If you were also setting stepgen frequencies or PWM values, they would
be additional commands within the same packet).  This is the same thing
that happens with a PCI Mesa card:
memory_mapped_io[0x100/4] = 0x;
memory_mapped_io[0x104/4] = 0x;
memory_mapped_io[0x108/4] = 0x;
or with an EPP Mesa card:
ADDR 0010
DATA 
DATA 
DATA 
just transporting the data in a different way.

I don't understand the technical details of ethernet, but based on some
wikipedia browsing it looks like a full ethernet packet with the 16 byte
UDP payload would weigh 672 bits and take under 10microseconds to
transmit, so there's enough bandwidth and the packet size alone doesn't
pose any problems for latency.

A dedicated, point-to-point ethernet connection is used, so there are no
ethernet switches or other devices connected that can interfere to add
latency or the potential to packets lost due to collision.  On the
remote side, a dedicated part of the FPGA chip handles packets in real
time as well.  On the Linux side, the PREEMPT-RT kernel has apprently
removed most latency even from the regular kernel ethernet drivers.
(so no need for special "rtnet" drivers)

Using a 2kHz servo period (.5ms interval), Peter Wallace of Mesa has run
one of these boards with an earlier iteration of the driver for over 30
billion packets (real-world months) without interruption, and for me the
driver has worked properly for as long as I cared to let it run --
though that's only been for minutes at a time, nothing like Peter's
extended test.

I suspect that we'll discover that certain NICs are better than others
at giving realtime performance, just like with the PCs themselves.  For
instance, Sam has seen on one system that the onboard RTL-chipset NIC
worked reliably, and a PCI NIC with Intel chipset did not.  I've seen
good performance with the only NIC I tried, a PCI-E NIC with an Intel
chipset.

Jeff

--
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers


Re: [Emc-developers] Help me understand Ethernet motion control

2014-07-28 Thread sam sokolik
I will take a stab...

The short answer is linuxcnc Ethernet motion is no different than any of 
the other interface card solution..

The longer (as I understand it) answer is...

Remember that linuxcnc doesn't use motion devices like smoothstepper or 
galil.  (these are buffering devices that move motion off of the 
computer.)  These have advantages that the computer that is sending the 
data doesn't have to be realtime (or the link between the computer and 
the device doesn't need to be realtime).  From my perspective - they 
have too many disadvantages.  (but I am biased..)

In linuxcnc - most interfaces are 'just' hardware step generators and or 
pwm generators and or i/o and or encoder counters and or other things I 
can't think of at the moment.  (ie mesa, pico, vital...) This moves the 
heavy lifting off of the computer.  So on a normal system running one of 
these interfaces the computer accesses the card every servo period. 
(maybe 1 to 10khz).   This reads encoder positions,  updates stepgens, 
pwm, i/o and so on.  The link between the interface card and the 
computer is realtime be it pci, parallel port, ethernet  So 
initially the realtime Ethernet interface was rt-net on xenomai.  This 
worked but was a pain that a) you needed rtnet and b) There was only a 
few network interfaces supported...  Now the Ethernet interface uses 
rt-preempt which is a lot less work to setup - expecially now that jeff 
has added support to master.  (on wheezy you can use the rt_preempt 
kernel from synaptic)

Overall - pretty exciting stuff!

sam





On 7/28/2014 7:11 AM, Marius Liebenberg wrote:
> I am wondering about how Ethernet motion control works together with
> linuxcnc. How is the synchronized motion achieved over the link? Or what
> kind of information is passed over the link to the controller?
>


--
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers


[Emc-developers] Help me understand Ethernet motion control

2014-07-28 Thread Marius Liebenberg
I am wondering about how Ethernet motion control works together with 
linuxcnc. How is the synchronized motion achieved over the link? Or what 
kind of information is passed over the link to the controller?

-- 

Regards /Groete

Marius D. Liebenberg
+27 82 698 3251
+27 12 743 6064
QQ 1767394877


--
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers