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

    Only probe where the part will be printed

    Scheduled Pinned Locked Moved
    General Discussion
    8
    51
    3.6k
    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.
    • RatRig0331undefined
      RatRig0331 @OwenD
      last edited by

      @owend how do you call that macro in your main config.g, and where in prusa slicer do you add the other macro?

      1 Reply Last reply Reply Quote 0
      • RatRig0331undefined
        RatRig0331 @OwenD
        last edited by

        @owend I think I figured it out but I’m getting a error massage: unknown variable ‘global.minprobex’

        OwenDundefined 1 Reply Last reply Reply Quote 0
        • OwenDundefined
          OwenD @RatRig0331
          last edited by

          @ratrig0331
          You need to put this line in config.g in place of your normal M557

          M98 P"0:/sys/setDefaultProbePoints.g"

          Then set all your default probe settings in the areas at the start of the macro.

          In superslicer put all the code provided in your start gcode

          1 Reply Last reply Reply Quote 0
          • dc42undefined
            dc42 administrators @OwenD
            last edited by dc42

            @owend said in Only probe where the part will be printed:

            set global.minProbeX = {first_layer_print_min[0]} 
            set global.maxProbeX = {first_layer_print_max[0]} 
            set global.minProbeY = {first_layer_print_min[1]} 
            set global.maxProbeY = {first_layer_print_max[1]}
            T[current_extruder] ; select tool
            M568 P[current_extruder] R{"{heat.coldExtrudeTemperature+5}"} S[first_layer_temperature_0] A1 ; (set extruder to stanby to soften any protruding filament before probing )
            M106 P[current_extruder] S0 ;Start with fan off    
            

            You appear to be using a mixture of { } and [ ] to surround named values that you want PrusaSlicer to substitute for. Which is correct?

            Duet WiFi hardware designer and firmware engineer
            Please do not ask me for Duet support via PM or email, use the forum
            http://www.escher3d.com, https://miscsolutions.wordpress.com

            OwenDundefined 1 Reply Last reply Reply Quote 0
            • OwenDundefined
              OwenD @dc42
              last edited by OwenD

              @dc42
              The square brackets are legacy place holders, so should probably be replaced by curly brackets.
              I just tried changing them all to curly brackets.
              However in Superslicer at least, [first_layer_temperature_0] only seems to work with a square bracket.

              EDIT
              It seems things like [first_layer_temperature_0] have been replaced by {first_layer_temperature[0]}

              I've revised the start Gcode related to probing to this (there are of course other commands need in the start code)

              set global.minProbeX = {first_layer_print_min[0]}
              set global.maxProbeX = {first_layer_print_max[0]}
              set global.minProbeY = {first_layer_print_min[1]}
              set global.maxProbeY = {first_layer_print_max[1]}
              T{current_extruder} ; select tool 1
              M568 P{current_extruder} R{"{heat.coldExtrudeTemperature+5}"} S{first_layer_temperature[current_extruder]} A1 ; (set extruder to stanby to soften any protruding filament before probing )
              M106 P{current_extruder} S0 ;Start with fan off
              M140 S{first_layer_bed_temperature[current_extruder]}  R{bed_temperature[0]-20}; Set fast bed temp & standby - Standby is 20 degrees less than normal.
              M116 ; Wait for bed before doing mesh probe.
              M561 ; clear any bed transform
              G29 ; do mesh for printed area
              G29 S1  ; load small mesh
              G01 X0 Y{"{move.axes{1}.max}"} Z0.6  F1500 ; Move to back corner while heating
              M568 P{current_extruder} R{"{heat.coldExtrudeTemperature+5}"} S{first_layer_temperature[current_extruder]} A2 ; (set standby and active temperatures for active tool.  Standby is 5 degrees above cold extrude temp )
              M116 ; Wait for all temps to stabilise
              
              RatRig0331undefined 1 Reply Last reply Reply Quote 0
              • RatRig0331undefined
                RatRig0331 @OwenD
                last edited by

                @owend when I restart I get this

                Error: (sensors.probes[0].offsets[0] + var.SafeZone)array index out of bounds of setDefaultProbePoints.g

                And if I try to start a print I get this

                Error: unknown variable 'global.minProbeX'

                dc42undefined OwenDundefined 2 Replies Last reply Reply Quote 0
                • dc42undefined
                  dc42 administrators @RatRig0331
                  last edited by

                  @ratrig0331 have you opened the GCode file in a text editor, to see what the slicer has actually generated?

                  Duet WiFi hardware designer and firmware engineer
                  Please do not ask me for Duet support via PM or email, use the forum
                  http://www.escher3d.com, https://miscsolutions.wordpress.com

                  RatRig0331undefined 2 Replies Last reply Reply Quote 0
                  • RatRig0331undefined
                    RatRig0331 @dc42
                    last edited by

                    @dc42 not yet I’ll take a look

                    1 Reply Last reply Reply Quote 0
                    • RatRig0331undefined
                      RatRig0331 @dc42
                      last edited by

                      @dc42 it looks like its all there in the gcode

                      ; external perimeters extrusion width = 0.40mm
                      ; perimeters extrusion width = 0.40mm
                      ; infill extrusion width = 0.40mm
                      ; solid infill extrusion width = 0.40mm
                      ; top infill extrusion width = 0.40mm
                      ; first layer extrusion width = 0.45mm

                      M73 P0 R8
                      M107
                      M104 S205 ; set temperature
                      ;TYPE:Custom
                      set global.minProbeX = 183.982
                      set global.maxProbeX = 316.018
                      set global.minProbeY = 188.982
                      set global.maxProbeY = 311.018
                      T0 ; select tool 1
                      M568 P0 R{heat.coldExtrudeTemperature+5} S205 A1 ; (set extruder to stanby to soften any protruding filament before probing )
                      M106 P0 S0 ;Start with fan off
                      M140 S68 R45; Set fast bed temp & standby - Standby is 20 degrees less than normal.
                      M116 ; Wait for bed before doing mesh probe.
                      M561 ; clear any bed transform
                      G29 ; do mesh for printed area
                      G29 S1 ; load small mesh
                      G01 X0 Y{move.axes{1}.max} Z0.6 F1500 ; Move to back corner while heating
                      M568 P0 R{heat.coldExtrudeTemperature+5} S205 A2 ; (set standby and active temperatures for active tool. Standby is 5 degrees above cold extrude temp )
                      M116 ; Wait for all temps to stabilise
                      M109 S205 ; set temperature and wait for it to be reached
                      G21 ; set units to millimeters
                      G90 ; use absolute coordinates
                      M83 ; use relative distances for extrusion
                      ; Filament gcode
                      SET_GCODE_OFFSET Z=0
                      SET_PRESSURE_ADVANCE ADVANCE=0.05
                      M107
                      ;LAYER_CHANGE
                      ;Z:0.2
                      ;HEIGHT:0.2
                      ;BEFORE_LAYER_CHANGE
                      ;0.2
                      G92 E0
                      ;

                      this is what i changed in the mesh.g for my 500x500mm xycore

                      ;0:/sys/mesh.g
                      ; run when G29 with no paramters is called.
                      ; if this file not found G29 S0 will run
                      var m557MinX = 25; ; put your default here
                      var m557MaxX = 450; ; put your default here
                      var m557MinY = 25; ; put your default here
                      var m557MaxY = 450; ; put your default here
                      var MinSpace = 10 ; put default minimum spacing
                      var MaxSpace = 30 ; put default maximum spacing
                      var ProbeNumX = 8 ; put default probe points
                      var ProbeNumY = 8 ; put default probe points.
                      var ProbeCenterX = 285 ; will be updated to probe centre of print
                      var ProbeCenterY = 270 ; will be updated to probe centre of print

                      var MaxProbePoints = max(floor(move.axes[0].max / var.MaxSpace),floor(move.axes[1].max / var.MaxSpace)) ; maximum points in either axis

                      echo "Maximum allowed probe points is " ^ var.MaxProbePoints ^ " using max space of " ^ var.MaxSpace
                      var SafeZone = 3 ; safety margin for probing near edge.

                      1 Reply Last reply Reply Quote 0
                      • OwenDundefined
                        OwenD @RatRig0331
                        last edited by OwenD

                        @ratrig0331
                        Sounds like it's not finding a sensors.probe[0] when you run the initial setup from config.g
                        As that line is at the start of the macro, it never gets to the lines that set the global variables up.
                        Make sure your probe is configured before calling the macro.
                        Maybe post you config.g so we can see how your probe(s) are configured

                        RatRig0331undefined 3 Replies Last reply Reply Quote 0
                        • RatRig0331undefined
                          RatRig0331 @OwenD
                          last edited by

                          @owend

                          ​
                          ;;; BLTouch ;;;
                          M950 S0 C"io2.out" ; Create a servo pin on io2
                          M558 P9 C"io2.in" H5 F240 T10800 A5 ; set Z probe type to unmodulated and the dive height + speeds
                          G31 P25 X-29.00 Y-2.00 Z2.471

                          OwenDundefined 1 Reply Last reply Reply Quote 0
                          • RatRig0331undefined
                            RatRig0331 @OwenD
                            last edited by

                            @owend

                            ​

                            ;;; Endstops ;;;
                            M574 X1 S1 P"io1.in" ; configure active high endstops
                            M574 Y2 S1 P"io0.in" ; configure active high endstops
                            M574 Z1 S2

                            1 Reply Last reply Reply Quote 0
                            • OwenDundefined
                              OwenD @RatRig0331
                              last edited by

                              @ratrig0331
                              Make sure
                              M98 P"0:/sys/setDefaultProbePoints.g"
                              Comes after your G31 in your BlTouch section

                              RatRig0331undefined 3 Replies Last reply Reply Quote 0
                              • RatRig0331undefined
                                RatRig0331 @OwenD
                                last edited by

                                @owend ok I’ll move it and give it a shot

                                1 Reply Last reply Reply Quote 0
                                • RatRig0331undefined
                                  RatRig0331 @OwenD
                                  last edited by

                                  @owend that did the trick but now i need to turn down the amount of probe points
                                  var MinSpace = 10 ; put default minimum spacing
                                  var MaxSpace = 30 ; put default maximum spacing
                                  var ProbeNumX = 8 ; put default probe points
                                  var ProbeNumY = 8 ; put default probe points.
                                  var ProbeCenterX = 285 ; will be updated to probe centre of print
                                  var ProbeCenterY = 270 ; will be updated to probe centre of print

                                  with my 100x100mm print its trying to do a 13x13 grid what do i tweak to lower that?

                                  1 Reply Last reply Reply Quote 0
                                  • RatRig0331undefined
                                    RatRig0331 @OwenD
                                    last edited by

                                    @owend ok after letting it 100% there were more errors

                                    8/14/2022, 10:15:03 PM Error: M557: bad grid definition: Spacing too small
                                    8/14/2022, 10:14:19 PM Error: in GCode file line 773: G1: expected '}'

                                    line 773 is your
                                    G01 X0 Y{move.axes{1}.max} Z0.6 F1500 ; Move to back corner while heating

                                    OwenDundefined 1 Reply Last reply Reply Quote 0
                                    • OwenDundefined
                                      OwenD @RatRig0331
                                      last edited by OwenD

                                      @ratrig0331
                                      Change your minSpace and maxSpace in the macro to reduce number of probe points
                                      Try 50 & 100

                                      The G1 is my bad
                                      I did a search and replace when I was changing the braces, but changed one that should remain a square bracket

                                      Change this line in superslicer
                                      G01 X0 Y{"{move.axes{1}.max}"} Z0.6 F1500 ; Move to back corner while heating
                                      To
                                      G01 X0 Y{"{move.axes[1].max}"} Z0.6 F1500 ; Move to back corner while heating

                                      Or delete the line if you don't want to move there while heating

                                      RatRig0331undefined 1 Reply Last reply Reply Quote 0
                                      • RatRig0331undefined
                                        RatRig0331 @OwenD
                                        last edited by

                                        @owend

                                        One down one to go I’m still getting the m557 error with the 50/100 spacing will this be normal a normal error from down sizing the bed mesh or is there a fix

                                        Error: M557: bad grid definition: Spacing too small

                                        ——-Error: in GCode file line 773: G1: expected '}'———- is now fixed

                                        jay_s_ukundefined 1 Reply Last reply Reply Quote 0
                                        • jay_s_ukundefined
                                          jay_s_uk @RatRig0331
                                          last edited by

                                          @ratrig0331 the most probe points you can have on a duet 2 are 121 and on a duet 3 are 441

                                          Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

                                          RatRig0331undefined 1 Reply Last reply Reply Quote 0
                                          • RatRig0331undefined
                                            RatRig0331 @jay_s_uk
                                            last edited by

                                            @jay_s_uk too many points isn’t the issue I think, it must be too few points? With the settings first told to me it wanted to do a 13x12 grid on a 100mmx100mm print 156 points total, than I changed the min max to 50/100 and it only probed the middle and 4 conners and gave the same error

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