Run the following command to confirm that the system is using a real-time kernel:
cat /proc/version

If the output contains PREEMPT_RT, the system meets the requirements.
Copy the IGH EtherCAT master package
provided by Beilai to the device filesystem and extract it:
tar -xvf _install.tar.gz
After extraction, the _install directory will be generated, containing the following subdirectories:
| Directory | Description |
|---|---|
| bin | EtherCAT command-line tools (e.g., ethercat) |
| lib | Runtime libraries required by IGH EtherCAT |
| modules | Kernel modules for the EtherCAT master and network driver |
Run:
ifconfig

Record the MAC address of the Ethernet interface that will be used as the EtherCAT master (Gigabit Ethernet is recommended).
Enable kernel log output for debugging:
echo 8 > /proc/sys/kernel/printk
Load the EtherCAT master driver (replace the MAC address with the actual one):
insmod -f /root/_install/modules/ec_master.ko main_devices=8a:8b:bd:9f:6d:50

Execute the following command to copy the relevant files of the EtherCAT master station to the device file system.
mkdir /etc/sysconfig
cp install/etc/sysconfig/ethercat /etc/sysconfig
mkdir -p /lib/modules/$(uname -r)
cp install/modules/ec_master.ko /lib/modules/$(uname -r)
depmod -a
⚠️ Warning messages generated during depmod -a do not affect functionality and can be safely ignored.

Execute the following commands to start the EtherCAT master and load the ec_generic.ko driver file.
/root/_install/etc/init.d/ethercat start
insmod -f _install/modules/ec_generic.ko

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/root/_install/lib
After this step, EtherCAT demo programs or user-compiled applications can be executed.
Navigate to the bin directory and run:
./ethercat slaves
If slave devices are detected successfully, the EtherCAT master is running correctly.

Beilai Tech provides a servo motor control demo based on IGH EtherCAT
, which includes the following features:
chmod +x igh_ethercat_dc_motor
./igh_ethercat_dc_motor -d 0
./igh_ethercat_dc_motor -d 1
./igh_ethercat_dc_motor --help


The demo program is configured with a 1 ms EtherCAT communication cycle by default. Parameter descriptions are as follows:
| Parameter | Description |
|---|---|
| latency | Thread wake-up latency (ns) |
| period | EtherCAT communication cycle time (ns) |
| exec | EtherCAT data receive/send execution time (ns) |
This IGH EtherCAT solution is suitable for:
The IGH EtherCAT master running on a Linux-RT kernel provides ARM industrial controllers with:
When combined with Beilai ARM Industrial Controllers (such as BL440 / BL450), it enables the construction of a high-performance, low-power, and scalable EtherCAT control platform.