Help with Delta E3 Ethercat drives - hal and ethercat-conf.xml

  • SPH
  • SPH's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
23 Oct 2025 01:40 #336919 by SPH
Hoping I can get some help getting my new Delta E3 drives up and running.
I've done a fresh install on a mini pc with two realtek 2.5gb nics.
Followed all of the instructions in RodW's very helpful guide and have gotten as far as trying to get my drives setup in the ethercat-conf.xml file, at least that's where I think I'm at.

I ran lcnc for the first time and made a sim gantry setup to get a hal and ini file.
Added the ethercat.hal
added the link to the ethercat-conf.xml and downloaded the xml file from Rod's github.

My drive is powered on and in Ethercat mode.
When I run ethercat slaves from the command line I get the following info
cnc@CNC:~$ ethercat slaves
0  0:0  PREOP  +  0x000001dd:0x10306081
cnc@CNC:~$

Ethercat master returns the following
cnc@CNC:~$ ethercat master
Master0
  Phase: Idle
  Active: no
  Slaves: 1
  Ethernet devices:
    Main: 84:47:09:4b:f6:48 (attached)
      Link: UP
      Tx frames:   495013
      Tx bytes:    29781420
      Rx frames:   495012
      Rx bytes:    29781360
      Tx errors:   0
      Tx frame rate [1/s]:    120    122    121
      Tx rate [KByte/s]:      7.0    7.1    7.1
      Rx frame rate [1/s]:    120    122    121
      Rx rate [KByte/s]:      7.0    7.1    7.1
    Common:
      Tx frames:   675263
      Tx bytes:    40660804
      Rx frames:   675254
      Rx bytes:    40660264
      Lost frames: 9
      Tx frame rate [1/s]:    120    122    121
      Tx rate [KByte/s]:      7.0    7.1    7.1
      Rx frame rate [1/s]:    120    122    121
      Rx rate [KByte/s]:      7.0    7.1    7.1
      Loss rate [1/s]:          0      0      0
      Frame loss [%]:         0.0    0.0    0.0
  Distributed clocks:
    Reference clock:   Slave 0
    DC reference time: 0
    Application time:  0
                       2000-01-01 00:00:00.000000000
cnc@CNC:~$

I'm a little lost on how to progress from here though. Obviously rod's ethercat-config.xml file is setup for his devices and doesn't load for me. I get the following error report.
Error report created by /usr/lib/tcltk/linuxcnc/show_errors.tcl:

Print file information:
RUN_IN_PLACE=no
LINUXCNC_DIR=
LINUXCNC_BIN_DIR=/usr/bin
LINUXCNC_TCL_DIR=/usr/lib/tcltk/linuxcnc
LINUXCNC_SCRIPT_DIR=
LINUXCNC_RTLIB_DIR=/usr/lib/linuxcnc/modules
LINUXCNC_CONFIG_DIR=
LINUXCNC_LANG_DIR=/usr/lib/tcltk/linuxcnc/msgs
INIVAR=inivar
HALCMD=halcmd
LINUXCNC_EMCSH=/usr/bin/wish8.6
LINUXCNC - 2.9.4
Machine configuration directory is '/home/cnc/linuxcnc/configs/sim.axis.gantry'
Machine configuration file is 'gantry.ini'
INIFILE=/home/cnc/linuxcnc/configs/sim.axis.gantry/gantry.ini
VERSION=1.1
PARAMETER_FILE=sim.var
TPMOD=
HOMEMOD=
TASK=milltask
HALUI=
DISPLAY=axis
COORDINATES=XYZY
KINEMATICS=trivkins coordinates=XYZY kinstype=BOTH
Starting LinuxCNC...
Starting LinuxCNC server program: linuxcncsvr
Loading Real Time OS, RTAPI, and HAL_LIB modules
Starting LinuxCNC IO program: io
emc/iotask/ioControl.cc 786: can't load tool table.
linuxcnc TPMOD=tpmod HOMEMOD=homemod EMCMOT=motmod
Found file(REL): ./ethercat.hal
Shutting down and cleaning up LinuxCNC...
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments

Debug file information:
Note: Using POSIX realtime
Failed to execute SDO download: Input/output error
LCEC: slave 0.0: Failed to execute SDO download (0x2000:0x00, size 2, byte0=112, error -5, abort_code 06010002)
LCEC: failed to configure slave 0.0 sdo 2000:00
Failed to execute SDO download: Input/output error
LCEC: slave 0.0: Failed to execute SDO download (0x2007:0x06, size 1, byte0=5, error -5, abort_code 06020000)
LCEC: failed to configure slave 0.0 sdo 2007:06
Failed to execute SDO download: Input/output error
LCEC: slave 0.0: Failed to execute SDO download (0x2007:0x05, size 1, byte0=5, error -5, abort_code 06020000)
LCEC: failed to configure slave 0.0 sdo 2007:05
Failed to execute SDO download: Invalid argument
LCEC: slave 0.1: Failed to execute SDO download (0x2000:0x00, size 2, byte0=112, error -22, abort_code f67e76d4)
LCEC: failed to configure slave 0.1 sdo 2000:00
Failed to execute SDO download: Invalid argument
LCEC: slave 0.1: Failed to execute SDO download (0x2007:0x06, size 1, byte0=5, error -22, abort_code f67e76d4)
LCEC: failed to configure slave 0.1 sdo 2007:06
Failed to execute SDO download: Invalid argument
LCEC: slave 0.1: Failed to execute SDO download (0x2011:0x00, size 2, byte0=1, error -22, abort_code f67e76d4)
LCEC: failed to configure slave 0.1 sdo 2011:00
Failed to execute SDO download: Invalid argument
LCEC: slave 0.2: Failed to execute SDO download (0x2000:0x00, size 2, byte0=88, error -22, abort_code f67e76d4)
LCEC: failed to configure slave 0.2 sdo 2000:00
Failed to execute SDO download: Invalid argument
LCEC: slave 0.2: Failed to execute SDO download (0x2007:0x06, size 1, byte0=5, error -22, abort_code f67e76d4)
LCEC: failed to configure slave 0.2 sdo 2007:06
Failed to execute SDO download: Invalid argument
LCEC: slave 0.2: Failed to execute SDO download (0x2011:0x00, size 2, byte0=0, error -22, abort_code f67e76d4)
LCEC: failed to configure slave 0.2 sdo 2011:00
Failed to register PDO entry: No such file or directory
LCEC: master 0 PDO entry registration failed
LCEC: failure, clearing config
LCEC: exiting
LCEC: returning -EINVAL
lcec: rtapi_app_main: Invalid argument (-22)
./ethercat.hal:2: waitpid failed /usr/bin/rtapi_app lcec
./ethercat.hal:2: /usr/bin/rtapi_app exited without becoming ready
./ethercat.hal:2: insmod for lcec failed, returned -1
12547
Stopping realtime threads
Unloading hal components
Note: Using POSIX realtime



-----------------------------------------------------------------------
Info report created by linuxcnc_info:
The file:    /tmp/linuxcnc_info.txt
can be posted to a forum or a web site like:
     http://pastebin.com
in order to provide information about the linuxcnc
system and configuration.

                Date: Thu 23 Oct 2025 12:29:51 AEDT
            UTC Date: Thu 23 Oct 2025 01:29:51 UTC
        this program: /usr/bin/linuxcnc_info
              uptime: 12:29:51 up 1:27, 1 user, load average: 4.59, 4.92, 4.60
     lsb_release -sa: Debian Debian GNU/Linux 12 (bookworm) 12 bookworm
            linuxcnc: /usr/bin/linuxcnc
                 pwd: /home/cnc/linuxcnc/configs/sim.axis.gantry
                USER: cnc
             LOGNAME: cnc
                HOME: /home/cnc
              EDITOR:
              VISUAL:
            LANGUAGE: en_AU:en
                TERM: dumb
           COLORTERM:
             DISPLAY: :0.0
             DESKTOP: lightdm-xsession
        display size: 1920x1080 pixels (508x285 millimeters)
                PATH: /usr/bin:/home/cnc/linuxcnc/configs/sim.axis.gantry/bin:/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games

uname items:
         nodename -n: CNC
      kernel-name -s: Linux
      kernel-vers -v: #1 SMP PREEMPT_RT Debian 6.1.124-1 (2025-01-12)
          machine -m: x86_64
        processor -p: unknown
         platform -i: unknown
      oper system -o: GNU/Linux

/proc items:
             cmdline: BOOT_IMAGE=/boot/vmlinuz-6.1.0-30-rt-amd64 root=UUID=0f3a6e83-8d9a-4590-a5d4-e505f6df4f87 ro quiet
          model name: AMD Ryzen 7 5825U with Radeon Graphics
               cores: 8
             cpu MHz: 3594.461
             parport:
              serial:

Versions:
                 gcc: gcc (Debian 12.2.0-14) 12.2.0
              python: Python 3.11.2
                 git: git version 2.39.5
          git commit: NA
                 tcl: 8.6
                  tk: 8.6
               glade: not_in_PATH

linuxcnc_var all:

     LINUXCNCVERSION: 2.9.4
LINUXCNC_AUX_GLADEVCP: /usr/share/linuxcnc/aux_gladevcp
LINUXCNC_AUX_EXAMPLES: /usr/share/linuxcnc/aux_examples
            REALTIME: /usr/lib/linuxcnc/realtime
                 RTS: uspace
          HALLIB_DIR: /usr/share/linuxcnc/hallib
              PYTHON: /usr/bin/python3

dpkg -l '*linuxcnc*':
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                Version           Architecture Description
+++-===================-=================-============-=====================================================================
un  linuxcnc            <none>            <none>       (no description available)
un  linuxcnc-dev        <none>            <none>       (no description available)
un  linuxcnc-doc        <none>            <none>       (no description available)
ii  linuxcnc-doc-de     1:2.9.4           all          motion controller for CNC machines and robots (German documentation)
ii  linuxcnc-doc-en     1:2.9.4           all          motion controller for CNC machines and robots (English documentation)
ii  linuxcnc-doc-es     1:2.9.4           all          motion controller for CNC machines and robots (Spanish documentation)
ii  linuxcnc-doc-fr     1:2.9.4           all          motion controller for CNC machines and robots (French documentation)
ii  linuxcnc-ethercat   1.40.0.g8a607c0-0 amd64        LinuxCNC EtherCAT HAL driver
un  linuxcnc-sim        <none>            <none>       (no description available)
un  linuxcnc-sim-dev    <none>            <none>       (no description available)
ii  linuxcnc-uspace     1:2.9.4           amd64        motion controller for CNC machines and robots
ii  linuxcnc-uspace-dev 1:2.9.4           amd64        PC based motion controller for real-time Linux



 

Please Log in or Create an account to join the conversation.

  • SPH
  • SPH's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
23 Oct 2025 01:49 #336920 by SPH
I've tried updating the first device in Rodw's .xml file with my drives id's as returned from ethercat-slaves and trimming the other devices out of the file. File is attached.Generates the following error when run. 
Attachments:

Please Log in or Create an account to join the conversation.

More
23 Oct 2025 02:05 #336921 by Hakan
Those 2xxx sdo numbers are not universal and probably differ between your drive and rodw's.
Put the output of the command "lcec_configgen" into ethercat-conf.xml.
Modify the master line if needed and look over the naming of pins.

Please Log in or Create an account to join the conversation.

  • SPH
  • SPH's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
23 Oct 2025 02:17 #336922 by SPH
Thanks for the help! I've adjusted the file and get the attached error. Not sure what inputs I'd trim out.
Print file information:
RUN_IN_PLACE=no
LINUXCNC_DIR=
LINUXCNC_BIN_DIR=/usr/bin
LINUXCNC_TCL_DIR=/usr/lib/tcltk/linuxcnc
LINUXCNC_SCRIPT_DIR=
LINUXCNC_RTLIB_DIR=/usr/lib/linuxcnc/modules
LINUXCNC_CONFIG_DIR=
LINUXCNC_LANG_DIR=/usr/lib/tcltk/linuxcnc/msgs
INIVAR=inivar
HALCMD=halcmd
LINUXCNC_EMCSH=/usr/bin/wish8.6
LINUXCNC - 2.9.4
Machine configuration directory is '/home/cnc/linuxcnc/configs/sim.axis.gantry'
Machine configuration file is 'gantry.ini'
INIFILE=/home/cnc/linuxcnc/configs/sim.axis.gantry/gantry.ini
VERSION=1.1
PARAMETER_FILE=sim.var
TPMOD=
HOMEMOD=
TASK=milltask
HALUI=
DISPLAY=axis
COORDINATES=XYZY
KINEMATICS=trivkins coordinates=XYZY kinstype=BOTH
Starting LinuxCNC...
Starting LinuxCNC server program: linuxcncsvr
Loading Real Time OS, RTAPI, and HAL_LIB modules
Starting LinuxCNC IO program: io
emc/iotask/ioControl.cc 786: can't load tool table.
linuxcnc TPMOD=tpmod HOMEMOD=homemod EMCMOT=motmod
Found file(REL): ./ethercat.hal
Shutting down and cleaning up LinuxCNC...
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments

Debug file information:
Note: Using POSIX realtime
LCEC: slave 0.D1: FAILURE: FAILURE: more input PDO entries configured than your hardware supports.
Axis 1 has 13 PDO entries, vs a configured limit of 8.  You will need to edit your XML
configuration and either remove some <modParam name="enable*"> entries or increase 
<modParam name="ciaTxPDOEntryLimit">. Check your CiA 402 slave's hardware manual to determine the
correct limit.

Enabled features that impact this limit are:

  -  <modParam name="enableActualCurrent" value="true">
  -  <modParam name="enableActualFollowingError" value="true">
  -  <modParam name="enableActualTorque" value="true">
  -  <modParam name="enableErrorCode" value="true">
  -  <modParam name="enablePositionDemand" value="true">
  -  <modParam name="enableProbeStatus" value="true">
  -  <modParam name="enableTorqueDemand" value="true">
  -  <modParam name="enableVelocityDemand" value="true">

In addition, disabling unneeded CiA 402 modes may help, as some implicitly add additional PDO entries:

  -  <modParam name="enablePP" value="true">
  -  <modParam name="enablePV" value="true">
  -  <modParam name="enableCSP" value="true">
  -  <modParam name="enableCSV" value="true">
  -  <modParam name="enableCST" value="true">
  -  <modParam name="enableHM" value="true">
  -  <modParam name="enableTQ" value="true">

HAL: ERROR: thread 'servo-thread' not found
./ethercat.hal:3: addf failed
17208
Stopping realtime threads
Unloading hal components
Note: Using POSIX realtime

Please Log in or Create an account to join the conversation.

  • SPH
  • SPH's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
23 Oct 2025 02:24 #336923 by SPH
Thought I'd add that Delta does have a xml file in their downloads section for these drives but I'm not sure if it's useful or not.

Please Log in or Create an account to join the conversation.

More
23 Oct 2025 02:53 - 23 Oct 2025 02:55 #336925 by Hakan
Oh I see, it selected the basic-cia402 driver.
Set all those enableXXX modes in the second listing to false
Except enableCSP leave at true.

That xml you found is an esi file, Linuxcnc doesn't use that.
You can find the synchronization modes the drive support, assignactivate items.
That can be helpful. All other needed info is read from the drive.
Last edit: 23 Oct 2025 02:55 by Hakan.

Please Log in or Create an account to join the conversation.

  • SPH
  • SPH's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
23 Oct 2025 03:01 #336926 by SPH
Legend, thank you. I'll have a bit more of a play and see where I get to.

Please Log in or Create an account to join the conversation.

  • SPH
  • SPH's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
23 Oct 2025 03:23 #336927 by SPH
Any way to know which of the parameters I should actually be setting to true? I can get axis to run if I false basically everything out but I doubt that's going to lead to any kind of success.
<masters>
  <master idx="0">
    <slave idx="0" type="basic_cia402" vid="0x000001dd" pid="0x10306081" name="D1">
      <modParam name="ciaRxPDOEntryLimit" value="8"/>
      <modParam name="ciaTxPDOEntryLimit" value="8"/>
      <modParam name="enablePP" value="false"/>
      <modParam name="enablePV" value="false"/>
      <modParam name="enableTQ" value="false"/>
      <modParam name="enableHM" value="false"/>
      <modParam name="enableIP" value="disabled"/>
      <modParam name="enableCSP" value="true"/>
      <modParam name="enableCSV" value="false"/>
      <modParam name="enableCST" value="false"/>
      <modParam name="enableActualCurrent" value="false"/>
      <modParam name="enableActualFollowingError" value="true"/>
      <modParam name="enableActualTorque" value="true"/>
      <modParam name="enableDigitalInput" value="true"/>
      <modParam name="digitalInChannels" value="16"/>
      <modParam name="enableDigitalOutput" value="true"/>
      <modParam name="digitalOutChannels" value="16"/>
      <modParam name="enableErrorCode" value="true"/>
      <modParam name="enableFollowingErrorWindow" value="true"/>
      <modParam name="enableHomeAccel" value="true"/>
      <modParam name="enableInterpolationTimePeriod" value="false"/>
      <modParam name="enableMaximumAcceleration" value="true"/>
      <modParam name="enableMaximumDeceleration" value="true"/>
      <modParam name="enableMaximumMotorRPM" value="false"/>
      <modParam name="enableMaximumTorque" value="false"/>
      <modParam name="enableMotorRatedCurrent" value="false"/>
      <modParam name="enableMotorRatedTorque" value="false"/>
      <modParam name="enablePositionDemand" value="false"/>
      <modParam name="enablePositioningTime" value="false"/>
      <modParam name="enablePositioningWindow" value="false"/>
      <modParam name="enableProbeStatus" value="false"/>
      <modParam name="enableProfileAccel" value="false"/>
      <modParam name="enableProfileDecel" value="false"/>
      <modParam name="enableProfileMaxVelocity" value="false"/>
      <modParam name="enableProfileVelocity" value="false"/>
      <modParam name="enableTargetTorque" value="false"/>
      <modParam name="enableTorqueDemand" value="false"/>
      <modParam name="enableTorqueSlope" value="false"/>
      <modParam name="enableVelocityDemand" value="false"/>
      <modParam name="enableVelocityErrorTime" value="false"/>
      <modParam name="enableVelocityErrorWindow" value="false"/>
      <modParam name="enableVelocityThresholdWindow" value="false"/>
    </slave>
  </master>
</masters>

Please Log in or Create an account to join the conversation.

More
23 Oct 2025 03:52 - 23 Oct 2025 03:52 #336930 by Hakan
Just glancing through the enable parameters I don't see they are needed.
Many are settings for the modes you disabled, or optional.
Obviously, if you need digital io you need to enable that and such.
Last edit: 23 Oct 2025 03:52 by Hakan.

Please Log in or Create an account to join the conversation.

Time to create page: 0.264 seconds
Powered by Kunena Forum