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
# tar xvfj ethercat-1.5.1.tar.bz2|
# tar xvfj ethercat-1.5.2.tar.bz2|
# 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|
# cd ethercat-1.5.1|
# cd ethercat-1.5.2|
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.
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].
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.
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.
The build process was testet unter the official LinuxCNC distibution based on Ubuntu 10.04 "Lucid Lynx".
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
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.
# cd <src-of-LinuxCNC>/debian # ./configure -a # cd ../src # ./autogen.sh # ./configure # make # sudo make setuid
... to be continued