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

    when will the new Z-height actually be saved?

    Scheduled Pinned Locked Moved
    General Discussion
    6
    45
    2.3k
    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.
    • holco62undefined
      holco62 @fcwilt
      last edited by

      @fcwilt said in when will the new Z-height actually be saved?:

      @holco62 said in when will the new Z-height actually be saved?:

      @jay_s_uk

      It looks that I don't have a start gcode in my System Directory, or I can't find it

      Hi,

      They are talking (I think) about the place in S3D where you can enter gcode to be executed before the start of the print.

      You can also, if you wish, create "start.g" in your system directory and put gcode there - the firmware executes "start.g" at the start of the print.

      Frederick

      Made a start.g directory with a G32 file in it, but for the rest I am lost🤔 Start.G.png

      engikeneerundefined 1 Reply Last reply Reply Quote 0
      • engikeneerundefined
        engikeneer @holco62
        last edited by

        @holco62 he meant create a file called start.g in your duet system directory (/sys folder). In that file, put the line:

        G32 
        

        To answer your other question on the files, please attach your bed.g and homedelta.g files from the system directory (i can see the file names in the screenshot)

        E3D TC with D3Mini and Toolboards.
        Home-built CoreXY, Duet Wifi, Chimera direct drive, 2x BMG, 300x300x300 build volume
        i3 clone with a bunch of mods

        holco62undefined 1 Reply Last reply Reply Quote 0
        • holco62undefined
          holco62 @engikeneer
          last edited by

          @engikeneer said in when will the new Z-height actually be saved?:

          @holco62 he meant create a file called start.g in your duet system directory (/sys folder). In that file, put the line:

          G32 
          

          To answer your other question on the files, please attach your bed.g and homedelta.g files from the system directory (i can see the file names in the screenshot)

          Thanks 🙂

          start.g is working, one thing though, it das the calibration with a gold bed/hotend, is there a way to bring up the temps first?

          The bed.g and the homedelta.g files

          bed.g.png homedelta.g.png

          Phaedruxundefined fcwiltundefined 2 Replies Last reply Reply Quote 0
          • Phaedruxundefined
            Phaedrux Moderator @holco62
            last edited by

            @holco62 said in when will the new Z-height actually be saved?:

            is there a way to bring up the temps first?

            You could add a bed heat up command to the start of your bed.g. something like.

            M140 S60 ; set bed to 60 and continue
            G28 ; home towers
            M116 ; for for tempts to be reached
            G30.... etc ; probe for calibration

            Z-Bot CoreXY Build | Thingiverse Profile

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

              @holco62 said in when will the new Z-height actually be saved?:

              ...is there a way to bring up the temps first?

              Short answer - yes - @Phaedrux has shown a simple approach.

              Long answer - there are several different ways to do all that is needed to start a print.

              For example, instead of putting everything in bed.g you leave just the essential commands there (the commands you already have) and put everything else (setting temps, waiting for temps, etc) in start.g including the G32 to invoke bed.g.

              As you become more comfortable with the firmware there are lots of things possible.

              I'm including my equivalent of "start.g" just to give you an idea of the possibilities BUT I am NOT suggesting that you try to adopt anything I have done at this time.

              There are lots of extra ; characters there that I added because {1} appeared at the start of empty lines when I pasted the code

              ; select tool and configure based on filament selected
              
              T0							; select tool 0 so extruder commands below will work
              M703							; configure selected filament (sets bed/extruder temps, extrusion multiplier)
              
              ; check for selected filament
              
              if move.extruders[0].filament = ""
                M291 R"No Filament Selected" P"Cannot Continue" S2 T0
                abort
              
              ; check bed heater active temp setting
              
              if heat.heaters[0].active = 0 
                M291 R"Bed Heater Active Temp = 0" P"Cannot Continue" S2 T0
                abort
              
              ; check extruder heater active temp setting
              
              if heat.heaters[1].active = 0 
                M291 R"Extruder Heater Active Temp = 0" P"Cannot Continue S2 T0
                abort
              ;
              ; check if homed - allows homing (OK button) or canceling (CLOSE button)
              ;
              if !move.axes[0].homed || !move.axes[1].homed || !move.axes[2].homed
                M291 R"Printer has not been homed" P"Home and Continue?" S3 T0
                G28
              ;
              ; setup to print
              ;
              M291 R"Preparing to print" P"Please wait..." T0
              ;
              M106 P2 S255					; lights on
              M106 P3 S255					; lights on
              M106 P4 S255					; lights on
              ;
              G90						; absolute moves
              G1 Z100     F1200				; position for cleaning
              G1 X0 Y-145 F6000				; position for cleaning
              ;
              M291 R"Heating Extruder/Bed" P"Please wait..." T0
              ;
              M116							; wait for temps to reach set points
              ;
              M291 R"Priming Extruder" P"Please wait..." T0
              ;
              G92 E0							; reset the extruder logical position
              M83							; extruder relative mode
              G1  E10 F120					        ; prime the extruder
              M400							; wait for extruding to finish
              G92 E0							; reset the extruder logical position
              ;
              M98 P"beep_alert_1.g"                                   ; beep paneldue
              ;
              M291 R"Clean Nozzle and Bed" P"Click OK to begin printing" S3 T0
              ;
              M98 P"mesh_comp_map_load.g"		                ; load height map as needed
              ;
              M118 L0 P4 S"FT5|Print begun"
              

              Printers: a E3D MS/TC setup and a RatRig Hybrid. Using Duet 3 hardware running 3.4.6

              holco62undefined 1 Reply Last reply Reply Quote 2
              • holco62undefined
                holco62 @fcwilt
                last edited by

                @fcwilt said in when will the new Z-height actually be saved?:

                @holco62 said in when will the new Z-height actually be saved?:

                ...is there a way to bring up the temps first?

                Short answer - yes - @Phaedrux has shown a simple approach.

                Long answer - there are several different ways to do all that is needed to start a print.

                For example, instead of putting everything in bed.g you leave just the essential commands there (the commands you already have) and put everything else (setting temps, waiting for temps, etc) in start.g including the G32 to invoke bed.g.

                As you become more comfortable with the firmware there are lots of things possible.

                I'm including my equivalent of "start.g" just to give you an idea of the possibilities BUT I am NOT suggesting that you try to adopt anything I have done at this time.

                There are lots of extra ; characters there that I added because {1} appeared at the start of empty lines when I pasted the code

                ; select tool and configure based on filament selected
                
                T0							; select tool 0 so extruder commands below will work
                M703							; configure selected filament (sets bed/extruder temps, extrusion multiplier)
                
                ; check for selected filament
                
                if move.extruders[0].filament = ""
                  M291 R"No Filament Selected" P"Cannot Continue" S2 T0
                  abort
                
                ; check bed heater active temp setting
                
                if heat.heaters[0].active = 0 
                  M291 R"Bed Heater Active Temp = 0" P"Cannot Continue" S2 T0
                  abort
                
                ; check extruder heater active temp setting
                
                if heat.heaters[1].active = 0 
                  M291 R"Extruder Heater Active Temp = 0" P"Cannot Continue S2 T0
                  abort
                ;
                ; check if homed - allows homing (OK button) or canceling (CLOSE button)
                ;
                if !move.axes[0].homed || !move.axes[1].homed || !move.axes[2].homed
                  M291 R"Printer has not been homed" P"Home and Continue?" S3 T0
                  G28
                ;
                ; setup to print
                ;
                M291 R"Preparing to print" P"Please wait..." T0
                ;
                M106 P2 S255					; lights on
                M106 P3 S255					; lights on
                M106 P4 S255					; lights on
                ;
                G90						; absolute moves
                G1 Z100     F1200				; position for cleaning
                G1 X0 Y-145 F6000				; position for cleaning
                ;
                M291 R"Heating Extruder/Bed" P"Please wait..." T0
                ;
                M116							; wait for temps to reach set points
                ;
                M291 R"Priming Extruder" P"Please wait..." T0
                ;
                G92 E0							; reset the extruder logical position
                M83							; extruder relative mode
                G1  E10 F120					        ; prime the extruder
                M400							; wait for extruding to finish
                G92 E0							; reset the extruder logical position
                ;
                M98 P"beep_alert_1.g"                                   ; beep paneldue
                ;
                M291 R"Clean Nozzle and Bed" P"Click OK to begin printing" S3 T0
                ;
                M98 P"mesh_comp_map_load.g"		                ; load height map as needed
                ;
                M118 L0 P4 S"FT5|Print begun"
                

                Thanks, I'll see if I can put something together myself.

                1 Reply Last reply Reply Quote 0
                • holco62undefined
                  holco62
                  last edited by Phaedrux

                  I've tried

                  M109 ; Set Extruder Temperature and Wait

                  M116 ; Wait for tools

                  in the start.g file with as last line

                  G32 ; call bed.g

                  but when I issue a print command generated by Cura the printer directly starts with G32 and after calibration the bed starts to warm up.

                  What am I doing wrong?

                  https://picturepush.com/public/16329875

                  https://www1.picturepush.com/photo/a/16329875/1024/3D-printers/start-g.png

                  Phaedruxundefined 1 Reply Last reply Reply Quote 0
                  • holco62undefined
                    holco62
                    last edited by

                    This post is deleted!
                    1 Reply Last reply Reply Quote 0
                    • Phaedruxundefined
                      Phaedrux Moderator @holco62
                      last edited by Phaedrux

                      @holco62 said in when will the new Z-height actually be saved?:

                      M109 ; Set Extruder Temperature and Wait

                      Have you set a temperature? M109 by itself does nothing. See here for how you would use M109

                      https://duet3d.dozuki.com/Wiki/Gcode?revisionid=HEAD#Section_M109_Set_Extruder_Temperature_and_Wait

                      Z-Bot CoreXY Build | Thingiverse Profile

                      holco62undefined 1 Reply Last reply Reply Quote 0
                      • holco62undefined
                        holco62 @Phaedrux
                        last edited by

                        @Phaedrux
                        Ok, I was under the impression that the Cura slicer controls the temp

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

                          It does, but in start.g Cura has no input yet. Cura can't control anything until the print gcode starts.

                          Start.g happens before any slicer code. You can use it for preparing the printer to receive the print gcode.

                          Heat up, home all, leveling, etc. Then Cura will take over, set the final print temperatures as you've set in the slicer.

                          Z-Bot CoreXY Build | Thingiverse Profile

                          1 Reply Last reply Reply Quote 0
                          • holco62undefined
                            holco62
                            last edited by

                            Ok it starts to get a bit clearer (very small bit 😏 )

                            Btw, how can I prevent the printer from homing after G32?

                            I would like to have this sequence,

                            First manually set bed temp / hotend temp in Duet control

                            Load print command> homing axes> G32> start printing, so no homing after G32.

                            fcwiltundefined holco62undefined 2 Replies Last reply Reply Quote 0
                            • Phaedruxundefined
                              Phaedrux Moderator
                              last edited by

                              Post your Cura start gcode. That's where it would be defined.

                              Technically you don't need to use start.g at all. You could do it all in Cura.

                              M116; Wait
                              G28 ; home printer
                              G32 ; bed.g for leveling

                              Or just use Start.g to preheat. Since it's a progression you can split it up however it makes sense. If you want you can even call a macro file in your slicer start gcode section.

                              Z-Bot CoreXY Build | Thingiverse Profile

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

                                @holco62 said in when will the new Z-height actually be saved?:

                                Ok it starts to get a bit clearer (very small bit 😏 )

                                Btw, how can I prevent the printer from homing after G32?

                                As mentioned start.g executes before any code from the slicer.

                                There are places in the slicer where you can insert you own code which is usually executed shortly after the first slicer generated code. Exactly when depends on the slicer and the slicer settings used.

                                I use S3D and it generates the following code just BEFORE inserting code that I might enter into the slicer. What is shown assumes the temp settings are 60 and 190.

                                G90                      ; absolute XYZ moves
                                M83                      ; relative E moves
                                M106 S0                  ; fan off
                                M140 S60                 ; bed temp to 60
                                M104 S190 T0             ; extruder temp to 190
                                ; my code would appear at this point
                                

                                Frederick

                                Printers: a E3D MS/TC setup and a RatRig Hybrid. Using Duet 3 hardware running 3.4.6

                                1 Reply Last reply Reply Quote 0
                                • holco62undefined
                                  holco62 @holco62
                                  last edited by

                                  @holco62 said in when will the new Z-height actually be saved?:

                                  Ok it starts to get a bit clearer (very small bit 😏 )

                                  Btw, how can I prevent the printer from homing after G32?

                                  I would like to have this sequence,

                                  First manually set bed temp / hotend temp in Duet control

                                  Load print command> homing axes> G32> start printing, so no homing after G32.

                                  Removed the start.g file and added G32 in the Cura exstruder start-g code, everything now works exactly as I want 😎

                                  1 Reply Last reply Reply Quote 1
                                  • holco62undefined
                                    holco62 @Phaedrux
                                    last edited by

                                    @Phaedrux said in when will the new Z-height actually be saved?:

                                    Post your Cura start gcode. That's where it would be defined.

                                    Technically you don't need to use start.g at all. You could do it all in Cura.

                                    M116; Wait
                                    G28 ; home printer
                                    G32 ; bed.g for leveling

                                    Or just use Start.g to preheat. Since it's a progression you can split it up however it makes sense. If you want you can even call a macro file in your slicer start gcode section.

                                    Sorry for quotting myself yesterday 😊 I was supposed to quote you in my penultimate post, but better late than never, you nailed it again so thank you 👍

                                    1 Reply Last reply Reply Quote 0
                                    • holco62undefined
                                      holco62
                                      last edited by

                                      G32 works well in Cura (Extruder Start Gcode), but with the start of a print when all temps have been reached the effector first slowly approaches the bed, just before the nozzle hits the bed, it's homing and then starts the G32 calibration and goes printing.

                                      Is there any way to skip that initial slowly going to the bed?

                                      I am also curious if other changes / settings are needed with regard to Cura 4.8 which I have now set as a standard Anycubic Predator, especially stringing (PLA) gives me a hard time to get it right with a Mosquito hotend.

                                      I shot a short video of it

                                      https://youtu.be/cFRNCrjWwww

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

                                        Everything it does at the start of the print is dictated by the slicer start gcode. Can you copy and paste the first 50 lines or so of a slicer gcode file? Also include your current homedelta, bed.g and config.g so we can see exactly what's going on and can tell you what needs to change.

                                        Z-Bot CoreXY Build | Thingiverse Profile

                                        1 Reply Last reply Reply Quote 0
                                        • holco62undefined
                                          holco62
                                          last edited by

                                          Cura doesn't let me copy the start G-code, so I took 2 pictures

                                          Start G-code-1.png

                                          Start G-code-2.png

                                          I'll post the rest in a moment

                                          1 Reply Last reply Reply Quote 0
                                          • holco62undefined
                                            holco62
                                            last edited by

                                            homedelta (1).g bed (1).g config (1).g

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