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

    Difference between G28 and M98"homeall.g"?

    Scheduled Pinned Locked Moved Solved
    General Discussion
    3
    20
    767
    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.
    • o_lampeundefined
      o_lampe
      last edited by

      FWIW here's the config.g
      config_backup.txt

      ; Configuration file for Fly-F407ZG (firmware version 3)
      ; executed by the firmware on start-up
      ;
      ; generated by RepRapFirmware Configuration Tool v3.3.0-LPC-STM32+01 on Wed Aug 25 2021 14:38:45 GMT+0200 (Mitteleuropäische Sommerzeit)
      
      ; General preferences
      G90                                           ; send absolute coordinates...
      M83                                           ; ...but relative extruder moves
      M550 P"HashPrinter"                           ; set printer name
      
      ; Network
      M552 S1                                       ; enable network
      
      ; Drives
      ;
      ; X | V
      ;---|---
      ; Y | U
      ;
      M569 P0 S1                                    ; physical drive 0 goes forwards using default driver timings
      M569 P1 S0                                    ; physical drive 1 goes forwards using default driver timings
      M569 P2 S1                                    ; physical drive 2 goes forwards using default driver timings
      M569 P3 S0                                    ; physical drive 3 goes forwards using default driver timings
      M569 P4 S1
      M569 P5 S1
      
      M584 X0 Y1 Z2 U3 V4 E5                        ; set drive mapping
      
      M350 X16 Y16 Z16 U16 V16 E16 I1               ; configure microstepping with interpolation
      M92 X200 Y100 Z100 U100 V100 E420             ; set steps per mm
      M566 X900 Y900 Z60 U900 V900 E120             ; set maximum instantaneous speed changes (mm/min)
      M203 X18000 Y18000 Z180 U18000 V18000 E12     ; set maximum speeds (mm/min)
      M201 X5000 Y5000 Z20 U5000 V5000 E250         ; set accelerations (mm/s^2)
      M906 X1200 Y1200 Z800 U1200 V900 E800 I30     ; set motor currents (mA) and motor idle factor in per cent
      M84 S10                                       ; Set idle timeout
      
      ; Axis Limits
      M208 X-185 Y-174 U-100 V-125 Z0 S1            ; set axis minima
      M208 X100 Y90 Z200 U185 V170 S0               ; set axis maxima
      
      ; Endstops defined in homing macros
      ;M574 X2 S1 P"xmax"                           ; configure active-high endstop for high end on X via pin xstop
      ;M574 Y2 S1 P"ymax"                           ; configure active-high endstop for high end on Y via pin ystop
      
      ; Z-Probe
      M558 P0 H5 F120 T6000                         ; disable Z probe but set dive height, probe speed and travel speed
      M557 X-130:130 Y-130:130 S20                  ; define mesh grid
      
      ; Heaters
      M308 S0 P"bedtemp" Y"thermistor" T100000 B4100; configure sensor 0 as thermistor on pin bedtemp
      M950 H0 C"bed" T0                             ; create bed heater output on bed and map it to sensor 0
      M307 H0 B1 S1.00                              ; enable bang-bang mode for the bed heater and set PWM limit
      M140 H0                                       ; map heated bed to heater 0
      M143 H0 S120                                  ; set temperature limit for heater 0 to 120C
      M143 H0 S120                                  ; set temperature limit for heater 0 to 120C
      M308 S1 P"e0temp" Y"thermistor" T100000 B4100 ; configure sensor 1 as thermistor on pin e0temp
      M950 H1 C"e0heat" T1                          ; create nozzle heater output on e0heat and map it to sensor 1
      M307 H1 B0 S1.00                              ; disable bang-bang mode for heater  and set PWM limit
      M143 H1 S280                                  ; set temperature limit for heater 1 to 280C
      
      ; Fans
      M950 F0 C"fan0" Q500                          ; create fan 0 on pin fan0 and set its frequency
      M106 P0 S0 H-1 T65                            ; set fan 0 value. Thermostatic control is turned on
      
      ; Tools
      ;
      ; 1 | 2
      ;---|---
      ; 0 | 3 
      ;
      M563 P0 D0 H1 S"XY" X0 Y1 F0                      ; define tool 0 in bottom left corner
      G10 P0 X18.4 Y18.4 Z0                             ; set tool 0 axis offsets
      G10 P0 R0 S0                                      ; set initial tool 0 active and standby temperatures to 0C
      
      M563 P1 D0 H1 S"XV" X0 Y4 F0                      ; define tool 1 in top left corner
      G10 P1 X18.4 V-18.4 Z0                            ; set tool 1 axis offsets
      G10 P1 R0 S0                                      ; set initial tool 1 active and standby temperatures to 0C 
      
      M563 P2 D0 H1 S"UV" X3 Y4 F0                      ; define tool 2 in top right corner
      G10 P2 U-18.4 V-18.4 Z0                           ; set tool 2 axis offsets
      G10 P2 R0 S0                                      ; set initial tool 2 active and standby temperatures to 0C 
      
      M563 P3 D0 H1 S"UY" X3 Y1 F0                      ; define tool 3 in bottom right corner
      G10 P3 U-18.4 Y18.4 Z0                            ; set tool 3 axis offsets
      G10 P3 R0 S0                                      ; set initial tool 3 active and standby temperatures to 0C 
      
      ; Custom settings are not defined
      
      
      
      gloomyandyundefined 2 Replies Last reply Reply Quote 0
      • gloomyandyundefined
        gloomyandy @o_lampe
        last edited by

        @o_lampe So the error message you are getting is generated when you perform a G1 move with a H1 parameter set (a homing move), but the endstop for that axis has not been set.

        I'm not sure that what you are doing to clear an endstop is correct. It looks like:

        M574 U0
        

        Which sets the endstop for that axis to none, may be the correct way to do this.

        No idea why you get different results depending upon how the commands are run though. Does running the command from a USB terminal make any difference, maybe the error message is not making it through DWC?

        o_lampeundefined 1 Reply Last reply Reply Quote 0
        • gloomyandyundefined
          gloomyandy @o_lampe
          last edited by

          @o_lampe One other thought adding a few M574 commands (with no parameters) which outputs what endstops are set, may provide more idea as to what is going on!

          1 Reply Last reply Reply Quote 1
          • fcwiltundefined
            fcwilt @o_lampe
            last edited by

            @o_lampe said in Difference between G28 and M98"homeall.g"?:

            Q: Is there a difference in sending G28 from the console or starting the homeall.g macro directly?

            One significant difference is that G28 marks the axis/axes as un-homed before executing the code associated with the given axis/axes.

            This can cause code that works with M98 to fail with G28 if the code is trying to move an un-homed axis.

            Frederick

            1 Reply Last reply Reply Quote 2
            • o_lampeundefined
              o_lampe @gloomyandy
              last edited by

              @gloomyandy said in Difference between G28 and M98"homeall.g"?:

              I'm not sure that what you are doing to clear an endstop is correct. It looks like:
              M574 U0

              Which sets the endstop for that axis to none, may be the correct way to do this.

              I think you are right, I'll test it first thing. I thought I had to free the formerly used pin.

              PS: do you know if someone published a mounting case (for 2020 extrusion) for the F407ZG? I couldn't find a drawing which shows the mounting hole pattern...

              o_lampeundefined gloomyandyundefined 2 Replies Last reply Reply Quote 0
              • o_lampeundefined
                o_lampe @o_lampe
                last edited by

                @o_lampe
                PSS: Where can I find more info on the "Z3" endstop, how to attach three switches and such?

                gloomyandyundefined 1 Reply Last reply Reply Quote 0
                • gloomyandyundefined
                  gloomyandy @o_lampe
                  last edited by

                  @o_lampe Sorry no idea about a case (i just have mine on my test bench!), @jay_s_uk may have some suggestions.

                  Freeing things in RRF is a bit messy. This example in the gcode listing:

                  M574 Z0 P"nil" ; no Z endstop switch, free up Z endstop input
                  

                  seems to show that both the type 0 and nil pin are required, but looking at the code I'm not sure that is the case. I'd try just setting it to type 0 and see if that does what you want (I need to check again but I seem to remember that a P parameter may take it down a different code path!).

                  1 Reply Last reply Reply Quote 0
                  • gloomyandyundefined
                    gloomyandy @o_lampe
                    last edited by

                    @o_lampe I didn't know there was a Z3 option, are you sure that is correct, there is the option to specify multiple endstops to match multiple Z motors via separate pins with something like:

                    M574 Z1 S1 P"io2.in+io3.in" ; Z axis with two motors, individual min endstops, active high
                    

                    That is covered a little in the RRF GCode docs.

                    o_lampeundefined 1 Reply Last reply Reply Quote 0
                    • o_lampeundefined
                      o_lampe @gloomyandy
                      last edited by

                      @gloomyandy Hmm, there's Zmin, Zmax and Z3, maybe I have to use them all in the way you described.

                      gloomyandyundefined 1 Reply Last reply Reply Quote 0
                      • gloomyandyundefined
                        gloomyandy @o_lampe
                        last edited by

                        @o_lampe Where have you seen a reference to Z3? I don't see one in the gcode guide and the source code does not seem to have any idea of it, it only has...

                        	noEndStop = 0,
                        	lowEndStop = 1,
                        	highEndStop = 2,
                        
                        o_lampeundefined 1 Reply Last reply Reply Quote 0
                        • o_lampeundefined
                          o_lampe @gloomyandy
                          last edited by

                          @gloomyandy said in Difference between G28 and M98"homeall.g"?:

                          Where have you seen a reference to Z3?

                          That's weird,

                          • I saw it mentioned on mellow fly aliexpress page
                          • there's a Z3 socket onboard
                          • teamgloomys github page mentions it on the pin names page
                          Supports dual Z-axis printers and three Z-axis printers (the motherboard has a dedicated Z3 limit switch interface).
                          

                          z3-pinnames.jpg

                          1 Reply Last reply Reply Quote 0
                          • o_lampeundefined
                            o_lampe
                            last edited by

                            ...back to subject. I found out what caused the error message when calling G28 alone:

                            1. G28 automatically tries to home X,Y and Z even when homeZ is not mentioned in homeall.g.
                              I currently have no Z axis, so there's no endstop defined for Z...
                              I could probably delete or move homez.g or add M574 Z0 in config.g to supress the error message

                            2. deleting an endstop only works with e.g. M574 X0.
                              Adding P"nil" is wrong

                            o_lampeundefined fcwiltundefined 2 Replies Last reply Reply Quote 1
                            • o_lampeundefined
                              o_lampe @o_lampe
                              last edited by

                              @o_lampe said in Difference between G28 and M98"homeall.g"?:

                              I could probably delete or move homez.g or add M574 Z0 in config.g to supress the error message

                              removing/renaming homeZ only led to another error: can't find homeZ.g
                              So I wrote homeZ with these lines:

                              M574 Z0
                              G92 Z0
                              

                              and no error popped up 😁

                              Thanks all who tried to help 👍

                              1 Reply Last reply Reply Quote 1
                              • fcwiltundefined
                                fcwilt @o_lampe
                                last edited by fcwilt

                                This post is deleted!
                                1 Reply Last reply Reply Quote 0
                                • First post
                                  Last post
                                Unless otherwise noted, all forum content is licensed under CC-BY-SA