Homing issue on Duet2
-
Hello everybody,
I've modified an existing printer. Everything works except the homing. When I do a homing, the machine executes it correctly. The X and Y axis switches and the Z axis probe detect the end of travel correctly. However, the program is unable to record or transmit the homing and so the machine remains unhomed. I can't homing independently because there's a "Error: in file macro line 8: G1: insufficient axes homed" message. I can't find the problem because my "homeall.g", "homex.g", "homey.g" and "config.g" codes seem to be correct.
It's a Duet2 Ethernet card, which I've configured using the reprap tool. The printer is running RepRap and DWC 3.5.2.
Thank you for our help.
config.g
; General G90 ; absolute coordinates M83 ; relative extruder moves M550 P"Alpha" ; set hostname ; Network M552 P0.0.0.0 S1 ; configure Ethernet adapter M586 P0 S1 ; configure HTTP ; Smart Drivers M569 P0 S1 D2 ; driver 0 goes forwards (X axis) M569 P1 S0 D2 ; driver 1 goes backwards (Y axis) M569 P2 S1 D2 ; driver 2 goes forwards (Z axis) M569 P3 S1 D2 ; driver 3 goes forwards (extruder 0) M569 P4 S1 D2 ; driver 4 goes forwards (extruder 1) ; Motor Idle Current Reduction M906 I0 ; set motor current idle factor M84 S1 ; set motor current idle timeout ; Axes M584 X0 Y1 Z2 ; set axis mapping M350 X16 Y16 Z16 I1 ; configure microstepping with interpolation M906 X800 Y800 Z800 ; set axis driver currents M92 X100 Y100 Z400 ; configure steps per mm M208 X0:220 Y0:170 Z0:170 ; set minimum and maximum axis limits M566 X900 Y900 Z12 ; set maximum instantaneous speed changes (mm/min) M203 X12000 Y12000 Z720 ; set maximum speeds (mm/min) M201 X1000 Y1000 Z200 ; set accelerations (mm/s^2) ; Extruders M584 E3:4 ; set extruder mapping M350 E16:16 I1 ; configure microstepping with interpolation M906 E800:300 ; set extruder driver currents M92 E138.33:99.95 ; configure steps per mm M566 E120:120 ; set maximum instantaneous speed changes (mm/min) M203 E7200:7200 ; set maximum speeds (mm/min) M201 E5000:5000 ; set accelerations (mm/s^2) ; Kinematics M669 K0 ; configure Cartesian kinematics ; Probes M558 K0 P8 C"zprobe.in" H5 F600:120 T6000 ; configure digital probe via slot #0 G31 P500 X33 Y14 Z0.7 ; set Z probe trigger value, offset and trigger height ; Endstops M574 X1 P"!xstop" S1 ; configure X axis endstop M574 Y1 P"!ystop" S1 ; configure Y axis endstop M574 Z1 S2 ; configure Z axis endstop ; Mesh Bed Compensation M557 X25:195 Y25:145 S42.5:30 ; define grid for mesh bed compensation
homeall.g
; increase Z G91 ; relative positioning G1 H2 Z5 F6000 ; move Z relative to current position to avoid dragging nozzle over the bed G90 ; absolute positioning ; home XY var xTravel = move.axes[0].max - move.axes[0].min + 5 ; calculate how far X can travel plus 5mm var yTravel = move.axes[1].max - move.axes[1].min + 5 ; calculate how far Y can travel plus 5mm G91 ; relative positioning G1 H1 X{-var.xTravel} Y{-var.yTravel} F3000 ; coarse home in the -X and -Y directions G1 H2 X5 Y5 F6000 ; move back 5mm G1 H1 X{-var.xTravel} Y{-var.yTravel} F300 ; fine home in the -X and -Y directions G90 ; absolute positioning ; home Z var xCenter = move.compensation.probeGrid.mins[0] + (move.compensation.probeGrid.maxs[0] - move.compensation.probeGrid.mins[0]) / 2 - sensors.probes[0].offsets[0] var yCenter = move.compensation.probeGrid.mins[1] + (move.compensation.probeGrid.maxs[1] - move.compensation.probeGrid.mins[1]) / 2 - sensors.probes[0].offsets[1] G1 X{var.xCenter} Y{var.yCenter} F6000 ; go to bed centre G30 ; probe the bed
-
@Hubert91 post your separate homing files and which axis when homed being independently actually causes the error
-
@jay_s_uk said in Homing issue on Duet2:
post your separate homing files and which axis when homed being independently actually causes the error
Each axis causes an error when I try to homing it. When I do a home all, the procedure is completed to the end (the 3 axes go to the end of their travel 2x) but the program doesn't want to store the homing.
homex.g
; increase Z G91 ; relative positioning G1 Z5 ; move Z relative to current position to avoid dragging nozzle over the bed G90 ; absolute positioning ; home X var maxTravel = move.axes[0].max - move.axes[0].min + 5 ; calculate how far X can travel plus 5mm G1 H1 X{-var.maxTravel} F3000 ; coarse home in the -X direction G1 X5 F6000 ; move back 5mm G1 H1 X{-var.maxTravel} F300 ; fine home in the -X direction ; decrease Z again G91 ; relative positioning G1 Z-5 F6000 ; move Z relative to current position G90 ; absolute positioning
homey.g
; increase Z G91 ; relative positioning G1 Z5 ; move Z relative to current position to avoid dragging nozzle over the bed G90 ; absolute positioning ; home Y var maxTravel = move.axes[1].max - move.axes[1].min + 5 ; calculate how far Y can travel plus 5mm G1 H1 Y{-var.maxTravel} F3000 ; coarse home in the -Y direction G1 Y5 F6000 ; move back 5mm G1 H1 Y{-var.maxTravel} F300 ; fine home in the -Y direction ; decrease Z again G91 ; relative positioning G1 Z-5 F6000 ; move Z relative to current position G90 ; absolute positioning
homez.g
; increase Z G91 ; relative positioning G1 Z5 ; move Z relative to current position to avoid dragging nozzle over the bed G90 ; absolute positioning ; home Z var xCenter = move.compensation.probeGrid.mins[0] + (move.compensation.probeGrid.maxs[0] - move.compensation.probeGrid.mins[0]) / 2 - sensors.probes[0].offsets[0] var yCenter = move.compensation.probeGrid.mins[1] + (move.compensation.probeGrid.maxs[1] - move.compensation.probeGrid.mins[1]) / 2 - sensors.probes[0].offsets[1] G1 X{var.xCenter} Y{var.yCenter} F6000 ; go to bed centre G30 ; probe the bed
-
@Hubert91 said in Homing issue on Duet2:
G1 Z5 ; move Z relative to current position to avoid dragging nozzle over the bed
you can't move and axis (line 4 of homez) without it being homed. use G1 H2 instead
-
@Hubert91 The first Z move needs to be an H2 move, so it ignores if the Z axis is not homed. Your homeall.g has this:
G1 H2 Z5 F6000 ; move Z relative to current position to avoid dragging nozzle over the bed
but your homex.g, homey.g and homez.g have
G1 Z5 ; move Z relative to current position to avoid dragging nozzle over the bed
Change them to match homeall.g. This is an error in the code the config tool is generating, I have asked @chrishamm to fix it.
PS
The ending move, to return Z to it's starting place, also needs to be an H2 move, in homex.g and homey.g. ieG1 H2 Z-5 F6000 ; move Z relative to current position
Ian
-
I changed homex.g, homey.g et homez.g and put H2.
Now an independent homing can be almost carried out. The program does not store the procedure and the machine stops moving at the line:
G1 Z-5 F6000 ; move Z relative to current position
due to insufficient axes homed. Its very weird.
-
@Hubert91 I added an extra part to the end of my post. The last Z move also needs to be an H2 move in homex.g and homey.g, to move the Z axis back down.
Ian
-
@droftarts It's done and does not solve the problem
-
@Hubert91 Please post your current homex.g and homey.g
Ian
-
@droftarts the homeall.g does not work too.
homex.g
; increase Z G91 ; relative positioning G1 H2 Z5 ; move Z relative to current position to avoid dragging nozzle over the bed G90 ; absolute positioning ; home X var maxTravel = move.axes[0].max - move.axes[0].min + 5 ; calculate how far X can travel plus 5mm G1 H1 X{-var.maxTravel} F3000 ; coarse home in the -X direction G1 X5 F6000 ; move back 5mm G1 H1 X{-var.maxTravel} F300 ; fine home in the -X direction ; decrease Z again G91 ; relative positioning G1 H2 Z-5 F6000 ; move Z relative to current position G90 ; absolute positioning
homey.g
; increase Z G91 ; relative positioning G1 H2 Z5 ; move Z relative to current position to avoid dragging nozzle over the bed G90 ; absolute positioning ; home Y var maxTravel = move.axes[1].max - move.axes[1].min + 5 ; calculate how far Y can travel plus 5mm G1 H1 Y{-var.maxTravel} F3000 ; coarse home in the -Y direction G1 Y5 F6000 ; move back 5mm G1 H1 Y{-var.maxTravel} F300 ; fine home in the -Y direction ; decrease Z again G91 ; relative positioning G1 H2 Z-5 F6000 ; move Z relative to current position G90 ; absolute positioning
-
@Hubert91 I can't see anything wrong with your homex.g and homey.g. What doesn't work, or what error is reported?
Same for homeall.g; what doesn't work, or what error is reported?
Ian
-
There is no error reported with homeall.g, and no error reported with homex,y,z since I add the "H2".
When I send G28, the printer begin the homing by moving the X axis twice, then the Y axis twice, then Z axis twice, as written in the GCode. The endstop switches work well. But after the procedure, the printer remains not homed. The X, Y and Z buttons in the console of DWC remain orange.If I try to force the homing by setting the known position with a G92 code, the buttons move to blue color. If I move the axis after that, the printer is de-homed again.
-
@Hubert91 said in Homing issue on Duet2:
M906 I0 ; set motor current idle factor
this is your problem in config.g remove that line
-
@Hubert91 @jay_s_uk is right; effectively the motors are turning off, and so losing position, 1 second after they are set to idle, because of these two lines:
; Motor Idle Current Reduction M906 I0 ; set motor current idle factor M84 S1 ; set motor current idle timeout
You need to set some motor current, so the axis can maintain position. The default is usually 30%, ie
M906 I30
. You also don't want to set the idle timeout too short, in case there is a pause in your gcode program.M84 S30
is generally sensible.Ian
-
Thank you guys, you find the error. With more than 0%, it works. Works with 1 seconde time out but I will set as you describe.
Have a good day
-
@Hubert91 Actually, the M906 idle current doesn't come into effect until the whole machine is idle, ie it doesn't happen in the middle of a print job, only after the print job is finished, or a macro (like homing) has finished. So the M84 time is not too important. I have mine set to 20 seconds, but M906 set to 30%.
Ian
-
-