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

    2nd print problem

    Scheduled Pinned Locked Moved
    General Discussion
    5
    12
    316
    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.
    • Chrissundefined
      Chriss
      last edited by

      Hi,

      I migrated my "End G-Code" and "Start G-Code" from the slicer to the "start.g" and "stop.g". But I have a problem with the 2nd print now. (Same g-code file) The printer zHome, levels the bed, heats up the bed, set the temperature but do not turn on the heater. So the extruder tries cold extrusion which is obviously not wanted. What do I do wrong here?

      (I had a M98 P"0:/sys/start.g" in the start gcode. but that resulted in a "double home" etc, so I think it works at all.)

      Start g code in the slicer:

      ; Nothing here
      

      Stop g-code

      ; End print here, that will call stop.g
      M0
      

      start.g

      ; Turn on LED
      M106 P3 S255
      
      G28	; Home
      G1 Z15 F5000 ; lift nozzle
      
      G29 S1	; Load the height map
      

      stop.g

      M400		; Finish move queue
      
      ;Retract the filament
      G92 E1
      G1 E-0.5 F300
      G92 E2
      G1 E-0.5 F300
      
      ;M106 S255	; Fan at 100 to cool nozzle and bed
      G91			; Relative positioning
      M220 S100	; Set speed factor back to 100% in case it was changed
      M221 S100	; Set extrusion factor back to 100% in case it was changed
      G1 Z15		; raise nozzle 15mm from printed part
      G90             ; Absolute position
      G1 Y255 F3000	; Bring the Bed to the front
      
      M106 P3 S0	; Turn LED off
      

      The gcode file starts with

      M107
      M190 S75 ; set bed temperature and wait for it to be reached
      G10 S225 ; set temperature
      ;TYPE:Custom
      ;M98 P"0:/sys/start.g"
      G10 S225 ; set temperature
      M116 ; wait for temperature to be reached
      G21 ; set units to millimeters
      G90 ; use absolute coordinates
      M82 ; use absolute distances for extrusion
      G92 E0
      ; Filament gcode
      ;LAYER_CHANGE
      ;Z:0.21
      ;HEIGHT:0.21
      G1 Z0.210 F7800.000
      ; Turn LED down if layer = 5
      
      ; Turn LED off if layer = 10
      
      G1 E-2.00000 F2400.000
      G92 E0
      G1 X66.121 Y82.954 F7800.000
      G1 E2.00000 F2400.000
      ;TYPE:Skirt
      ;WIDTH:0.42
      G1 F1800.000
      G1 X67.158 Y82.235 E2.03964
      G1 X67.995 Y81.802 E2.06926
      G1 X68.874 Y81.462 E2.09889
      

      And ends with:

      ;WIDTH:0.471686
      G1 F1200.000
      G1 X72.703 Y90.715 E2.03106
      G1 X72.788 Y91.336 F7800.000
      ;WIDTH:0.685842
      G1 F1200.000
      G1 X72.788 Y94.363 E2.18638
      G1 X72.441 Y94.715 F7800.000
      G1 F1200.000
      G1 X69.467 Y94.715 E2.33902
      G1 E0.33902 F2400.000
      G92 E0
      M107
      ;TYPE:Custom
      ; Filament-specific end gcode 
      ;END gcode for filament
      ; End print here, that will call stop.g
      M0
      

      I do not get the reason that the heater is "off" and them temp is correct at the 2nd print.

      Cheers, Chriss

      DIY-O-Sphereundefined Stephen6309undefined 2 Replies Last reply Reply Quote 0
      • DIY-O-Sphereundefined
        DIY-O-Sphere @Chriss
        last edited by

        @Chriss
        I guess you need a tool select in your start.g

        (UTC+1)

        Chrissundefined 1 Reply Last reply Reply Quote 0
        • Chrissundefined
          Chriss @DIY-O-Sphere
          last edited by

          @DIY-O-Sphere

          I'm not sure, I select the T0 in my config.g and I do not change the tool afterwards. (At least not yet.)

          And the tools seems to be selected because I see that the "active" temp is changed.

          Cheers, Chriss

          DIY-O-Sphereundefined 1 Reply Last reply Reply Quote 0
          • DIY-O-Sphereundefined
            DIY-O-Sphere @Chriss
            last edited by DIY-O-Sphere

            @Chriss
            Yes but I think M0 is deactivating the tool
            Edir:
            The config.g is only read once at boot

            (UTC+1)

            Chrissundefined 1 Reply Last reply Reply Quote 0
            • Chrissundefined
              Chriss @DIY-O-Sphere
              last edited by Chriss

              @DIY-O-Sphere

              Yep, that is clear that the config.g is parsed at boot only. So there is no way that I do not have no tool selected when I have a "T0" in the config.g. And as I wrote: The T0 tries to cold extrude. How can you cold extrude at a tool if you have no tool selected?

              Chrissundefined 1 Reply Last reply Reply Quote 0
              • Chrissundefined
                Chriss @Chriss
                last edited by

                @Chriss said in 2nd print problem:

                @DIY-O-Sphere

                Yep, that is clear that the config.g is parsed at boot only. So there is no way that I do not have no tool selected when I have a "T0" in the config.g. And as I wrote: The T0 tries to cold extrude. How can you cold extrude at a tool if you have no tool selected?

                Edit complained that I did not read your mail carefully enough. The M0 does not deselect the tool. It turns the heater off:

                If no H1 parameter is present, the heaters are turned off too. 
                

                🤦

                I need to change the start.g to turn the heat back on. I will test that....

                Cheers, Chriss

                Chrissundefined 1 Reply Last reply Reply Quote 0
                • Chrissundefined
                  Chriss @Chriss
                  last edited by

                  @Chriss

                  🤦 🤦 🤦 🤦 You where absolutely right. I added a "T0" to the start.g and it seems to work now. I have to test that in one or two other conditions but I think that this did it.
                  But this behavior is not fully logical to me or I did not understood the docu correctly:
                  https://duet3d.dozuki.com/Wiki/Gcode#Section_M0_Stop_or_Unconditional_stop

                  The bulletpoint 4 tells me that it turns the heater off. In my world would the "G10 S225" also turn on the heater. I know that there is a other command for that but Prusa does what Prusa does.

                  Cheers, Chriss

                  fcwiltundefined Phaedruxundefined 2 Replies Last reply Reply Quote 1
                  • fcwiltundefined
                    fcwilt @Chriss
                    last edited by

                    @Chriss

                    One potential problem with using start.g as opposed to using M98 in the slicer is that start.g happens before any slicer code whereas the M98 invoked code happens later.

                    How much later depends on the slicer in use and certain slicer settings.

                    For my slicer I cannot use start.g because the commands I wish to execute get overridden by slicer generated code. Using M98 works because the slicer happens to execute the M98 after those same commands so my commands override the slicer commands - which works fine.

                    Frederick

                    Printers: a small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

                    Chrissundefined 1 Reply Last reply Reply Quote 0
                    • Chrissundefined
                      Chriss @fcwilt
                      last edited by

                      @fcwilt

                      Yes, that was the reason that I posted the head of the g-code:

                      M107
                      M190 S75 ; set bed temperature and wait for it to be reached
                      G10 S225 ; set temperature
                      ;TYPE:Custom
                      ;M98 P"0:/sys/start.g"
                      G10 S225 ; set temperature
                      M116 ; wait for temperature to be reached
                      G21 ; set units to millimeters
                      G90 ; use absolute coordinates
                      M82 ; use absolute distances for extrusion
                      G92 E0
                      

                      You can see the two lines which start with ";", that is the "start gcode" in the slicer. Well, the two "G10" around the start g-code is a bit confusing but PS does what PS does. 😉 The start.g comes before all of that. Anyway, the observed behavior is gone but it is still not logical to me. My understanding was that you can not "deselect" a tool. But exactly that seems to happen with "M0". :?

                      Cheers, Chriss

                      1 Reply Last reply Reply Quote 1
                      • Stephen6309undefined
                        Stephen6309 @Chriss
                        last edited by

                        @Chriss This may help. This is what I use in the start gcode in PrusaSlicer:
                        T-1 ; deselect current tool
                        M98 P"/macros/PLAOffset" ; set z probe offsets
                        G10 P0 S[first_layer_temperature] R140 ; set T0 temps
                        M190 S[first_layer_bed_temperature] ; heat up bed
                        G28 ; home all axes
                        G32 ; bed calibration
                        T0 ; select T0 and heat to active temp
                        M116 ; wait for temp on T0
                        G1 E10 ; extrude a bit

                        Config.g has a T0 at the ends of the file.
                        Macro PLAOffset contains the G31 settings.

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

                          Depending on what you want to do you may need to use start.g as well as the slicer start gcode section and even call a separate macro with M98.

                          Z-Bot CoreXY Build | Thingiverse Profile

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

                            @Chriss said in 2nd print problem:

                            The bulletpoint 4 tells me that it turns the heater off. In my world would the "G10 S225" also turn on the heater.

                            In this case the heaters being off means the tool is deselected. G10 S225 will only set the temperature, but won't activate any tools. So yes you need T0 in your start.g to re-select the tool, at which point any temperatures that have been set will begin to heat.

                            Z-Bot CoreXY Build | Thingiverse Profile

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