Hi @Nico2017,
YES - I will create a quick guide until end of thia week. Do you already have an working Hal-config for ethercat (are you migrating from previous version)?
It took me weeks and several retries to get all steps together. Did you already have a look here?
forum.linuxcnc.org/27-driver-boards/3559...uxcnc-how-to-install
This was helpful but copying files around is not my style..
So, stay tuned
[hr]
This is my how-to guide on LinuxCNC 2.8 @ Debian 9 Stretch 64 Bit:
!! Before we start, please be adviced that I don't explain every single step in detail.
!! I assume that you are experienced linux user and you know what you are doing.
!! I don't want to discuss why I am installing this or that, and/or doing what I am doing.
!! If you think you can make this better, then simply do it and don't blame on me.
!!
!! Regarding network:
!! - Build-in wifi is used to connect to my network
!! - Lan-Port will be used as ethercat master
!! Ethercat components:
!! - 2x EK1100 (Laptop -> 1. inside cabinet -> 2. mounted on back of Z-axis gantry)
!! - 4x EL4071 (X-Y-Z-A) [A is needed for extruder in 3D-printer mode or rotary axis in mill-mode]
!! - 1x EL3202 (used to get temperature from extruder hotend)
!! - 2x EL1008
!! - 2x EL2008
!! - 1x EL6021 to control 2.2KW spindle (still under development)
!! Objective:
!! - We are using a HP8440P Laptop.
!! - Rather than using LinuxCNC as run in place setup, we are building ".deb"-files and apply them to the operating system.
!!
!! I would like to thank the guys from #linuxcnc-devel@irc.freenode.net - you guys are awesome
!! My special thanks are going to :woohoo:
!! - "rmu"
!! - "pcw_home"
!!
01. Get install media from link below and install it on your machine.
www.linuxcnc.org/testing-stretch-rtpreem...uspace-amd64-r13.iso
02. Perform basic setup of Operating System
- wifi config
- enable root account
- change to user root
- configure repository list (see
wiki.debian.org/SourcesList
)
Code:
nano /etc/apt/sources.list
- update operating system:
Code:
apt-get update && apt-get upgrade -y && apt autoremove
- create "/install" directory (we will store some of install resources)
Code:
mkdir /install
cd /install
- install some tools
Code:
apt-get install geany \
ufw \
clamav \
clamtk \
git \
curl \
mercurial \
htop \
mplayer \
net-tools
- create "/git" dir and initialize it
Code:
mkdir /git
cd /git
git init
- activate firewall
Code:
systemctl start ufw
systemctl enable ufw
ufw enable
- determine mac address of lan port
- configure lan
"nano /etc/network/interfaces"
Code:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
allow-hotplug eth0
iface eth0 inet static
address 10.0.0.1
netmask 255.255.255.0
"nano /etc/network/interfaces"
Code:
auto lo
iface lo inet loopback
allow-hotplug eth0
iface eth0 inet static
address 10.0.0.1
netmask 255.255.255.0
- avoid wait time due to startup of network services
"nano /lib/systemd/system/networking.service" (change here "TimeoutStartSec=5min" to "TimeoutStartSec=1sec")
- install some reseources required for build process later on
Code:
apt-get install docbook-xsl \
dvipng \
graphviz \
groff \
inkscape \
python-lxml \
source-highlight \
texlive-extra-utils \
texlive-font-utils \
texlive-fonts-recommended \
texlive-latex-recommended \
w3c-linkchecker \
xsltproc \
asciidoc-dblatex \
python-dev \
libxmu-dev \
libglu1-mesa-dev \
libgl1-mesa-dev
apt-get install libgtk2.0-dev \
gettext \
intltool \
autoconf \
libboost-python-dev \
netcat \
libmodbus-dev \
libusb-1.0-0-dev \
yapps2 \
tcl8.6-dev \
tk8.6-dev \
libreadline-gplv2-dev \
asciidoc \
devscripts \
build-essential \
lintian \
texlive-lang-cyrillic \
texlive-lang-french \
texlive-lang-german \
texlive-lang-polish \
texlive-lang-spanish \
devscripts \
build-essential \
quilt
03. Remove pre-installed linuxcnc
Code:
apt-get purge linuxcnc-doc-en linuxcnc-uspace-dev linuxcnc-uspace
04. Setup LinuxCNC 2.8
Code:
cd /git
git clone git://github.com/linuxcnc/linuxcnc.git linuxcnc-dev
cd linuxcnc-dev/debian
./configure uspace
cd ..
dpkg-buildpackage -b -uc
cd /git
apt install ./linuxcnc-doc-en_2.8.0~pre1_all.deb
apt install ./linuxcnc-uspace_2.8.0~pre1_amd64.deb
apt install ./linuxcnc-uspace-dev_2.8.0~pre1_amd64.deb
mkdir /git/linuxcnc-dev/deb/
mv linuxcnc_* /git/linuxcnc-dev/deb/
mv *.deb /git/linuxcnc-dev/deb/
reboot
05. Setup "ec-debianize"
Code:
cd /git
git clone https://github.com/sittner/ec-debianize ec-debianize
./get_source.sh
cd etherlabmaster
dpkg-checkbuilddeps
dpkg-buildpackage (the output error "failed to sign .dsc file" is no issue)
sudo dpkg -i /git/ec-debianize/etherlabmaster_1.5.2+20180317hg9e65f7-2_amd64.deb
sudo dpkg -i /git/ec-debianize/etherlabmaster-dev_1.5.2+20180317hg9e65f7-2_amd64.deb
nano /etc/default/ethercat (change mac-address [MASTER0_DEVICE=""] e.g. [MASTER0_DEVICE="11:22:33:44:55:66"])
nano /etc/default/ethercat (change [DEVICE_MODULES=""] to [DEVICE_MODULES="generic"])
sudo update-ethercat-config
usermod -a -G ethercat linuxcnc
reboot
06. Setup "LinuxCNC-Ethercat"
Code:
cd /git
git clone http://github.com/sittner/linuxcnc-ethercat.git linuxcnc-ethercat"
nano /git/linuxcnc-ethercat/src/lcec_main.c (add here [#include "rtapi_mutex.h"] below [#include "rtapi_app.h"])
cd /git/linuxcnc-ethercat
make -j4
make install
sudo make install
07. Further things to consider
- if you experience issues when starting linuxcnc (cpu high load), then try to change "BASE_PERIOD=0" within your ini-file (config of your machine)
08. .. this is know the part where I guess I can end this guide now.
.. further steps (setting up ethercat.xml, machine config, ... can be seen within the forum).
.. hope this helped you - thanks for reading.
.. please leave a comment whether you managed it to get your system running.
[hr]
Best Regards,
Ben