[Home]EtherCatDriver

LinuxCNCKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org

Search:

Difference (from prior major revision) (no other diffs)

Changed: 102,103c102,103
1. Download the EtherCAT?-Master source (V1.5.1) from [IgH]:
# wget http://www.etherlab.org/download/ethercat/ethercat-1.5.1.tar.bz2
1. Download the EtherCAT?-Master source (V1.5.2) from [IgH]:
# wget http://www.etherlab.org/download/ethercat/ethercat-1.5.2.tar.bz2

Changed: 106c106
# tar xvfj ethercat-1.5.1.tar.bz2
# tar xvfj ethercat-1.5.2.tar.bz2

Changed: 109c109
# cp -av <source-path-of-LinuxCNC>/src/hal/drivers/ethercat/master/debian ethercat-1.5.1
# cp -av <source-path-of-LinuxCNC>/src/hal/drivers/ethercat/master/debian ethercat-1.5.2

Changed: 112c112
# cd ethercat-1.5.1
# cd ethercat-1.5.2

Changed: 121,122c121,122
Just do a 'sudo dpkg -i ethercat_1.5.1-1_i386.deb' to install the diver and a
'sudo dpkg -i ethercat-dev_1.5.1-1_i386.deb' to install the development files.
Just do a 'sudo dpkg -i ethercat_1.5.2-1_i386.deb' to install the diver and a
'sudo dpkg -i ethercat-dev_1.5.2-1_i386.deb' to install the development files.

EtherCAT? realtime HAL driver

Overview

This driver tries to provide an easy-to-expand framework for the connection of LinuxCNC to EtherCAT? devices. Some of the often used Beckhoff devices like digital and analog I/O, encoder input and pulse train output are already supported just as the [Stöber] MDS5000 series of servo drives. The driver is based on [IgH's EtherCAT master] and builds a glue layer like the etherlab component. It consists of an userspace component for configuration and a RT HAL module for the data processing.

The config module reads in and parses a xml config file and provides a prepared form of configuration data via shared memory to the RT part. The RT module is organised in a global part that is common to all submodules and a .c and .h file for each supported (class off) hardware device.

Since this driver is sill under development you can find the code [here]. Feel free to test or review the code and send me suggestions and hints. There is a discussion thread about this driver in the [forum].

Currently supported devices

Devices with an asterisk (*) are tested, all other devices are supported due to an equal process image. If you have hardware that is supported and not tested and you like to test it or you have hardware that is not supported yet und you like to support development for this device, just drop me a line.

Installation

You can get a patch of the current code [here]. This patch is for the master branch of LinuxCNC, so you could get some easy to fix conflicts if you apply it to a stable release.

EtherCAT? master

The directory src/hal/drivers/ethercat/master contain files that are needed to build a debian package of the EtherCAT? master. In contrast to IgH?'s method to start the master via an init script (and unloading existing standard ethernet drivers before statup), the config file (/etc/default/ethercat) is used by a script named update-ethercat-config that should be called after config changes. The script updates /etc/modules and /etc/modprobe.d/ethercat.conf to reflect the configuration so that unneeded/unwanted standard drivers get blacklisted and the EtherCAT? drivers and master are automatically loaded at system startup with the right parameters.

Build process

The build process was testet unter the official LinuxCNC distibution based on Ubuntu 10.04 "Lucid Lynx".

1. Download the EtherCAT?-Master source (V1.5.2) from [IgH]:

 # wget http://www.etherlab.org/download/ethercat/ethercat-1.5.2.tar.bz2

2. Untar the archive

 # tar xvfj ethercat-1.5.2.tar.bz2

3. copy the debian directory to your build directory.

 # cp -av <source-path-of-LinuxCNC>/src/hal/drivers/ethercat/master/debian ethercat-1.5.2

4. build the packages (very similar to the LinuxCNC build process)

 # cd ethercat-1.5.2
 # cd debian
 # ./configure -a
 # cd ..
 # dpkg-checkbuilddeps (and install missing deps)
 # dpkg-buildpackage

Installation

Just do a 'sudo dpkg -i ethercat_1.5.2-1_i386.deb' to install the diver and a 'sudo dpkg -i ethercat-dev_1.5.2-1_i386.deb' to install the development files. These are needed to compile the EtherCAT? HAL driver.

EtherCAT? HAL driver

Compile LinuxCNC the usual way (after patching) will include the EtherCAT? driver:

 # cd <src-of-LinuxCNC>/debian
 # ./configure -a
 # cd ../src
 # ./autogen.sh
 # ./configure
 # make
 # sudo make setuid

Configuration

... to be continued

Usage


LinuxCNCKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org
This page is read-only. Follow the BasicSteps to edit pages. | View other revisions
Last edited March 31, 2013 3:41 am by Sascha (diff)Published under a Creative Commons License