EtherCAT servo as main spindle

  • Hexagon
  • Away
  • New Member
  • New Member
More
04 Dec 2025 19:52 #339744 by Hexagon
Replied by Hexagon on topic EtherCAT servo as main spindle
I noticed that if I disable the machine the joint.0.motor-pos-cmd tracks the joint.0.motor-fb. So I set up a new hal file with only one cia402 and no cia402pv. Because you can't change the mode of the cia402 while LinuxCNC is running, I change between CSP and CSV by writing directly into the mode of the frequency drive via EtherCAT.

In CSP mode cia402.0.pos-fb -> joint.0.motor-pos-fb. 
In CSV mode joint.0.motor-pos-cmd -> joint.0.motor-pos-fb.

So I have no following error in CSV mode, but I need to change the position before changing from CSV back to CSP or I can turn the machine off and back on again. I built a network with mux2, oneshot and flipflop to toggle the machine for a very short amount and to reset all my mode switching logic. This works surprising well and isn't noticable.

I know that this soultion is not good and only works for my usecase because I only have one servo and nothing gets interrupted by the power cycle.

The bigger problem is that my gcode file gets stopped aswell and I can't resume. Maybe there is a way by tracking the executed lines and then starting from there... But I'm not happy with the power cycle solution in the first place.

Is there any other situation where joint.0.motor-pos-cmd tracks joint.0.motor-fb?

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

Time to create page: 0.048 seconds
Powered by Kunena Forum