- Configuring LinuxCNC
- Advanced Configuration
- EtherCAT
- Ethercat installation from repositories - how to step by step
Ethercat installation from repositories - how to step by step
- rodw
- Topic Author
- Offline
- Platinum Member
- Posts: 10737
- Thank you received: 3541
It told you it could not find the file, ls would list the files
Please Log in or Create an account to join the conversation.
- vibram
- Offline
- Junior Member
- Posts: 37
- Thank you received: 1
Here is my source.list:
deb deb.debian.org/debian/ bookworm main contrib non-free non-free-firmware
deb-src deb.debian.org/debian/ bookworm main contrib non-free non-free-firmware
deb deb.debian.org/debian/ bookworm-updates main contrib non-free non-free-firmware
deb-src deb.debian.org/debian/ bookworm-updates main contrib non-free non-free-firmware
deb security.debian.org/debian-security/ bookworm-security main contrib non-free non-free-firmware
deb-src security.debian.org/debian-security/ bookworm-security main contrib non-free non-free-firmware
apt-get update and dry run:
my Download folder with the file ecat.sh but the error with command not found:sudo apt-get update
[sudo] password for paul:
... removed due to link limitation
Reading package lists... Done
paul@mill:~$ sudo apt-get install --dry-run ethercat-master
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package ethercat-master
cd Downloads
paul@mill:~/Downloads$ ls
ecat.sh
paul@mill:~/Downloads$ sudo ./ecat.sh
sudo: ./ecat.sh: command not found
paul@mill:~/Downloads$ sudo ecat.sh
sudo: ecat.sh: command not found
paul@mill:~/Downloads$
Please Log in or Create an account to join the conversation.
- rodw
- Topic Author
- Offline
- Platinum Member
- Posts: 10737
- Thank you received: 3541
Please Log in or Create an account to join the conversation.
- vibram
- Offline
- Junior Member
- Posts: 37
- Thank you received: 1
however. I still get the same error message with apt ethercat and the mokutil --import
edit: I just rebooted and everything went through to the end, my modules are visible
thanks a lot for your quick support
Please Log in or Create an account to join the conversation.
- rodw
- Topic Author
- Offline
- Platinum Member
- Posts: 10737
- Thank you received: 3541
Please Log in or Create an account to join the conversation.
- Sockheaven
- Offline
- Senior Member
- Posts: 51
- Thank you received: 11
I think I have identified the issue you're struggling with. I have been struggling to get the Kollmorgen AKD servo drives to communicate with LinuxCNC 2.9.X ethercat and been stuck on version 2.8.X for a while now.
I have long suspected that the choice to make EoE default to On is the root cause, and believe I have confirmed this.
It appears you need to compile the IGH master yourself with the --disable-eoe option, once this is successfully installed, the problems go away.
From some additional searches, it sounds like if EoE is turned on you need to have the specific function handlers to handle the EoE packets, otherwise the drive will get bungled up trying to process EoE packets with the CoE handler (this is my hand wavy explanation in my head, not sure its exactly what is happening).
I am using the generic controller and using generic XML configuration for the run up script, so this would make sense.
I am also very green with Linux so this took me quite a while to figure out, but I have put together a install guide for those wishing to do the same, hopefully it is adequate:
- Download the LinuxCNC Debian 12 iso (with LinuxCNC 2.9.3 preinstalled)
image the iso onto a thumb drive using Rufus, install onto PC
linuxcnc.org/downloads/
- Install extra tools:
$ sudo apt-get install git
$ sudo apt-get install caja
- Manually compile/install the IGH Master
Following official guide: docs.etherlab.org/ethercat/1.5/pdf/ethercat_doc.pd
Open a terminal and clone the master repo
$ sudo git clone gitlab.com/etherlab.org/ethercat.git /etherlab
Change directory to /etherlab
$ sudo ./bootstrap
$ sudo ./configure --sysconfdir=/etc/ --disable-eoe
$ sudo make
$ sudo make modules
$ sudo make install
$ sudo make modules_installMark the EtherCAT config file editable:
$ sudo chmod 777 /etherlab/script/ethercat.conf
Open EtherCAT config and set the adapter Mac ADDR
Retrieve mac address of adapter you with to use:
$ ip addr
In the /etherlab/script/ethercat.conf, update mag addr and devices:
Enter that mac address on the master0 device lineMASTER0_DEVICE="00:e0:4c:f1:b9:af" (where the highlighted string is the mac address of your adapter
Set the DEVICES = “generic” (do not leave blank)
Enable / Start the EtherCAT service
$ sudo systemctl enable ethercat.service
$ sudo systemctl start ethercat.service Verify Master is running/working
$ ethercat master
You should get an output (not that no master can be found)
- Install EtherCAT support for LinuxCNC
$ sudo apt update
$ sudo apt install -y linux-headers-$(uname -r) linuxcnc-ethercatTrying to install without installing the package “ethercat-master” but watching the above build progress it appears to install that anyways.
At the end of this build process it will notice you have already installed EtherCAT. It appears the user needs to answer “NO” to this prompt to maintain the manually installed version without EoE.
- Note Location of LCEC configuration
This process installed the lcec object/config file in a new locationNeed to update the LinuxCNC project hal file to use the new location: loadusr -W /usr/bin/lcec_conf ethercat-conf.xml
- Update ethercat-conf.xml based on network/device topology and start LinuxCNC
I think that was all the steps, let me know if that helps out or I missed some steps
For anyone that may know the process of updating the official releases, I would make a suggestion that EoE is disabled by default due to the requirements of having compiled driver for your specific EtherCAT device.
If the goal is to make LinuxCNC work out of the box, I'd argue that the configuration released with 2.8.X was easier to use than the default configuration of 2.9.X (so far) since the enabling of EoE appears to require the use of non-generic devices.
I've noticed others having better luck than I had with EtherCAT on LinuxCNC 2.9.X, so maybe I just need to learn how to compile those device drivers, but my lack of experience in linux is holding me back at the moment.
Best Regards,
Paul
Please Log in or Create an account to join the conversation.
- rodw
- Topic Author
- Offline
- Platinum Member
- Posts: 10737
- Thank you received: 3541
If you read their docs, this appears to be a buggy implementation on your hardware as it says:
During bus scanning (see section 5.4), the master determines the supported mailbox protocols for each slave. This is done by examining the “Supported Mailbox Protocols” mask field at word address 0x001C of the SII. If bit 1 is set, the slave supports the EoE protocol. In this case, an EoE handler is created for that slave.
Perhaps this flag can be disabled on your drive.
Please Log in or Create an account to join the conversation.
- Sockheaven
- Offline
- Senior Member
- Posts: 51
- Thank you received: 11
I tried disabling support in the Sii params to indicate EoE was not even available, and unfortunately this did not alleviate my problem (I tried this before I figured out how to compile the master manually).
However, you bring up a good point - if all of the other drives appear to work fine and only the Kollmorgen one is not, then perhaps it is a poor implementation of EoE on the drive.
I did notice that when getting the IGH sources there are quite a few devies that seem to have direct support - whereas I am operating in "generic" mode. I do wonder if an official device support code/object was in there things would be different.
In your opinion/observations are most people using devices that appear to come with the IGH release, or are most people using the generic mode?
I will submit a ticket to Kollmorgen to see if they will investigate that.
BTW is there a way to send direct messages to people? I wanted to reach out to ask you something on the side, but can't seem to find a way to send personal messages on the LinuxCNC forum.
Best Regards,
Paul
Please Log in or Create an account to join the conversation.
- Tntmold
- Offline
- New Member
- Posts: 11
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- rodw
- Topic Author
- Offline
- Platinum Member
- Posts: 10737
- Thank you received: 3541
Please Log in or Create an account to join the conversation.
- Configuring LinuxCNC
- Advanced Configuration
- EtherCAT
- Ethercat installation from repositories - how to step by step