EtherCAT servo as main spindle
- Hexagon
- Offline
- New Member
-
Less
More
- Posts: 6
- Thank you received: 0
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?
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.
- Aciera
-
- Offline
- Administrator
-
Less
More
- Posts: 4628
- Thank you received: 2049
05 Dec 2025 09:48 - 05 Dec 2025 09:49 #339754
by Aciera
Replied by Aciera on topic EtherCAT servo as main spindle
You can also disable motion by setting 'motion.enable' to FALSE but machine state will still be switched to Off.
the relevant code section is here:
github.com/LinuxCNC/linuxcnc/blob/master...tion/control.c#L1465
If it is possible to do this for a specific joint during program execution would have to be explored. I expect that the interpreter would need to restarted at the very least.
the relevant code section is here:
github.com/LinuxCNC/linuxcnc/blob/master...tion/control.c#L1465
If it is possible to do this for a specific joint during program execution would have to be explored. I expect that the interpreter would need to restarted at the very least.
Last edit: 05 Dec 2025 09:49 by Aciera.
Please Log in or Create an account to join the conversation.
- Hakan
- Offline
- Platinum Member
-
Less
More
- Posts: 1134
- Thank you received: 399
05 Dec 2025 11:19 #339758
by Hakan
Replied by Hakan on topic EtherCAT servo as main spindle
ADm1N didn't use CSV mode, it doesn't work well for a spindle as you see.
He used PV Profile Velocity mode which works well for spindle.
I made an adaptation to cia402 component for pv mode here incl an example
github.com/MetalMusings/cia402pv
He used PV Profile Velocity mode which works well for spindle.
I made an adaptation to cia402 component for pv mode here incl an example
github.com/MetalMusings/cia402pv
Please Log in or Create an account to join the conversation.
Time to create page: 0.072 seconds