CiA 402 Folder Missing

  • Konstantin
  • Away
  • New Member
  • New Member
More
05 Feb 2026 19:06 #342497 by Konstantin
CiA 402 Folder Missing was created by Konstantin
Hello,

I have made the decision to try LinuxCNC for my plasma machine that has been running with Mach3 so far.

Thebplan is to use EtherCAT servos for the motion of the machine. I installed LinuxCNC from the official site Downloads section, the latest stable version - 2.9.8. Then followed MrRodW's video about installing the EtherCAT master and CiA402. This is the -  Video .

The computer I try to run LinuxCNC EtherCAT is a mini conputer a few years old with an HDD of 1TB.

The problem is that when I reched the step that requires using the halcompile command, it executes without any error but there is no cia402 folder in /linuxcnc/configs. Without having the folder, I cannot continue the procedure for CiA40w installation.

What could be the reason that prevents creation of the cia402 folder?

Best Regards
Konstantin Kolev

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

More
06 Feb 2026 18:20 #342558 by 0x2102
Replied by 0x2102 on topic CiA 402 Folder Missing
Once your EtherCAT master is working you will need:

1.) LinuxCNC EtherCAT:
github.com/linuxcnc-ethercat/linuxcnc-ethercat

2.) For CiA402 drives:
github.com/dbraun1981/hal-cia402

Some servo drives have native support in linuxcnc-ethercat.

Take a look at the linuxcnc-ethercat documentation - which also includes example ethercat-config.xml files.

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

More
06 Feb 2026 18:45 #342560 by 3404gerber
Replied by 3404gerber on topic CiA 402 Folder Missing

Hello,

I have made the decision to try LinuxCNC for my plasma machine that has been running with Mach3 so far.

Thebplan is to use EtherCAT servos for the motion of the machine. I installed LinuxCNC from the official site Downloads section, the latest stable version - 2.9.8. Then followed MrRodW's video about installing the EtherCAT master and CiA402. This is the - Video.

The computer I try to run LinuxCNC EtherCAT is a mini conputer a few years old with an HDD of 1TB.

The problem is that when I reched the step that requires using the halcompile command, it executes without any error but there is no cia402 folder in /linuxcnc/configs. Without having the folder, I cannot continue the procedure for CiA40w installation.

What could be the reason that prevents creation of the cia402 folder?

Best Regards
Konstantin Kolev
 

I just quickly checked the video you mentioned and I think you know have a working Ethercat/LinuxCNC. The next step will be to create your machine configuration: you'll need at least a "chooseAName.ini" file, a "chooseAName.hal" file and a "ethercat-conf.xml" file. Put them in a folder that you create in your /home/linuxcnc/configs/ folder. As 0x2102 said, there is an example for the .hal and .xml files on dbraun1981's github. For the ini file, if it is your first time with LinuxCNC, just start one of the simulation that has similar properties as your machine (3 axis? Gantry?) and have a look in the files that are generated automatically in the "linuxcnc/configs" folder. 

The documentation explains every thing in details and I can only recommend you to read it, but long story short, the ini file will describe your machine, the hal file will load components, create links between them and attach them to threads, and the xml file will describe the element in your cia402/ethercat component.

Hope this helps.
Cheers, Luca

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

  • Konstantin
  • Away
  • New Member
  • New Member
More
21 Feb 2026 15:38 - 21 Feb 2026 15:41 #343265 by Konstantin
Replied by Konstantin on topic CiA 402 Folder Missing
Thank you for your help. Actually @3404gerber was right, I had the EtherCAT master working but did not have any configuration created. I managed to move the drives, by the way there are 4 drives, and basic move in joint mode is working fine.

For the past few days I was trying to get the homing to work but no success so far. My servos are with absolute encoders and first of all I tried homing on the current position - it works. Now I would like to home the motors on index pulse but I cannot get it working. I installed and compiled cia402_homecomp and added the HOMEMOD line in the .ini file of the machine.

The problem is when I click home joint button, the motors starts moving at the predefined velocity and keeps moving untill "joint 0 following error" occurs and the drive has fault that says "Homing sequence timeout".

Would you provide any hints on how to approach this problem?

My settings are the same for all 4 axis and you can check them below:

.hal file:
#########################################
#nets
#########################################
net emc-enable => iocontrol.0.emc-enable-in
sets emc-enable 1

#config
setp cia402.0.csp-mode 1
setp cia402.0.pos-scale 8388608

#from servo(ethercat) to cia402
net x-statusword      lcec.0.0.cia-statusword => cia402.0.statusword
net x-opmode-display  lcec.0.0.opmode-display => cia402.0.opmode-display
net x-drv-act-pos     lcec.0.0.actual-position => cia402.0.drv-actual-position
net x-drv-act-velo    lcec.0.0.actual-velocity => cia402.0.drv-actual-velocity

#from cia402 to servo(ethercat) 
net x-controlword         cia402.0.controlword => lcec.0.0.cia-controlword
net x-modes-of-operation  cia402.0.opmode => lcec.0.0.opmode
net x-drv-target-pos      cia402.0.drv-target-position => lcec.0.0.target-position
net x-drv-target-velo     cia402.0.drv-target-velocity => lcec.0.0.target-velocity

#from motion to cia
net x-enable    <= joint.0.amp-enable-out => cia402.0.enable
net x-amp-fault => joint.0.amp-fault-in   <= cia402.0.drv-fault
net x-pos-cmd   <= joint.0.motor-pos-cmd  => cia402.0.pos-cmd
net x-pos-fb    => joint.0.motor-pos-fb   <= cia402.0.pos-fb

#homing
net x-home-request         joint.0.request-custom-homing     =>         cia402.0.home
net x-homing             joint.0.is-custom-homing         <=         cia402.0.stat-homing
net x-homed             joint.0.custom-homing-finished     <=         cia402.0.stat-homed

.ini file
HOME                    = 0
HOME_OFFSET                = 0
#HOME_SEQUENCE            = 0
HOME_SEARCH_VEL            = 0
HOME_LATCH_VEL            = 1.0
#HOME_IGNORE_LIMITS        = YES
HOME_USE_INDEX          = YES
Last edit: 21 Feb 2026 15:41 by Konstantin.

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

More
22 Feb 2026 09:52 #343294 by andrax
Replied by andrax on topic CiA 402 Folder Missing
Hi,

In order to help you, we need more information.
First of all, have you read through this thread? 

Stepperonline A6

Here you will find a lot of valuable information about setting up, operating, and homing Ethercat servo drives.
You should also provide the following information:
- What type of servo drives are they and are they CIA402 compatible?
- What type of network card are you using?
- Your ethercat.xml > basic Ethercat configuration
- Your maschinen.hal > required for loaded modules and links
- Your maschinen.ini > required for your machine configuration.
Please do not embed the files as code, but attach them instead.
 

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

  • Konstantin
  • Away
  • New Member
  • New Member
More
22 Feb 2026 14:13 - 22 Feb 2026 14:14 #343311 by Konstantin
Replied by Konstantin on topic CiA 402 Folder Missing
Hello,

thank you for your response. By the time of my post, I had just started reading the  Stepperonline A6 topic. In the end i found that you posted a working configuration files for XYRYLZ. I tried to adapt your configuration files for my machine, deleting IO Periphery that I do not  have, and I almost got it working.

The problem is that for some reason the parameter or pin 'joint.0.request-cia-homing' is not found as if there is a problem with the cia402_homecomp component. I attached the report.

Let me answer your questions:
- What type of servo drives are they and are they CIA402 compatible? - WECON VD3E EtherCAT servo  VD3E Manual
- What type of network card are you using? - Standard network card on a HP ProDesk Mini PC
- Your ethercat.xml > basic Ethercat configuration - attached as a file
- Your maschinen.hal > required for loaded modules and links - attached as a file
- Your maschinen.ini > required for your machine configuration - attached as a file

Best Regards
Konstantin Kolev
Attachments:
Last edit: 22 Feb 2026 14:14 by Konstantin.

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

More
23 Feb 2026 11:09 #343337 by andrax
Replied by andrax on topic CiA 402 Folder Missing
Hi,

The forum was unavailable all weekend.
I checked your configuration.
You are using my config and have deleted the modules in master idx="1" in the XML.
Accordingly, you must also delete the corresponding links in the hal.
These are all links in the “# Switches” section.
If you don't have a handwheel, you can remove this:
loadusr -W xhc-whb04b-6 -HsfB and all MDI_COMMAND in the .ini

However, the error ./cia402-example.hal:63: parameter or pin ‘joint.0.request-cia-homing’ not found 
is strange. The corresponding pins are present.
Can you upload the complete error log next time?
PS: setp iocontrol.0.emc-enable-in 1 System without emergency stop?
Very dangerous.
 

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

  • Konstantin
  • Away
  • New Member
  • New Member
More
24 Feb 2026 17:25 - 24 Feb 2026 17:27 #343418 by Konstantin
Replied by Konstantin on topic CiA 402 Folder Missing
Hello,

the forum was indeed down during the weekend, no problem. On the first run of your configuration I forgot to remove the limit switches, the hand wheel and the MDI commands. Then I removed all of them but still the same result. By the way, I also switched the HOMING_METHOD and DISPLAY in the .ini file.

About the emergency stop - the motors are not mounted on the machine, they are on a stand and there is no danger of hurting anyone. Thank you for pointing it out.

Attached is the entire report when I run the LinuxCNC and the edited configuration files.
Attachments:
Last edit: 24 Feb 2026 17:27 by Konstantin.

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

More
25 Feb 2026 08:58 #343451 by andrax
Replied by andrax on topic CiA 402 Folder Missing
Very interesting.
I don't see any errors in the configuration.
Can you please post the following outputs?

ethercat master
ethercat slaves
sudo dmesg

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

  • Konstantin
  • Away
  • New Member
  • New Member
More
25 Feb 2026 17:08 #343478 by Konstantin
Replied by Konstantin on topic CiA 402 Folder Missing
Hello,

attached are the requested outputs and I added PDOs and SDOs outputs as well.

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

Time to create page: 0.110 seconds
Powered by Kunena Forum