Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    unable to home[xyz] using my homing scripts

    Scheduled Pinned Locked Moved Solved
    Tuning and tweaking
    4
    26
    1.0k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • spllgundefined
      spllg @Phaedrux
      last edited by

      @Phaedrux
      config.g

      M80 ; switch printer on
      G90 ; send absolute coordinates...
      M83 ; ...but relative extruder moves
      M550 P"3dd" ; set printer name

      M669 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 ; E0

      M584 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 mm

      M566 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 grid

      M566 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 maxima

      M208 S1 X0 ; set min x
      M208 S0 X300 ; set max x

      M208 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 0

      M950 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 off

      M950 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 loss

      homex.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
      G90

      homey.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 y

      G1 Z-5 F1000 H2 ; lower Z again
      G90 ; absolute positioning

      Phaedruxundefined 1 Reply Last reply Reply Quote 0
      • spllgundefined
        spllg @Phaedrux
        last edited by spllg

        @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.

        1 Reply Last reply Reply Quote 0
        • Danalundefined
          Danal
          last edited by

          Since you are moving Z in your homex... is Z homed before X?

          Delta / Kossel printer fanatic

          spllgundefined 1 Reply Last reply Reply Quote 0
          • Phaedruxundefined
            Phaedrux Moderator @spllg
            last edited by

            @spllg said in unable to home[xyz] using my homing scripts:

            homex.g
            91 ; relative positioning
            M208 X-26 S1 ; set axis minima

            Looks 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.

            Z-Bot CoreXY Build | Thingiverse Profile

            spllgundefined 1 Reply Last reply Reply Quote 0
            • spllgundefined
              spllg @Danal
              last edited by

              @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.

              1 Reply Last reply Reply Quote 0
              • Danalundefined
                Danal
                last edited by

                Even though it worked before...

                You might add

                M564 H0 ; Allow unhomed axis to move.

                and, of course, turn it off later

                M564 H1

                Delta / Kossel printer fanatic

                Phaedruxundefined 1 Reply Last reply Reply Quote 0
                • Phaedruxundefined
                  Phaedrux Moderator @Danal
                  last edited by

                  @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.

                  Z-Bot CoreXY Build | Thingiverse Profile

                  Danalundefined spllgundefined 2 Replies Last reply Reply Quote 1
                  • spllgundefined
                    spllg @Phaedrux
                    last edited by spllg

                    @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.

                    Danalundefined Phaedruxundefined 2 Replies Last reply Reply Quote 0
                    • Danalundefined
                      Danal @Phaedrux
                      last edited by

                      @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.

                      Delta / Kossel printer fanatic

                      1 Reply Last reply Reply Quote 0
                      • spllgundefined
                        spllg @Phaedrux
                        last edited by spllg

                        @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 H1

                        btw: i can see that G1 Z5 F6000 H2 is executed

                        1 Reply Last reply Reply Quote 0
                        • Danalundefined
                          Danal @spllg
                          last edited by

                          @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

                          Delta / Kossel printer fanatic

                          spllgundefined 1 Reply Last reply Reply Quote 0
                          • Phaedruxundefined
                            Phaedrux Moderator @spllg
                            last edited by

                            @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?

                            Z-Bot CoreXY Build | Thingiverse Profile

                            spllgundefined 1 Reply Last reply Reply Quote 0
                            • spllgundefined
                              spllg @Danal
                              last edited by

                              @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 H1

                              works 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?

                              1 Reply Last reply Reply Quote 0
                              • spllgundefined
                                spllg @Phaedrux
                                last edited by spllg

                                @Phaedrux

                                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.

                                1 Reply Last reply Reply Quote 0
                                • Phaedruxundefined
                                  Phaedrux Moderator
                                  last edited by

                                  So at 1500 acceleration the motor was stalling preventing the endstop from being hit and thus hanging?

                                  Z-Bot CoreXY Build | Thingiverse Profile

                                  spllgundefined 1 Reply Last reply Reply Quote 0
                                  • spllgundefined
                                    spllg @Phaedrux
                                    last edited by spllg

                                    @Phaedrux looks like - but only for a small feed rate (G1 H1 X-355 F100) and a small distance (2 mm back to end stop) and not if command was executed from the console.

                                    i feel this is strange, maybe someone wants to have a look at the code.

                                    i do not know if the stepper(s) were/are stalling of if the 'firmware was stalling' - only a reset (hard or soft, power cycling the board was not necessary ) could end the faulty state.

                                    1 Reply Last reply Reply Quote 0
                                    • Danalundefined
                                      Danal
                                      last edited by

                                      @spllg said in unable to home[xyz] using my homing scripts:

                                      only a reset (hard or soft, power cycling the board was not necessary ) could end the faulty state.

                                      There is a reproducible behavior in RRF3: If a homing move does not end, everything hangs, and it takes a reset to get out of that state. Furthermore, if you have a Pi, both the Duet board and the Pi must be reset.

                                      Delta / Kossel printer fanatic

                                      spllgundefined dc42undefined 2 Replies Last reply Reply Quote 0
                                      • spllgundefined
                                        spllg @Danal
                                        last edited by

                                        @Danal in my case it is sufficient to reset the duet - don't have to touch the rpi.

                                        1 Reply Last reply Reply Quote 0
                                        • dc42undefined
                                          dc42 administrators @Danal
                                          last edited by

                                          @Danal said in unable to home[xyz] using my homing scripts:

                                          @spllg said in unable to home[xyz] using my homing scripts:

                                          only a reset (hard or soft, power cycling the board was not necessary ) could end the faulty state.

                                          There is a reproducible behavior in RRF3: If a homing move does not end, everything hangs, and it takes a reset to get out of that state. Furthermore, if you have a Pi, both the Duet board and the Pi must be reset.

                                          Firmware version? Does it happen in standalone mode as well as in SBC mode?

                                          Duet WiFi hardware designer and firmware engineer
                                          Please do not ask me for Duet support via PM or email, use the forum
                                          http://www.escher3d.com, https://miscsolutions.wordpress.com

                                          spllgundefined 1 Reply Last reply Reply Quote 0
                                          • spllgundefined
                                            spllg @dc42
                                            last edited by

                                            @dc42

                                            • firmware version = 3.01-RC2
                                            • it happens in sdc mode
                                            • never tried standalone mode (although probably is should)
                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Unless otherwise noted, all forum content is licensed under CC-BY-SA