Homing with external servo drives
-
First, thank you for reading this.
I have the DuetWifi hooked up so that it drives external servo drives which run linear motors. These servo drives don't seem to have way to forward the homing signal, and they do hard stop homing. Thus, I don't have physical X or Y switches for homing.
So what I need is a way to send a home signal to the drives ( M42 to switch GPIO pin), and then give the drives some time to rehome (G4 dwell time), and tell the Duet to ignore the home switch and simply consider itself homed (G??)
Any ideas?
-
In your X homing file, use the M42 command to pulse the pin to tell the drive to home, then G4 to delay for long enough to ensure it has homed, then G92 X0 (or whatever the X value is when homed) to tell the firmware that it is homed. Similarly for Y. In homeall.g you can home X and Y simultaneously.
-
Thanks!
-
Ok, I got the homing working. I can print. Yay!
However, after doing bed leveling, homing ceases to function for one of my axes.
I am using Pin 60 to send the homing signal for my X servo drive:
M42 P60 S0 and M42 P60 S1
This works fine until I run the leveling command:
G30 P0 X20 Y75 Z-99999 ; probe near a leadscrew
G30 P1 X220 Y75 Z-99999 S2 ; probe near a leadscrew and calibrate 2 motors
The first G30 has no effect, but after the second command Pin 60 stops toggling with the M42 commands.
I am using Pin 61 and Pin 62 as well for enabling the servo drives and homing Y. They are not affected and work as intended.I have the same behavior after mesh leveling. Am I doing something wrong?
-
I can't see anything wrong with that, neither have I spotted anything in the code that would account for the problem. I've added it to my list to try to reproduce. Which firmware version are you using?
-
I am using 1.17
I will also try to use pin 63 instead of 60 and report back if that works. -
In that case, please try with firmware 1.21RC1 because a lot has changed since 1.17.
-
I did get the scope out and measured. The pin toggles correctly. Edit for correctness: The hard stop homing
wiggles the motor before moving in the homing direction. The rightmost X probing location was far enough that this wiggling was enough to get the hard stop to trigger on the wrong side…:/Sorry for the noise...