Only probe where the part will be printed
-
@owend how do you call that macro in your main config.g, and where in prusa slicer do you add the other macro?
-
@owend I think I figured it out but I’m getting a error massage: unknown variable ‘global.minprobex’
-
@ratrig0331
You need to put this line in config.g in place of your normal M557M98 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
-
@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?
-
@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
-
@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'
-
@ratrig0331 have you opened the GCode file in a text editor, to see what the slicer has actually generated?
-
@dc42 not yet I’ll take a look
-
@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.45mmM73 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 printvar 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. -
@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 -
-
-
@ratrig0331
Make sure
M98 P"0:/sys/setDefaultProbePoints.g"
Comes after your G31 in your BlTouch section -
@owend ok I’ll move it and give it a shot
-
@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 printwith my 100x100mm print its trying to do a 13x13 grid what do i tweak to lower that?
-
@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 -
@ratrig0331
Change your minSpace and maxSpace in the macro to reduce number of probe points
Try 50 & 100The G1 is my bad
I did a search and replace when I was changing the braces, but changed one that should remain a square bracketChange 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 heatingOr delete the line if you don't want to move there while heating
-
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
-
@ratrig0331 the most probe points you can have on a duet 2 are 121 and on a duet 3 are 441
-
@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