@mwinterm said in CNC router with stepper motors and linear magnetic scales:
Why is a rotary encoder needed as well?
The shaft encoder handles motor commutation (ie turning the motor phases on and off), the linear encoder is used to close the loop. As the motor is being driven more like a servo than a stepper motor, this feedback is needed.
It may be possible to use the linear encoder only in 'Assisted open loop mode'; I'll have to check with @dc42. In this mode the motor is operated as if in open loop mode, but whenever it is detected that the error between desired and actual position is getting too high, the motor current is automatically increased until the error is reduced.
Sorry, this won't work, because assisted open loop mode still uses the shaft encoder to detect slippage.
There is only 1 quadrature input on the 1HCL. Does this mean the rotary encoder needs to be a magnetic encoder to be connect over the SPI encoder input?
Yes. Another advantage of magnetic encoders is that they have a much higher resolution than Quadrature encoders. Connecting encoders is covered here, under : https://docs.duet3d.com/Duet3D_hardware/Duet_3_family/Duet_3_Expansion_1HCL#encoders
Ian