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

    Where do you put your start-/end- and toolchchange-gcodes?

    Scheduled Pinned Locked Moved
    General Discussion
    slicer gcode
    4
    5
    511
    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.
    • justus2342undefined
      justus2342
      last edited by justus2342

      Hello everyone,

      to my knowledge there are two distinct ways with duet-boards to have the right start/stop/toolchange gcodes in place.

      • Have a neat printer profile in your slicer and do everything there
      • Have all needed gcodes on the printer within the start/stop/etc. macros, just send actual printing gcode to the printer

      Of course those two options can (must?) be mixed. For Example heating commands and speed/acceleration settings in slicer gcode, the rest (homing, wipe moves, bed probing) in macros.

      I would like to know: What way do you do it and why?

      Tevo Little Monster (Duet2, Smart Effector, lin Rails, Magb. Arms)
      Anycubic Delta Linear Plus (Duet2, Smart Effector, Magb. Arms)
      Two Trees Sapphire Pro (MKS Robin, Marlin 2.x, D. Extruder)

      deckingmanundefined 1 Reply Last reply Reply Quote 0
      • deckingmanundefined
        deckingman @justus2342
        last edited by

        @justus2342 My personal preference is not to use the slicer for anything other than the necessary move commands. Everything else is done via macros which are called by the slicer start and end gcode. The reasons why I do it that way is that, firstly it gives better control over the order that things happen, and secondly I can "re-use" the same gcode file for different filaments, simply by changing which macro gets called from the start gcode.

        By way of explanation, my "PrePrint" macro starts to heat the bed and waits for it to reach a pre-defined temperature of say 40 deg C. Once that temperatures is reached, the bed temperature continues to heat to (say) 60 deg C but this time it does not wait. While that final heating phase is happening, I home all the axis and that in itself start to heat the nozzle because I use the nozzle as a probe for Z homing. Once homing is completed, the nozzle is then moved to a "purge bucket" and then it waits the final few seconds for all temperatures to attain their set points. After which, the nozzle is wiped and printing commences. The net result is that everything happens in the time it takes to heat the bed (it's a big thick, build plate whereas using the slicer means a lot of waiting for one thing to finish before the next thing can start and/or the hot end gets heated too early and filament "cooks" before printing starts.

        Ian
        https://somei3deas.wordpress.com/
        https://www.youtube.com/@deckingman

        justus2342undefined 1 Reply Last reply Reply Quote 0
        • baird1faundefined
          baird1fa
          last edited by

          I do a similar thing as @deckingman but I do it in my starting script. I start to heat the bed as a first step, then home everything, then probe the bed, then start heating the nozzle, then wait for the bed and nozzle to reach temp.

          I use a macro call in my ending script to slowly cool things down. Where this is nice is you can edit a macro while printing before it is called if needed. For instance if I need to change the cooling parameters I can do it while the part is printing rather than needing to remember to do it in the slicer.

          The macro idea sounds interesting for the starting script and I may go that route as I become more familiar with my printer and the RRF. Start with why you are comfortable with.

          1 Reply Last reply Reply Quote 0
          • justus2342undefined
            justus2342 @deckingman
            last edited by

            @deckingman That really sounds good. There are still two things I do not entirely understand.

            • You said you can reuse the same gcode for other filament. That might work for temperature quite well. But isn't speed and acceleration set in many many lines in the actual printing gcode? Is there any way to keep this variable and settable by a macro?
            • In my experience (SlicerPE and Cura) there is some bad behavior concerning the start/end/toolchange-gcode. For example if you don't set temperature in the start-gcode, the slicer will create some kind of minimalistic start gcode including this. That especially bugs me with the tool change gcode in SlicerPE. How do you deal with things like this?

            Tevo Little Monster (Duet2, Smart Effector, lin Rails, Magb. Arms)
            Anycubic Delta Linear Plus (Duet2, Smart Effector, Magb. Arms)
            Two Trees Sapphire Pro (MKS Robin, Marlin 2.x, D. Extruder)

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

              Hi,

              The only thing that exists in the slicer related to starting/ending a print are calls to macros

              • print_begin.g
              • print_end.g
              ; ----- print_begin.g -----
              ;
              ; must occur after...
              ; - all axes have been homed
              
              M106 P2 S255                                    ; lights on
              M106 P6 S255                                    ; lights on
              M106 P7 S255                                    ; lights on
              
              G90                                             ; absolute moves
              G1 Z75      F1200                               ; position for cleaning
              G1 X0 Y-145 F6000                               ; position for cleaning
              
              T0                                              ; select tool 0 so extruder commands below will work
              M703                                            ; configure selected filament (sets temp set points)
              
              M291 R"Waiting on heaters to reach set points..." T0
              
              M116                                            ; wait for temps to reach set points
              
              M291 R"Priming extruder..." T0
              
              G92 E0                                          ; reset the extruder logical position
              M83                                             ; extruder relative mode
              G1  E10 F120                                    ; prime the extruder
              G92 E0                                          ; reset the extruder logical position
              M400                                            ; wait for extruding to finish
              
              M291 R"Clean Nozzle and Bed" P"Click OK when ready to print" S3
              
              M98 P"configprobe.g"                            ; configure Z probe
              
              M98 P"probeZ.g"                                 ; set Z=0 datum
              
              G29 S1                                          ; load height map
              
              M291 R"Starting to print..." T1
              
              

              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
              • First post
                Last post
              Unless otherwise noted, all forum content is licensed under CC-BY-SA