Only probe where the part will be printed
-
8/15/2022, 8:04:58 PM Error: M557: bad grid definition: Spacing too small
8/15/2022, 8:04:26 PM Reset Z datum in mesh centre
8/15/2022, 8:04:26 PM Mesh probing successful. Loading mesh..
8/15/2022, 8:04:26 PM 36 points probed, min error -0.141, max error 0.093, mean -0.020, deviation 0.066
Height map saved to file 0:/sys/heightmap.csv
8/15/2022, 8:01:59 PM Mesh probing
8/15/2022, 8:01:50 PM Setting Z datum point at X250.0000 Y250.0000
8/15/2022, 8:01:50 PM Probing 6 points in X direction & 6 points in Y direction
8/15/2022, 8:01:50 PM Probing grid - X183.907:316.093 Y188.907:311.093
8/15/2022, 8:01:32 PM Leadscrew adjustments made: -0.014 0.008 0.009, points used 3, (mean, deviation) before (0.001, 0.010) after (-0.000, 0.000)
8/15/2022, 8:01:12 PM Leadscrew adjustments made: 0.015 0.022 0.001, points used 3, (mean, deviation) before (0.014, 0.008) after (-0.000, 0.000)
8/15/2022, 8:00:52 PM Leadscrew adjustments made: 0.102 0.033 -0.002, points used 3, (mean, deviation) before (0.046, 0.040) after (0.000, 0.000)
8/15/2022, 8:00:32 PM Leadscrew adjustments made: 0.503 0.279 0.452, points used 3, (mean, deviation) before (0.404, 0.087) after (-0.000, 0.000)
8/15/2022, 7:58:35 PM M32 "0:/gcodes/First_Layer_Test_0.2mm_PLA_10mhhhhhhhhhhhhhh.gcode"
File 0:/gcodes/First_Layer_Test_0.2mm_PLA_10mhhhhhhhhhhhhhh.gcode selected for printing -
8/15/2022, 8:17:42 PM Error: M557: bad grid definition: Spacing too small
8/15/2022, 8:17:10 PM Reset Z datum in mesh centre
8/15/2022, 8:17:10 PM Mesh probing successful. Loading mesh..
8/15/2022, 8:17:10 PM 36 points probed, min error -0.105, max error 0.079, mean -0.005, deviation 0.044
Height map saved to file 0:/sys/heightmap.csv
8/15/2022, 8:14:43 PM Mesh probing
8/15/2022, 8:14:34 PM Setting Z datum point at X250.0000 Y250.0000
8/15/2022, 8:14:34 PM Probing 6 points in X direction & 6 points in Y direction
8/15/2022, 8:14:34 PM Max Probes Y is 6
8/15/2022, 8:14:34 PM Min Probes Y is 2
8/15/2022, 8:14:34 PM Max Probes X is 6
8/15/2022, 8:14:34 PM Min Probes X is 2
8/15/2022, 8:14:34 PM Probing grid - X183.907:316.093 Y188.907:311.093
8/15/2022, 8:14:34 PM Maximum allowed probe points is 8 using max space of 60
8/15/2022, 8:14:16 PM Leadscrew adjustments made: 0.002 0.008 0.006, points used 3, (mean, deviation) before (0.005, 0.002) after (0.000, 0.000)
8/15/2022, 8:13:56 PM Leadscrew adjustments made: 0.016 0.016 0.011, points used 3, (mean, deviation) before (0.015, 0.002) after (0.000, 0.000)
8/15/2022, 8:13:36 PM Leadscrew adjustments made: 0.168 0.055 0.022, points used 3, (mean, deviation) before (0.084, 0.057) after (-0.000, 0.000)
8/15/2022, 8:13:16 PM Leadscrew adjustments made: 0.413 0.322 0.388, points used 3, (mean, deviation) before (0.372, 0.035) after (0.000, 0.000)
8/15/2022, 8:12:01 PM M32 "0:/gcodes/First_Layer_Test_0.2mm_PLA_10mhhhhhhhhhhhhhh.gcode"
File 0:/gcodes/First_Layer_Test_0.2mm_PLA_10mhhhhhhhhhhhhhh.gcode selected for printing -
@ratrig0331
The M557 that is causing the error seems to be well after all the stuff I did.
Check for an M557 somewhere else in your slicer start gcode -
your right sorry it was in my start code purge line for some reason thank you so much for your time and patients with me this is all still vary new to me
8/15/2022, 9:22:31 PM Reset Z datum in mesh centre
8/15/2022, 9:22:31 PM Mesh probing successful. Loading mesh..
8/15/2022, 9:22:31 PM 36 points probed, min error -0.174, max error 0.083, mean -0.012, deviation 0.067
Height map saved to file 0:/sys/heightmap.csv
8/15/2022, 9:20:04 PM Mesh probing
8/15/2022, 9:19:56 PM Setting Z datum point at X250.0000 Y250.0000
8/15/2022, 9:19:55 PM Probing 6 points in X direction & 6 points in Y direction
8/15/2022, 9:19:55 PM Max Probes Y is 6
8/15/2022, 9:19:55 PM Min Probes Y is 2
8/15/2022, 9:19:55 PM Max Probes X is 6
8/15/2022, 9:19:55 PM Min Probes X is 2
8/15/2022, 9:19:55 PM Probing grid - X183.907:316.093 Y188.907:311.093
8/15/2022, 9:19:55 PM Maximum allowed probe points is 8 using max space of 60
8/15/2022, 9:19:55 PM Leadscrew adjustments made: -0.003 0.011 0.016, points used 3, (mean, deviation) before (0.007, 0.007) after (-0.000, 0.000)
8/15/2022, 9:19:34 PM Leadscrew adjustments made: 0.006 -0.003 0.004, points used 3, (mean, deviation) before (0.002, 0.003) after (0.000, 0.000)
8/15/2022, 9:19:14 PM Leadscrew adjustments made: 0.046 0.021 0.031, points used 3, (mean, deviation) before (0.032, 0.009) after (-0.000, 0.000)
8/15/2022, 9:18:54 PM Leadscrew adjustments made: -0.011 0.368 0.277, points used 3, (mean, deviation) before (0.213, 0.149) after (-0.000, 0.000) -
sorry one more question so far every time the start code hits your lines the hotend and bed turn off during the mesh than back on after. i tryed moving some things around but it still turns off all heaters during the mesh. here is my full start code
BED_TEMP=[first_layer_bed_temperature]
G90 ; use absolute coordinates
M83 ; extruder relative mode
M140 S[first_layer_bed_temperature] ; set final bed temp
M104 S150 ; set temporary nozzle temp to prevent oozing during homing and auto bed leveling
G4 S10 ; allow partial nozzle warmup
G28 ; home all axis
G1 Z50 F240
G1 X50 Y50 F3000
M116 ; Wait for all temps to stabilise
G32; (TRIM BED)
G32; (TRIM BED)
G32; (TRIM BED)
G32; (TRIM BED);;;;;;auto probe print area only;;;;;;
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]}
M561 ; clear any bed transform
M140 S[first_layer_bed_temperature] ; set final bed temp
M104 S150 ; set temporary nozzle temp to prevent oozing during homing and auto bed leveling
G4 S10 ; allow partial nozzle warmup
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;;;;final temp and purge line;;;;
M104 S{first_layer_temperature[initial_extruder]+extruder_temperature_offset[initial_extruder]} ; set final nozzle temp
M190 S[first_layer_bed_temperature] ; wait for bed temp to stabilize
M109 S{first_layer_temperature[initial_extruder]+extruder_temperature_offset[initial_extruder]} ; wait for nozzle temp to stabilize
G4 S10 ; allow partial nozzle warmup
G1 Z2.0 F3000; (MOVE Z AXIS UP LITTLE)
G1 X0.1 Y20 Z0.35 F5000.0; (MOVE TO PURDGE START)
G1 X0.1 Y200.0 Z0.35 F1500.0 E25; (DRAW FIRST LINE)
G1 X0.4 Y200.0 Z0.35 F5000.0; (MOVE TO THE SECOND LINE)
G1 X0.4 Y20.0 Z0.35 F1500.0 E30; (DRAW SECOND LINE)
G92 E0; (EXTRUDER RESET) -
@ratrig0331
The turning off of the heaters is deliberate and is done in mesh.g
I find that the accuracy of my bltouch suffers if they are on when probing
I run a 240v bed.
I'll have a look later and add an option to not turn off heaters. -
@owend you can turn off heaters temporarily during probing by using the B1 parameter in your M558 command.
-
@dc42
Roger that..
That makes that section of code superfluous.
Does it turn off the bed heater as well? -
@ratrig0331 said in Only probe where the part will be printed:
You can remove these lines in your slicer as you have set your temps elsewhere in your start code.
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
This version removes all the code related to heating from mesh.g
;0:/sys/mesh.g ; run when G29 with no paramters is called. ; if this file not found G29 S0 will run var SafeZone = 3 ; safety margin for probing near edge. var MinSpace = 20 ; put default minimum spacing var MaxSpace = 60 ; put default maximum spacing ; these values are place holders aand will be calculated later var m557MinX = 40; ; put your default here var m557MaxX = 180; ; put your default here var m557MinY = 20; ; put your default here var m557MaxY = 180; ; put your default here var ProbeCenterX = 90 ; will be updated to probe centre of print var ProbeCenterY = 90 ; will be updated to probe centre of print var ProbeNumX = 8 ; put default number of probe points var ProbeNumY = 8 ; put default number probe points. 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 if exists(global.minProbeX) if global.minProbeX < max(0,sensors.probes[0].offsets[0]) + var.SafeZone echo "minProbeX (" ^ global.minProbeX ^ ") unreachable - reset to " ^ (sensors.probes[0].offsets[0] + var.SafeZone) set global.minProbeX = max(0,sensors.probes[0].offsets[0]) + var.SafeZone set var.m557MinX = global.minProbeX if exists(global.maxProbeX) if global.maxProbeX < (global.minProbeX + (var.MinSpace*2)) set global.maxProbeX = (global.minProbeX + (var.MinSpace*2)) if global.maxProbeX > (move.axes[0].max - abs(sensors.probes[0].offsets[0]) - var.SafeZone) echo "maxProbeX (" ^ global.maxProbeX ^ ") unreachable - reset to " ^ (move.axes[0].max - sensors.probes[0].offsets[0] - var.SafeZone) set global.maxProbeX = move.axes[0].max - abs(sensors.probes[0].offsets[0]) - var.SafeZone set var.m557MaxX = global.maxProbeX if exists(global.minProbeY) if global.minProbeY < max(0,sensors.probes[0].offsets[1]) + var.SafeZone echo "minProbeY (" ^ global.minProbeY ^ ") unreachable - reset to " ^ (sensors.probes[0].offsets[1] + var.SafeZone) set global.minProbeY = max(0,sensors.probes[0].offsets[1]) + var.SafeZone set var.m557MinY = global.minProbeY if exists(global.maxProbeY) if global.maxProbeY < (global.minProbeY + (var.MinSpace*2)) set global.maxProbeY = (global.minProbeY + (var.MinSpace*2)) if global.maxProbeY > (move.axes[1].max - abs(sensors.probes[0].offsets[1]) - var.SafeZone) echo "maxProbeY (" ^ global.maxProbeY ^ ") unreachable - reset to " ^ (move.axes[1].max - sensors.probes[0].offsets[1] - var.SafeZone) set global.maxProbeY = (move.axes[1].max - abs(sensors.probes[0].offsets[1]) - var.SafeZone) set var.m557MaxY = global.maxProbeY echo "Probing grid - X" ^ var.m557MinX ^ ":" ^ var.m557MaxX ^ " Y" ^ var.m557MinY ^ ":" ^ var.m557MaxY var MinProbesX = floor((var.m557MaxX - var.m557MinX) / var.MaxSpace) ;echo "Min Probes X is " ^ var.MinProbesX var MaxProbesX = floor((var.m557MaxX - var.m557MinX) / var.MinSpace) ;echo "Max Probes X is " ^ var.MaxProbesX set var.ProbeNumX = min(var.MaxProbePoints,var.MaxProbesX) var MinProbesY = floor((var.m557MaxY - var.m557MinY) / var.MaxSpace) ;echo "Min Probes Y is " ^ var.MinProbesY var MaxProbesY = floor((var.m557MaxY - var.m557MinY) / var.MinSpace) ;echo "Max Probes Y is " ^ var.MaxProbesY set var.ProbeNumY = min(var.MaxProbePoints,var.MaxProbesY) ; sanity check probe points if var.ProbeNumX<2 set var.ProbeNumX=2 if var.ProbeNumY<2 set var.ProbeNumY=2 if var.ProbeNumX > var.MaxProbePoints set var.ProbeNumX = var.MaxProbePoints if var.ProbeNumY > var.MaxProbePoints set var.ProbeNumY = var.MaxProbePoints if (var.ProbeNumX * var.ProbeNumY) > 441 if var.ProbeNumX > 21 set var.ProbeNumX = 21 echo "Too many X points - reduced to 21" if var.ProbeNumY > 21 set var.ProbeNumY = 21 echo "Too many Y points - reduced to 21" echo "Probing " ^ var.ProbeNumX ^ " points in X direction & " ^ var.ProbeNumY ^ " points in Y direction" ; do probing set var.ProbeCenterX = (global.maxProbeX - ((global.maxProbeX - global.minProbeX)/2)) ; calculate centre point of probe area set var.ProbeCenterY = (global.maxProbeY - ((global.maxProbeY - global.minProbeY)/2)) ; calculate centre point of probe area echo "Setting Z datum point at X" ^ var.ProbeCenterX ^ " Y" ^ var.ProbeCenterY ; set Z = 0 to centre of probe area G1 X{var.ProbeCenterX- sensors.probes[0].offsets[0]} Y{var.ProbeCenterY- sensors.probes[0].offsets[1]} Z{sensors.probes[0].diveHeight+2} F3600 G30 echo "Mesh probing" M557 X{var.m557MinX,var.m557MaxX} Y{var.m557MinY,var.m557MaxY} P{var.ProbeNumX,var.ProbeNumY} if result != 0 abort "ERROR: could not create mesh" else G29 S0 if result != 0 abort "ERROR: Mesh probing failed" else echo "Mesh probing successful. Loading mesh.." ; set Z = 0 to centre of probe area echo "Reset Z datum in mesh centre" G1 X{var.ProbeCenterX - sensors.probes[0].offsets[0]} Y{var.ProbeCenterY - sensors.probes[0].offsets[1]} Z{sensors.probes[0].diveHeight+2} F3600 G30
-
While I was thinking about how to make these macros "universal" to suit all sorts of configurations, it occurred to me that they had, over time, grown ever more complicated with little benefit.
Bed sizes and the probe positions don't tend to change after all.I have therefore decided to simplify things.
I still call "setDefaultProbePoints.g" from config.g and anywhere else I might want to set the mesh for the entire bed.
Rather than me trying to calculate the area that can be probed, you just enter your M557 just as you would normally do in config.g;setDefaultProbePoints.g M557 X10:470 Y10:470 P6 ; set values as you would normally do in config.g
In superslicer, rather than call G29, I call mesh.g using M98, but pass the parameters for the min/max print values and the distance between probe points
A=xMin of print area
B=xMax of print area
C=yMin of print area
D=yMax of print area
N=distance between probe points (equivalent to S parameter in M557)M98 P"0:/sys/mesh.g" A{first_layer_print_min[0]} B{first_layer_print_max[0]} C{first_layer_print_min[1]} D{first_layer_print_max[1]} N30 ; set N to your desired distance between points G29 S1 ; load small mesh
In mesh.g I check if all those parameters have been passed.
If they have, I do the small mesh.
If they haven't I reload the defaults and probe the full bed.
Therefore if you send G29 or select mesh probing in DWC it will do the entire bed even if you forget to reset the defaults.;mesh.g M98 P"setDefaultProbePoints.g" if (exists(param.A) && exists(param.B) && exists(param.C) && exists(param.D) && exists(param.N)) M557 X{max(move.compensation.probeGrid.mins[0],param.A),min(move.compensation.probeGrid.maxs[0],param.B)} Y{max(move.compensation.probeGrid.mins[1],param.C),min(move.compensation.probeGrid.maxs[1] ,param.D)} S{param.N} if result != 0 abort "Invalid M557 parameters" G29 S0
If you wanted to set the number of probe points rather than the distance between them just change
S{param.N}
toP{param.N}
in the M557 line in mesh.g -
This might be useful: https://forum.duet3d.com/topic/29647/you-down-with-opp-oozebot-post-processor
-
@owend said in Only probe where the part will be printed:
@dc42
Roger that..
That makes that section of code superfluous.
Does it turn off the bed heater as well?Yes, it turns all heaters off. In the past it's been the bed heater that causes most of the problems for Z probes, however I suspect that with Revo and similar hot ends the hot end heater might affect Z probes too because of the higher magnetic field they are likely to produce.
-
@owend I’m getting some mix results with the bed mesh either works out great or works out horrible with driving my nozzle right into the bed I don’t know is doing a 3 point axis bed level is messing with the bed mesh or the last z offset probe touch
-
@ratrig0331
There's nothing in the code which can cause intermittent faults such as that you describe.
The problem is either wiring related, electrical interference , or a faulty BlTouch.
You can check if the BlTouch is in an error state or already deployed using the object model, but this only serves to allow you to cancel the process.
You need to find the root cause.
You need to provide details of what is happening exactly. What lights are on the BlTouch. What messages appear in DWC
It's probably better to start a new thread. -
@owend I have a Theory to why it’s crashing. My 3 point bed leveling before the new smaller mesh on my 500x500mm bed is just too much of a difference from the outter most points of the bed level to the new inner smaller point bed mesh. I manually moved the three probe points much closer the the center and the mesh looks quite a bit better as well as flatter with less extreams. My z changed quite a bit with this new bed level as well by almost .45mm.
Is there a way to auto ajust the bed level points to be in the same area of the auto bed mesh?
-
What you're describing doesn't sound right to me.
I suggest you study this page
https://docs.duet3d.com/User_manual/Connecting_hardware/Z_probe_auto_levelling
To get your 3 point levelling right.
The probe points must be near the lead screws. -
@owend changing my bed.g to this seems to have helped
M561 ; clear any bed transform
G30 P0 X10 Y30 Z-99999 ; probe near leadscrew 1
G30 P1 X60 Y80 Z-99999 ; probe near leadscrew 1
G30 P2 X110 Y130 Z-99999 ; probe near leadscrew 1
G30 P3 X160 Y180 Z-99999 ; probe near leadscrew 1
G30 P4 X240 Y480 Z-99999 ; probe near leadscrew 2
G30 P5 X240 Y430 Z-99999 ; probe near leadscrew 2
G30 P6 X240 Y380 Z-99999 ; probe near leadscrew 2
G30 P7 X240 Y330 Z-99999 ; probe near leadscrew 2
G30 P8 X470 Y30 Z-99999 ; probe near leadscrew 3
G30 P9 X420 Y80 Z-99999 ; probe near leadscrew 3
G30 P10 X370 Y130 Z-99999 ; probe near leadscrew 3
G30 P11 X320 Y180 Z-99999 S3 ; probe near leadscrew 3 and calibrate 3 motorsM280 P0 S160 ; clear and reset BL touch
G1 Z10 F300
G29 S1 ; probe the bed and enable compensation -
@OwenD so I had things working well with your help last using a bl touch I switched to a euclid probe and I started having odd issues all I did was add probe undock at the start and dock at the end. When I run a g29 out of program for the default bed mesh it gets the probe moves to bed center pauses than starts to move to the right rear corner well coming up with the bed driving it into the probe giving it a false trigger that going down to the front left corner and starts to bed mesh as it should. The new probe location is center on x from the nozzle and 35mm behind it on y. This seems to be the last bug I need to fix before I can test run a print. I debuged g28, homez, and my auto teach nozzle offset macro, I just need to fix the auto mesh
-
@RatRig0331
I suggest you start a new thread and post all the related files
config.g
bed.g
mesh.g
start.gI have no experience with a Euclid probe but it sounds like something isn't configured correctly
-
@OwenD i think i kinda figured it out i changed a few things in your mesh.g, it still acts odd at the end but it works without crashing the probe now. after the mesh it wants to go to the center of the bed, than dock the probe, than center of the bed, than undock the probe, than probe datum z, than dock the probe.
; set Z = 0 to centre of probe area
; echo "Call deployprobe.g macro"
M401 P0 ; This runs macro file deployprobe
G1 X{var.ProbeCenterX- sensors.probes[0].offsets[0]} Y{var.ProbeCenterY- sensors.probes[0].offsets[1]} Z{sensors.probes[0].diveHeight+5} F600
G30
echo "Mesh probing"
M557 X{var.m557MinX,var.m557MaxX} Y{var.m557MinY,var.m557MaxY} P{var.ProbeNumX,var.ProbeNumY} F9000
if result != 0
abort "ERROR: could not create mesh"
else
G29 S0
if result != 0
abort "ERROR: Mesh probing failed"
else
echo "Mesh probing successful. Loading mesh.."
G1 H2 Z30 F2000 ; lift Z relative to current position to clear any obstructions
; set Z = 0 to centre of probe area
echo "Reset Z datum in mesh centre"
G1 X{var.ProbeCenterX - sensors.probes[0].offsets[0]} Y{var.ProbeCenterY - sensors.probes[0].offsets[1]} Z{sensors.probes[0].diveHeight+5} F600
G1 H2 Z30 F2000 ; lift Z relative to current position to clear any obstructions
; echo "Call retractprobe.g macro"
M402 P0 ; retract probe
G30