Sensorless homing on two drives at the same time?
-
Hiya - I'm trying to setup sensorless homing on a CNC machine to occur while homing a dual stepper motor driven y axis - which are either end of an x axis. I've got x, z and y working individually but if I split the drive mapping Y and V together it doesn't seem to work.
Here is my homing code. Is this even possible to do?
G21 ; Set units to mm M584 Y1 V4 P4 ; separate Y axis for aligning them independently M913 Y40 V40 ; drop motor current for Y and V Axis G91 ; relative positioning G1 H2 Y5 V5 F400 ; go back G4 P500 ; dwell G1 H1 Y-1000 V-1000 F300 ; move quickly to Y nd V axis endstop G1 H2 Y1 V1 F200 ; go back a few mm G90 ; absolute positioning G4 P1000 ; dwell M584 Y1:4 P3 ; apply custom drive mapping M500 ; save
I may try a work around homing the combined Y and V first and separating the V to perform an individual homing cycle on that side.
Many thanks, Savvas
-
@educatingsavvas should be possible, you need to set M574 accordingly (S3 or S4 may be appropriate, bears testing).
-
Yes you should combine the axis as one and then home with S3 to stop when one motor stalls, or S4 to stop each motor separately as it stalls.
-
Thanks for the reply guys - I've tried this...
; Endstops M574 Z2 X1 Y1 S4 ; Low endstop senessorless homing
and...
; Endstops M574 Z2 X1 S3 ; Low endstop senessorless homing M574 Y1 V1 S4 ; Low endstop senessorless homing
with the following homey.g
G21 ; Set units to mm M913 Y50 ; drop motor current for Y G91 ; relative positioning G1 H2 Y3 F400 ; go back G4 P500 ; dwell G1 H1 Y-1000 F700 ; move Y axis endstop and stop there G1 H2 Y1 F200 ; go back a few mm G4 P500 ; dwell G90 ; absolute positioning M913 Y100 ; return motor current to 100% M500 ; save current parameters
But it doesn't seem to be working still. Despite the V drive being mapped to Y when I home, V always crashed while the motor load is detected for Y. Could this be a bug?
-
@educatingsavvas Normally in RRF3 the M574 commands must be on their own line. I'm not sure if that also applies to sensorless homing with S3/S4 but might want to split them out and check.
Have you gone through this?
https://duet3d.dozuki.com/Wiki/Stall_detection_and_sensorless_homing
-
@phaedrux Thanks again for that pointers. I'm going to have to investigate this in the new year now. I'll try commenting out the M574 commands from the config file and placing individual lines into each homing file. It sounds like I should also include M915 in the config file but sensorless homing individual axis has worked without it.
The only other thing I can imagine may be causing an issue is I have the following line in my config file...
M584 X0 Y1:4 Z2 V4 P3; Apply custom drive mapping, P3 hides V(Y2) axis. ***
and I should remove V4 from that as it's not needed. Thanks again, and hope you have a good xmas break. Savvas