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

    2nd print too high and z-offset is inconsistent,config problem?

    Scheduled Pinned Locked Moved
    Tuning and tweaking
    4
    21
    915
    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 @lui2004
      last edited by

      Your homeall.g:

      M558 F600 A1 		; Dive fast once
      G30			; probe Z
      M558 F100 A10 		; Slow second dive with more accuracy
      G30			; probe z again
      

      Adding G31 from config.g:

      M558 F600 A1 		; Dive fast once
      G31 P500 X-52 Y0 Z0.689 C0.0010 S20 H5                 ; set Z probe trigger value, offset and trigger height
      G30			; probe Z
      M558 F100 A10 		; Slow second dive with more accuracy
      G31 P500 X-52 Y0 Z0.689 C0.0010 S20 H5                 ; set Z probe trigger value, offset and trigger height
      G30			; probe z again
      

      I'd also outcomment the M913 current reduction

      lui2004undefined 1 Reply Last reply Reply Quote 0
      • lui2004undefined
        lui2004 @o_lampe
        last edited by lui2004

        @o_lampe

        rest of config looks good ?

        ok,now it looks like this:

        homeall.g

        ; homeall.g
        ; called to home all axes
        ;
        ; generated by RepRapFirmware Configuration Tool v3.3.4 on Thu Oct 14 2021 05:57:31 GMT+0200 (Mitteleuropäische Sommerzeit)
        ;M913 X35 Y35 Z35	    ; Reduce motor currents for homing
        G91                     ; relative positioning
        G1 H2 Z5 F6000          ; lift Z relative to current position
        G1 H1 X 240 F3000 ; move quickly to X axis endstop and stop there (first pass)
        G1 H1 Y 240 F3000 ; move quickly to Y axis endstop and stop there (first pass)
        G1 H2 X-5 Y-5 F6000       ; go back a few mm
        G90                     ; absolute positioning
        
        G1 X162 Y110 F2000 ; put head over the centre of the bed, or wherever you want to probeG30                     ; home Z by probing the bed
        M558 F600 A1 		; Dive fast once
        G31 P500 X-52 Y0 Z0.689 C0.0010 S20 H5                 ; set Z probe trigger value, offset and trigger height
        G30			; probe Z
        M558 F100 A10 		; Slow second dive with more accuracy
        G31 P500 X-52 Y0 Z0.689 C0.0010 S20 H5                 ; set Z probe trigger value, offset and trigger height
        G30			; probe z again
        G29 S1			; Load heightmap and enable mesh grid compensation
        G1 X235 Y235 Z10 F6000	; return head to park position
        M913 X100 Y100 Z100	; Return motor currents to normal
        
        ; Uncomment the following lines to lift Z after probing
        ;G91                    ; relative positioning
        ;G1 Z5 F100             ; lift Z relative to current position
        ;G90                    ; absolute positioning
        
        1 Reply Last reply Reply Quote 0
        • lui2004undefined
          lui2004
          last edited by

          I use Prusaslicer
          can you check my Start G-Code and End Gcode,please ?

          Start G-Code:

          T0
          G28 XY ;Home XY
          M561 ; Clear any bed transform that might be in place
          G1 X162 Y110  ; Move Probe to middle of bed
          G30 ; Do a single probe
          G29 S1 ; Load my custom heightmap. Otherwise use G29 S1
          G92 E0 ;Reset Extruder
          G1 Z2.0 F3000 ;Move Z Axis up
          M104 S[first_layer_temperature] ; set final nozzle print temp
          M109 S[first_layer_temperature] ; wait for the nozzle to heat up
          G1 X10.1 Y20 Z0.28 F5000.0 ;Move to start position
          G1 X10.1 Y200.0 Z0.28 F1500.0 E15 ;Draw the first line
          G1 X10.4 Y200.0 Z0.28 F5000.0 ;Move to side a little
          G1 X10.4 Y20 Z0.28 F1500.0 E30 ;Draw the second line
          G92 E0 ;Reset Extruder
          

          End G-Code:

          M106 S0 ; turn off cooling fan
          M104 S0 ; turn off extruder
          M140 S0 ; turn off bed
          G91 ; set to relative positioning
          G1 Z5 ; raise Z 5 mm
          G90 ; set to absolute positioning
          G1 X235 Y235 ; park at X0 Y0
          M84 ; disable motors
          
          
          cosmowaveundefined o_lampeundefined 2 Replies Last reply Reply Quote 0
          • cosmowaveundefined
            cosmowave @lui2004
            last edited by

            @lui2004 your end code is not really nice if you print an object near zmax! So the z axle can't raise 5mm.

            I have the following code in stop.g

            G91								; relative positioning
            if {move.axes[2].userPosition +5} < move.axes[2].max		; possible to move z+5 ?
            	G0 Z+5							; move z 5mm away from nozzle
            else 
            	G0 Z+{move.axes[2].max - move.axes[2].userPosition}	; move z to the max possible position
            

            It moves the z axle 5mm if it is possible.
            If not, it moves to zmax.

            Mankati FSXT+, DeltaTowerV2, E3D MS/TC

            lui2004undefined 1 Reply Last reply Reply Quote 0
            • lui2004undefined
              lui2004 @cosmowave
              last edited by

              @cosmowave said in 1st print perfect,2nd print too high,config problem ?:

              G91 ; relative positioning if {move.axes[2].userPosition +5} < move.axes[2].max ; possible to move z+5 ? G0 Z+5 ; move z 5mm away from nozzle else G0 Z+{move.axes[2].max - move.axes[2].userPosition} ; move z to the max possible position

              ok iadd this code in my Duet Stop.g
              do i need to change something in my End G-Code ?

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

                @lui2004 In your start code, you only home XY (G28 XY) Now that we have changed homeall.g, you can replace it with a simple G28.
                New start code:

                T0
                M561 ; Clear any bed transform that might be in place
                G28  ;Home all
                G29 S1 ; Load my custom heightmap. Otherwise use G29 S1
                ... ; rest is OK
                
                1 Reply Last reply Reply Quote 0
                • cosmowaveundefined
                  cosmowave @lui2004
                  last edited by

                  @lui2004 you should insert my code in your end code (at the position where you raise the z axle), not in stop.g. Because you disable the motors in your end code.
                  Stop.g will be called afterwards, and with disabled motors it will be not possible to move z!

                  e.g. your modified end code:

                  M106 S0 ; turn off cooling fan
                  M104 S0 ; turn off extruder
                  M140 S0 ; turn off bed
                  G91	; relative positioning
                  if {move.axes[2].userPosition +5} < move.axes[2].max; possible to move z+5 ?
                  	G0 Z+5; move z 5mm away from nozzle
                  else 
                  	G0 Z+{move.axes[2].max - move.axes[2].userPosition}; move z to the max possible position
                  G90 ; set to absolute positioning
                  G1 X235 Y235 ; park at X0 Y0
                  M84 ; disable motors
                  

                  Mankati FSXT+, DeltaTowerV2, E3D MS/TC

                  lui2004undefined 1 Reply Last reply Reply Quote 0
                  • lui2004undefined
                    lui2004 @cosmowave
                    last edited by

                    @cosmowave said in 1st print perfect,2nd print too high,config problem ?:

                    M106 S0 ; turn off cooling fan M104 S0 ; turn off extruder M140 S0 ; turn off bed G91 ; relative positioning if {move.axes[2].userPosition +5} < move.axes[2].max; possible to move z+5 ? G0 Z+5; move z 5mm away from nozzle else G0 Z+{move.axes[2].max - move.axes[2].userPosition}; move z to the max possible position G90 ; set to absolute positioning G1 X235 Y235 ; park at X0 Y0 M84 ; disable motors

                    i got this error from prusaslicer:

                    G-code export to C:\Users\Lfna\AppData\Local\Temp\.2324.gcode failed due to invalid custom G-code sections:
                    end_gcode
                    Parsing error at line 5: Not a variable name
                    if {move.axes[2].userPosition +5} < move.axes[2].max; possible to move z+5 ?
                        ^
                    Please inspect the file C:\Users\Lfna\AppData\Local\Temp\.2324.gcode.tmp for error messages enclosed between
                            !!!!! Failed to process the custom G-code template ...
                    and
                            !!!!! End of an error report for the custom G-code template ...
                    for all macro processing errors.
                    
                    cosmowaveundefined 1 Reply Last reply Reply Quote 0
                    • cosmowaveundefined
                      cosmowave @lui2004
                      last edited by

                      @lui2004 ok, then it could be, that this code is not allowed in prusa slicer.
                      I use it in stop.g, so it's slicer independent....
                      Sorry for that!

                      Mankati FSXT+, DeltaTowerV2, E3D MS/TC

                      lui2004undefined 1 Reply Last reply Reply Quote 0
                      • lui2004undefined
                        lui2004 @cosmowave
                        last edited by

                        @cosmowave

                        no problem !

                        now i have follow problem, my z-offset shows me different z-offsets:
                        whats going wrong here ?

                        Stopped at height 0.709 mm
                        Stopped at height 0.729 mm
                        Stopped at height 0.739 mm
                        Stopped at height 0.756 mm
                        Stopped at height 0.697 mm
                        Stopped at height 0.696 mm
                        Stopped at height 0.697 mm
                        
                        1 Reply Last reply Reply Quote 0
                        • lui2004undefined
                          lui2004
                          last edited by

                          Morning

                          the problem with the second preresist,the second print is always too high

                          i must shutdown the printer and then is all fine and the second print is again high

                          i dont know why

                          cosmowaveundefined 1 Reply Last reply Reply Quote 0
                          • cosmowaveundefined
                            cosmowave @lui2004
                            last edited by

                            @lui2004 About this i can't say much. I don't use a z-probe...
                            Do you use babystepping during the first print?

                            Can you please post your startcodes once again?

                            Mankati FSXT+, DeltaTowerV2, E3D MS/TC

                            lui2004undefined 1 Reply Last reply Reply Quote 0
                            • lui2004undefined
                              lui2004 @cosmowave
                              last edited by

                              @cosmowave

                              no, i dont use babystep for the first print ,its all fine

                              prusa slicer start g-code:

                              T0
                              G28 XY ;Home XY
                              M561 ; Clear any bed transform that might be in place
                              G1 X162 Y110  ; Move Probe to middle of bed
                              G30 ; Do a single probe
                              G29 S1 ; Load my custom heightmap. Otherwise use G29 S1
                              G92 E0 ;Reset Extruder
                              G1 Z2.0 F3000 ;Move Z Axis up
                              M104 S[first_layer_temperature] ; set final nozzle print temp
                              M109 S[first_layer_temperature] ; wait for the nozzle to heat up
                              G1 X10.1 Y20 Z0.28 F5000.0 ;Move to start position
                              G1 X10.1 Y200.0 Z0.28 F1500.0 E15 ;Draw the first line
                              G1 X10.4 Y200.0 Z0.28 F5000.0 ;Move to side a little
                              G1 X10.4 Y20 Z0.28 F1500.0 E30 ;Draw the second line
                              G92 E0 ;Reset Extruder
                              

                              end g-code:

                              M106 S0 ; turn off cooling fan
                              M104 S0 ; turn off extruder
                              M140 S0 ; turn off bed
                              G91 ; set to relative positioning
                              G1 Z5 ; raise Z 5 mm
                              G90 ; set to absolute positioning
                              G1 X235 Y235 ; park at X0 Y0
                              M84 ; disable motors
                              
                              cosmowaveundefined 1 Reply Last reply Reply Quote 0
                              • cosmowaveundefined
                                cosmowave @lui2004
                                last edited by

                                @lui2004 And when you use a startcode like @o_lampe said in his post (without G30)?

                                T0
                                M561 ; Clear any bed transform that might be in place
                                G28  ;Home all
                                G29 S1 ; Load my custom heightmap. Otherwise use G29 S1
                                ...
                                

                                Mankati FSXT+, DeltaTowerV2, E3D MS/TC

                                lui2004undefined o_lampeundefined 2 Replies Last reply Reply Quote 0
                                • lui2004undefined
                                  lui2004 @cosmowave
                                  last edited by

                                  @cosmowave

                                  i dont have tested!

                                  i will test it after work

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

                                    @cosmowave @lui2004
                                    The start code in my slicer is always empty. Also my homeall.g only calls homeX, homeY, homeZ.
                                    I want only one file, I have to edit.

                                    My guess is, you G30-probe the bed after the heightmap is loaded, which changes the Z-height

                                    lui2004undefined 1 Reply Last reply Reply Quote 0
                                    • lui2004undefined
                                      lui2004 @o_lampe
                                      last edited by

                                      @o_lampe
                                      Thanks ,i will test it after work

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

                                        @o_lampe said in 2nd print too high and z-offset is inconsistent,config problem?:

                                        I also repeat the G31 line everytime I change M558. I'm afraid it'll use default values instead, if I don't. (paranoid?)

                                        Definitely paranoid. The G31 restatement is unneeded.

                                        @cosmowave said in 2nd print too high and z-offset is inconsistent,config problem?:

                                        your end code is not really nice if you print an object near zmax! So the z axle can't raise 5mm.
                                        It moves the z axle 5mm if it is possible.
                                        If not, it moves to zmax.

                                        Also unnecessary. If the axis limits are set correctly, the firmware won't allow it to go beyond z max anyway, so a relative move close to the z limit would stop at zmax regardless. No need for conditional gcode there.

                                        @lui2004 Did you end up figuring out your problem with the second print start?

                                        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