EtherCAT servo as main spindle
- Hexagon
- Away
- New Member
-
Less
More
- Posts: 1
- Thank you received: 0
30 Nov 2025 18:22 #339516
by Hexagon
EtherCAT servo as main spindle was created by Hexagon
Hello, everyone. I have a problem configuring a servo from StepperOnline: A6-1000EC. My goal is to control this servo via the python api. It should be possible to position it between 0 and 360° as well as rotation with different speeds.
My first attempt was to configure the servo as an angular axis. Then I wrote a simple python program to control the axis via JOG_INCREMENT and JOG_CONTINOUS. For absolute positioning I switch to MDI mode and send my target position. This works totally fine, but I can't run gcode with this solution, because I can't turn the servo continuous in one direction.
So I tried setting up this as a spindle instead. At first I changed my xml so I can process target-velocity and control-mode. Then I used a mux2 to change the control-mode depending on the use of M3/M4/M5 or M19. This works fine and my frequency drive changes between mode8 and mode9. The spindle control with M3/M4/M5 also works fine, but when I enter a command like M19 R180 Q2 P0 the servo drive throws a fault. When the target position is near the actual position this works, so I assume it is some sort of following error. My bigger problem is, that the actual position of the motor after using M3 for some time is very large, cause it is not restricted to one revolution. Is there a way to change that? At my first attempt using it as an axis I used wrapped_rotary, but that only affected the display, not the actual value.
Does anyone know what I could do, or if there is a better way for the use of an servo as position and continuous motion?
Many thanks in advance
My first attempt was to configure the servo as an angular axis. Then I wrote a simple python program to control the axis via JOG_INCREMENT and JOG_CONTINOUS. For absolute positioning I switch to MDI mode and send my target position. This works totally fine, but I can't run gcode with this solution, because I can't turn the servo continuous in one direction.
So I tried setting up this as a spindle instead. At first I changed my xml so I can process target-velocity and control-mode. Then I used a mux2 to change the control-mode depending on the use of M3/M4/M5 or M19. This works fine and my frequency drive changes between mode8 and mode9. The spindle control with M3/M4/M5 also works fine, but when I enter a command like M19 R180 Q2 P0 the servo drive throws a fault. When the target position is near the actual position this works, so I assume it is some sort of following error. My bigger problem is, that the actual position of the motor after using M3 for some time is very large, cause it is not restricted to one revolution. Is there a way to change that? At my first attempt using it as an axis I used wrapped_rotary, but that only affected the display, not the actual value.
Does anyone know what I could do, or if there is a better way for the use of an servo as position and continuous motion?
Many thanks in advance
Please Log in or Create an account to join the conversation.
- Hakan
- Offline
- Platinum Member
-
Less
More
- Posts: 1075
- Thank you received: 366
30 Nov 2025 22:33 #339534
by Hakan
Replied by Hakan on topic EtherCAT servo as main spindle
This may be relevant forum.linuxcnc.org/38-general-linuxcnc-q...ove-only-following-e
Start from the end where the final setup is.
Start from the end where the final setup is.
Please Log in or Create an account to join the conversation.
Time to create page: 0.073 seconds