Solved unable to home[xyz] using my homing scripts
-
this is my homex.g
G91 ; relative positioning
M208 X-26 S1 ; set axis minima
G1 Z5 F6000 H2 ; lift Z relative to current position
G1 H1 X-355 F3000 ; move quickly to X axis endstop and stop there (first pass)
G1 X2 F3000 ; go back a few mm
G1 H1 X-355 F100 ; move slowly to X axis endstop once more (second pass)
G1 x+26 f3000
M208 S1 X0 ; set min x
M208 S0 X300 ; set max x
G1 Z-5 F1000 H2 ; lower Z again
G90 ; absolute positioningwhich i no longer can successfully execute - it used to be working fine for weeks.
when i enter the commands in the script into the console one by one homing works fine.
i feel the script might stall at G1 X2 F3000 .
the same holds true for homey
G91 ; relative positioning
G1 Z5 F3000 H2 ; lift Z relative to current position
G1 H1 Y3500 F3000 ; move quickly to Y axis endstop and stop there (first pass)G1 Y-2 F3000 ; go back a few mm
G1 H1 Y5355 F100 ; move slowly to Y axis endstop once more (second pass)
;G1 y-10 f3000
M208 S1 Y0 ; set min y
M208 S0 Y300 ; set max yG1 Z-5 F1000 H2 ; lower Z again
G90 ; absolute positioningthis issue might be related to the fact that i invoked m500 from the console which destroyed my config-overwrite.g (all heater parameters reset to 0!) and possibly other files.
what can i do to reeanble execution of home[xyz].g?
thanks in advance
sorry for having 2 left hands.
forgot to mention:
my config: Duet 3 6HC (v0.6) with RPi 4B
duet running RepRapFirmware 3.01-RC2
rpi running
ii duetcontrolserver 1.2.4.0 armhf Control server application for Duet 3 series
ii duetruntime 1.2.4.0 armhf .NET Core runtime libraries for the Duet software framework
ii duetsd 1.0.5 all Virtual SD card directory for the Duet software framework
ii duetsoftwareframework 1.2.4.0 armhf Meta package for the full Duet software framework
ii duettools 1.2.4.0 armhf Optional tools (code examples)
ii duetwebcontrol 2.0.7-1 all Official web interface for Duet electronics
ii duetwebserver -
Why are you setting M208 in your homing scripts?
-
@Phaedrux because i thought it would be the right place and it used to be working fine. shouldn't i?
anyway, do you think moving it to config.g could solve my problem?
-
It's definitely not the intended use. M208 is to define the size of the reachable area. M574 sets the endstop position. When homing with a homing move G1 H1, and an endstop is triggered, it sets the current position to either the min or max value for that axis as defined by M208.
So if you don't have M208 in config.g and you are doing a homing move, and then setting the axis limits afterwards, I'm not sure what will happen, but it doesn't look like it's good.
So set M208 in config.g using the format shown here: https://duet3d.dozuki.com/Wiki/Gcode?revisionid=HEAD#Section_M208_Set_axis_max_travel
And then remove them from your homing files and try again.
-
@spllg gave it a try but did not solve anything.
new info: when i execute homex.g the x-coordinate field in the status window of the dashboard displays x=-24 (or-26) for a short time interval and displays x=0 afterwards.
-
Please post your config.g and homing files as they are now.
What error message if any do you get when homing?
-
@Phaedrux
config.gM80 ; switch printer on
G90 ; send absolute coordinates...
M83 ; ...but relative extruder moves
M550 P"3dd" ; set printer nameM669 K1 ; select CoreXY mode
; Drives
; D1 = constant off time, d2=spreadcycle, d3=stealthchop(2)
M569 P0.0 S1 D3 ; physical drive 0.0 goes forwards ; XY - left
M569 P0.1 S1 D3 ; physical drive 0.1 goes forwards ; XY - right
M569 P0.2 S1 D3 ; physical drive 0.2 goes forwards ; Z - left
M569 P0.3 S1 D3 ; physical drive 0.3 goes forwards ; Z - right
M569 P0.4 S0 ; physical drive 0.3 goes forwards ; E0M584 X0.0 Y0.1 Z0.2:0.3 E0.4 ; set drive mapping
;M350 X16 Y16 Z16 E64 I1 ; configure microstepping with interpolation
;M350 X16 Y16 Z16 E16 I1 ; configure microstepping with interpolation
;M350 X64 Y64 Z16 E64 I1 ; configure microstepping with interpolation; USE THIS
M350 X16 Y16 Z16 E64 I1 ; configure microstepping with interpolation
M92 X200.00 Y200.00 Z400.00 E1641.36 ; set steps per mmM566 X900.00 Y900.00 Z12.00 E120.00 ; set maximum instantaneous speed changes (mm/min)
M203 X15000.00 Y15000.00 Z3000.00 E3600.00 ; set maximum speeds (mm/min);try
;M201 X3000 Y3000 Z100 E5000 ; Set accelerations (mm/s^2)M201 X1500.00 Y1500.00 Z100.00 E3000.00 ; set accelerations (mm/s^2)
;M201 X500.00 Y500.00 Z100.00 E3000.00 ; set accelerations (mm/s^2)
;M201 X500.00 Y500.00 Z100.00 E3000.00 ; set accelerations (mm/s^2)M906 X1500 Y1500 Z600 E1000 I30 ; set motor currents (mA) and motor idle factor in per cent
;M906 X800 Y800 Z600 E1000 I30 ; set motor currents (mA) and motor idle factor in per cent
M84 S30 ; Set idle timeout; Endstops
M574 X1 S1 P"io3.in" ; configure active-low endstop for low end on X via pin io3.in
M574 Y2 S1 P"io4.in" ; configure active-low endstop for low end on Y via pin io4.in
M558 C"io5.in" P1 H2 F250 T9000 ; define z-probe=dh42(P), set dive height (H), feedrate(F), travel speed(T); alu
;G31 Z1.65; DDP
;G31 X150 Y150 Z1.1
;G31 Z1.1; glass
;G31 Z0.35; Z-Probe ( https://duet3d.dozuki.com/Wiki/Gcode#Section_M558_Set_Z_probe_type )
;M557 X15:215 Y15:195 S20 ; define mesh gridM566 X900.00 Y900.00 Z12.00 E120.00 ; set maximum instantaneous speed changes (mm/min)
M203 X15000.00 Y15000.00 Z3000.00 E3600.00 ; set maximum speeds (mm/min);M201 X750.00 Y750.00 Z100.00 E3000.00 ; set accelerations (mm/s^2)
;M201 X500.00 Y500.00 Z100.00 E3000.00 ; set accelerations (mm/s^2);M906 X1500 Y1500 Z600 E1000 I30 ; set motor currents (mA) and motor idle factor in per cent
M906 X800 Y800 Z600 E1000 I30 ; set motor currents (mA) and motor idle factor in per cent
M84 S30 ; Set idle timeout; Axis Limits
;M208 X-26 Y0 Z0 S1 ; set axis minima
;M208 X270 Y310 Z340 S0 ; set axis maximaM208 S1 X0 ; set min x
M208 S0 X300 ; set max xM208 S1 Y0 ; set min y
M208 S0 Y300 ; set max y; Endstops
M574 X1 S1 P"io3.in" ; configure active-low endstop for low end on X via pin io3.in
M574 Y2 S1 P"io4.in" ; configure active-low endstop for low end on Y via pin io4.in
M558 C"io5.in" P1 H2 F250 T9000 ; define z-probe=dh42, set dive height, feedrate, travel speed; Z-Probe ( https://duet3d.dozuki.com/Wiki/Gcode#Section_M558_Set_Z_probe_type )
;M557 X15:215 Y15:195 S20 ; define mesh grid; define leadscrew positions
M671 X-60:370 Y150:150 S5 ; leadscrews at left (connected to p0.2) and right (connected to p0.3) of X axis
;M671 X370:-60 Y150:150 S5 ; leadscrews at left (connected to p0.2) and right (connected to p0.3) of X axis; temprature sensors
M308 S0 P"temp0" Y"thermistor" ; configure sensor 0 as thermistor on pin temp0 (bed)
;M308 S1 P"temp1" Y"thermistor" ; configure sensor 1 as thermistor on pin temp1 (tool0)
M308 S1 P"temp1" Y"thermistor" B4725 C7.06e-8 ; configure sensor 1 as thermistor on pin temp1 (tool0)
;M308 S1 P"temp1" Y"thermistor" T100000 B4725 C7.06e-8 ; configure sensor 1 as thermistor on pin temp1 (tool0); 2DO
; https://wiki.e3d-online.com/E3D-v6_Assembly#RepRapFirmware
; M305 P1 B4725 C7.06e-8; 2DO: fix and all below
; Heaters
M950 H0 C"out0" T0 ; create bed heater output on out0 and map it to sensor 0
M143 H0 S120 ; set temperature limit for heater 0 to 120C
;M307 H0 B0 S1.00 F10 ; enable pwm mode for the bed heater and set PWM limit pwm freq=10hz (hopefully)
M140 H0 ; map heated bed to heater 0M950 H1 C"out1" T1 ; create nozzle heater output on out1 and map it to sensor 1
M143 H1 S285 ; set temperature limit for heater 1 to 285C
;M307 H1 B0 S1.00 ; disable bang-bang mode for the nozzle heater and set PWM limit; Fans
M950 F0 C"out4" Q500 ; create fan 0 on pin out3 and set its frequency
M106 P0 H-1 ; set fan 0 value. Thermostatic control is turned offM950 F1 C"out5" Q500 ; create fan 1 on pin out4 and set its frequency
M106 P1 H1 T50 ; set fan 0 value. Thermostatic control is turned on
;#M106 P1 S0 H-1 ; set fan 0 value. Thermostatic control is turned off; Tools
M563 P0 D0 H1 F0 ; define tool 0
G10 P0 X0 Y0 Z0 ; set tool 0 axis offsets
G10 P0 R0 S0 ; set initial tool 0 active and standby temperatures to 0C;M221 D0 S90 ; extrusion rate 90% - not yet tested
M221 D0 S100 ; extrusion rate 90% - not yet tested
;M572 D0 S.7 ; pressure advance
M572 D0 S.7 ; pressure advance; Custom settings are not defined
; Miscellaneous
M501 ; load saved parameters from non-volatile memory
M911 S10 R11 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000" ; set voltage thresholds and actions to run on power losshomex.g
91 ; relative positioning
M208 X-26 S1 ; set axis minima
G1 Z5 F6000 H2 ; lift Z relative to current position
G1 H1 X-355 F3000 ; move quickly to X axis endstop and stop there (first pass)
G1 X2 F3000 ; go back a few mm
G1 H1 X-355 F100 ; move slowly to X axis endstop once more (second pass)
G1 x+26 f3000
;M208 S1 X0 ; set min x
;M208 S0 X300 ; set max x
G1 Z-5 F1000 H2 ; lower Z again
G90homey.g
G91 ; relative positioning
G1 Z5 F3000 H2 ; lift Z relative to current position
G1 H1 Y3500 F3000 ; move quickly to Y axis endstop and stop there (first pass)G1 Y-2 F3000 ; go back a few mm
G1 H1 Y5355 F100 ; move slowly to Y axis endstop once more (second pass)
;G1 y-10 f3000
;M208 S1 Y0 ; set min y
;M208 S0 Y300 ; set max yG1 Z-5 F1000 H2 ; lower Z again
G90 ; absolute positioning -
@Phaedrux the last times, i executed the scripts there was no error message but when i excute homey.g after (a failed) homey.g i can see the message 'Error: G0/G1: insufficient axes homed'
i stll think something was destroyed when i entered m500.
-
Since you are moving Z in your homex... is Z homed before X?
-
@spllg said in unable to home[xyz] using my homing scripts:
homex.g
91 ; relative positioning
M208 X-26 S1 ; set axis minimaLooks like you're still got an M208 in homex that isn't commented out. I assume the missing G for G91 is just a copy and paste error.
Insufficient axis homed error message indicates you're trying to move an axis before it's been homed. Usually this is from a Z axis lift. To allow it you use the H2 option, which it appears you are. So when exactly does that error happen?
Are you using homeall as well?
Your config.g has a lot of duplication and commented out sections. Be careful that it doesn't catch you out. Might be time for some clean up.
-
@Danal no, but home[xy].g used to be working for weeks. i thought it would be a good idea to make sure the nozzle is away from th bed.
-
Even though it worked before...
You might add
M564 H0 ; Allow unhomed axis to move.
and, of course, turn it off later
M564 H1
-
@Danal said in unable to home[xyz] using my homing scripts:
Even though it worked before...
You might add
M564 H0 ; Allow unhomed axis to move.
and, of course, turn it off later
M564 H1
Shouldn't be necessary since he has H2 on his Z moves to allow unhomed movement.
-
@Phaedrux you're right, there is another m208 in homex.g - commented it out. i know that i should do cleanup and i'm sure i will do that when everything is working.
yes, i was using homeall.g but as long as home[xyz] are not working i do not care.
the strange thing is that homing works when i enter the commands into the console one by one which makes me think that there might be a dwc <-> duet timing issue.
-
@Phaedrux said in unable to home[xyz] using my homing scripts:
Shouldn't be necessary since he has H2 on his Z moves to allow unhomed movement.
Ah, good point, I missed that.
-
@Phaedrux done but did not solve my problem
homex.g
M564 H0
G91 ; relative positioning
;M208 X-26 S1 ; set axis minima
G1 Z5 F6000 H2 ; lift Z relative to current position
G1 H1 X-355 F3000 ; move quickly to X axis endstop and stop there (first pass)
G1 X2 F3000 ; go back a few mm
G1 H1 X-355 F100 ; move slowly to X axis endstop once more (second pass)
G1 x+26 f3000
G1 Z-5 F1000 H2 ; lower Z again
G90 ; absolute positioning
M564 H1btw: i can see that G1 Z5 F6000 H2 is executed
-
@spllg said in unable to home[xyz] using my homing scripts:
the strange ting is that homing works when i enter the commands into th console
Hmm... then, just for debugging, try that set of commands in a macro (not in sys) and try them in a 'print job'.
And/or, basic debugging: Shorten the script. Assuming that works, add things back slowly. Minimal is probably something like:
G91 ; relative positioning
G1 H1 X-355 F3000 ; move quickly to X axis endstop and stop there (first pass)
G90 -
@spllg said in unable to home[xyz] using my homing scripts:
which makes me think that there might be a dwc <-> duet timing issue
That's certainly a possibility, which is why it would help to have things cleaned up as much as possible so that we can rule out configuration error.
In cases like this it can be helpful to go to the web configurator, input your printer specifics, and generate a fresh set of files to compare against. You can backup your config and try the configurator version. If it works and yours doesn't what is the difference?
-
@Danal created the macro.
executing
M564 H0
G91 ; relative positioning
;M208 X-26 S1 ; set axis minima
G1 Z5 F6000 H2 ; lift Z relative to current position
G1 H1 X-355 F3000 ; move quickly to X axis endstop and stop there (first pass)
G1 X2 F3000 ; go back a few mm
;G1 H1 X-355 F100 ; move slowly to X axis endstop once more (second pass)
;G1 x+26 f3000
;G1 Z-5 F1000 H2 ; lower Z again
;G90 ; absolute positioning
M564 H1works fine and i can move in x direction after execution. when i uncomment ;G1 H1 X-355 F100 i cannot move in x-direction after execution.
oh no, not again this complete configuration process.
but why did homing via scrip ever work?
-
changing
M201 X1500.00 Y1500.00 Z100.00 E3000.00 ; set accelerations (mm/s^2)
(i was advised to try this but forgot about it)to
M201 X500.00 Y500.00 Z100.00 E3000.00 ; set accelerations (mm/s^2)
did the trick.
thanks for your assistance.
btw: g- and- m-codes are horrible - the g-m language reminds me on assembler languages of the early 1970's (e.g. honeywell) but i cannot and don't want to remember details.