Cómo instalar el máster EtherLab EtherCAT en Ubuntu 24.04

Esta breve instrucción te muestra cómo instalar el máster EtherLab EtherCAT, también conocido como el IgH EtherCAT Master.

Añade el repositorio:

install_etherlab_ethercat.sh
curl -fsSL https://download.opensuse.org/repositories/science:/EtherLab/Debian_12/Release.key | gpg --dearmor | sudo tee "/usr/share/keyrings/etherlab.gpg" >/dev/null
sudo echo "deb [signed-by=/usr/share/keyrings/etherlab.gpg] https://download.opensuse.org/repositories/science:/EtherLab/xUbuntu_24.04/ ./" | sudo tee /etc/apt/sources.list.d/etherlab.list
sudo apt update

Ahora instala el máster EtherCAT desde el repositorio que acabamos de instalar

install_ethercat_master.sh
sudo apt install ethercat-master

En caso de que también necesites las cabeceras de desarrollo, instálalas usando

install_libethercat_dev.sh
sudo apt install libethercat-dev

Para más información, ver la página de EtherLab

Cómo configurar el máster EtherCAT

Ahora abre /etc/ethercat.conf y establece MASTER0_DEVICE al nombre de tu interfaz de red.

Típicamente esta no puede ser la misma interfaz de red que usas para internet u otros propósitos. Puedes encontrar el nombre de tus interfaces de red usando ifconfig.

/etc/ethercat.conf
MASTER0_DEVICE="enx00e04c680004"

Además, debes definir el controlador del dispositivo. La mayoría de las veces, este controlador es simplemente generic - usar otros controladores para reducir ligeramente el jitter es un tema avanzado.

/etc/ethercat.conf
MASTER0_DEVICE_DRIVER="generic"

Ahora puedes (re)iniciar el máster EtherCAT usando

restart_ethercat.sh
sudo systemctl restart ethercat

Echa un vistazo a artículos similares por categoría: EtherCAT