Correction of heightmap is not really working
-
@fcwilt
I am just not picking up this coding. I have spent 5 days straight on this.Question - So when a Error pops up it is there to tell you there is a problem and to point you in the direction of the problem to fix the issue, I assume ?
So, when I get a -
Error: in file macro line 44 column 10: meta command: 'break' was not inside a loopHow do I know what macro, and column is the spot on line 10?
-
Amazing.
What are the odds you would have global variables with the exact same names as mine.
In any case the variable mentioned in the error appears more than once in your config.g file but they are all commented out.
Enable the second one (the one with 1.9) by removing the comment character.
Also I see these two commands:
M558 P9 C"^zprobe.in" H5 F120 T6000 A1 R1 M950 S0 C"duex.pwm5"
They should be moved to your config_probe.g file. If they are already in that file simply remove them from your config.g file.
Frederick
-
@sculpt-fabricator said in Correction of heightmap is not really working:
@fcwilt
I am just not picking up this coding. I have spent 5 days straight on this.Question - So when a Error pops up it is there to tell you there is a problem and to point you in the direction of the problem to fix the issue, I assume ?
So, when I get a -
Error: in file macro line 44 column 10: meta command: 'break' was not inside a loopHow do I know what macro, and column is the spot on line 10?
Well I test each macro as I code it so I know which macro is creating the error. Then since the error messages tells me what line and column I can focus in on the error.
I don't move on to some other coding until the macro is error free.
Do you have a bed.g file?
If so post it here, please.
Frederick
-
Ok so me making 100 changes at once is not good ! LOL
;M98 P"config_probe.g" ; insure probe is using most recent configuration values G29 S2 ; cancel mesh bed compensation M290 R0 S0 ; cancel baby stepping G90 ; absolute moves G1 Z5 F99999 ; insure Z starting position is high enough to avoid probing errors ; M671: Define positions pf manual bed levelling screws or Z leadscrews ; Xnn:nn:nn... list of between 2 and 4 X coordinates of the leadscrews that drive the Z axis or the bed levelling screws ; Ynn:nn:nn... list of between 2 and 4 Y coordinates of the leadscrews that drive the Z axis or the bed levelling screws ; Snn maximum correction allowed for each leadscrew in mm (optional, default 1.0) ; Pnnn pitch of the bed levelling screws (not used when bed levelling using independently-driven leadscrews). Defaults to 0.5mm which is correct for M3 bed levelling screws ; Fnn fudge factor, default 1.0 M671 X-189:-189:645:645 Y645:-64:-64:645 S10 ; Anticlockwise ; --- level bed --- while true ; run leveling pass G30 P0 X10 Y10 Z-99999 ; probe near a leadscrew G30 P1 X570 Y10 Z-99999 ; probe near a leadscrew G30 P2 X570 Y570 Z-99999 ; probe near a leadscrew G30 P3 X10 Y570 Z-99999 S4 ; probe near a leadscrew and calibrate 4 motors if move.calibration.initial.deviation < 0.02 break ; check pass limit - abort if pass limit reached if iterations = 5 M291 P"Bed Leveling Aborted" R"Pass Limit Reached" abort "Bed Leveling Aborted - Pass Limit Reached" ; --- finish up --- ; --- set Z=0 datum which can be affected by leveling --- G1 X270 Y270 ; move probe to center of bed - set values aaa and bbb as appropriate G30 ; do single probe which sets Z to trigger height of Z probe
; config_probe.g ; config the probe and call the other files.g M558 P9 C"^zprobe.in" H5 F120 T6000 A1 R1 M950 S0 C"duex.pwm5" G31 P25 X-30 Y0 Z1.688 ; set Z probe trigger value, offset and trigger height (larger value is closer)G31 P500 X-18 Y24 Z2.917
-
that is my bed.g
and config_probe.g -
@sculpt-fabricator said in Correction of heightmap is not really working:
that is my bed.g
and config_probe.gOK your config_probe.g file looks good. So remove the commands I mentioned from config.g
Please upload your bed.g file using the "upload file" tag. I will edit it to correct the errors.
You simply have not used the required indentation.
Frederick
-
Got the lines changed in the config.g
Here is the bed.g
bed.g -
Here is homeall.g
; homeall.g ; called to home all axes G91 ; relative positioning G1 H2 Z5 F200 ; lift Z relative to current position G1 H1 X-605 Y605 F3000 ; move quickly to X and Y axis endstops and stop there (first pass) G1 H2 X5 Y-5 F600 ; go back a few mm G1 H1 X-605 Y605 F600 ; move slowly to X and Y axis endstops once more (second pass) G90 ; absolute positioning M98 P"config_probe.g" G30 ; home Z by probing the bed G1
mesh.g
M98 P"config_probe.g" ; insure probe is using most recent configuration values G29 S2 ; cancel mesh bed compensation M290 R0 S0 ; cancel baby stepping G90 ; absolute moves ; --- set Z=0 datum which is needed for creating a heightmap G1 Z5 F99999 ; insure Z starting position is high enough to avoid probing errors G1 X270 Y270 ; move probe to center of bed - set values aaa and bbb as appropriate G30 ; do single probe which sets Z to trigger height of Z probe M557 X0:560 Y0:580 S58 ; define mesh grid 420 points S58 G28 G29 S0 ; probe bed and create height map
-
So another question. Modix had a Macro -
Automatic tilt calibration + Bed Compensation - 101 pointsThat Macro has all changed now with your code correct ?
So how do I run the bed tilt calibration
and the bed probe calibration ?I am confused on it I wipe those clean and add a M98 P"bed.g"
and run it trough the macro
or just type that into the console comand ? -
The current approach that the DWC expects is this:
- the file mesh.g is used to create the height map needed for Mesh Bed Compensation.
- the file bed.g is used for Manual or Automatic Bed Leveling.
A G29 command executes mesh.g and creates the height map.
To use the height map you would have a G29 S1 command somewhere in your print start code.
A G32 command executes bed.g.
I use G32 as part of my home all code.
So it looks like you are already using the correct approach.
Frederick
-
-
@fcwilt
Thank you very very much, I will give it a try -
@fcwilt
I got this -
Does that command need a ; in front of it ?
-
Sorry there is a missing comment in front of that line.
It should be this:
; --- set Z=0 datum which can be affected by leveling --- G1 X270 Y270 ; move probe to center of bed - set values aaa and bbb as appropriate G30 ; do single probe which sets Z to trigger height of Z probe
-
@fcwilt
Ok now I cant get the bed tilt leveling right.
I am not understanding the placement of z screwsbed.g M671 , needs to match the config.g M671 correct ??
M671 X-189:640:640:-189 Y643:643:-64:-64 S10 Anticlockwise
- why does it say anticlockwise
- In my bed.g it says to run the probe pattern -
; run leveling pass G30 P0 X5 Y5 Z-99999 ; probe near a leadscrew G30 P1 X570 Y5 Z-99999 ; probe near a leadscrew G30 P2 X570 Y580 Z-99999 ; probe near a leadscrew G30 P3 X5 Y580 Z-99999 S4 ; probe near a leadscrew and calibrate 4 motors
But that is running from the left rear , clockwise
But when it runs the Tilt calibration, it starts at the front left and go's to the front right, and so on, Anticlockwise.
In the Gcode Directory it examples M671 going clockwise
I am stumped !!
-
@fcwilt
also If I skip the tilt calibration and go to Bed compensation,
I can strategically place a high spot under one of the probe points.
and it shows me that the map is 90 deg out.
to correct it, it would have to turn 90 deg Anticlockwise.if that helps
-
Since we are putting everything related to bed leveling in bed.g there should not be a M671 command in config.g.
I don't know why it says "anticlockwise" - I did not put that there.
As I recall what does need to match up is the order of the Z steppers in the M584 command and the order of the positions specified in the M671 command.
I also have the G30 commands probe the bed in the order specified in the M671 command though I don't know if that is a requirement.
But my bed leveling works so it doesn't hurt to keep everything in the same order, even if it is not required.
The height map is not related to anything being done in bed leveling.
Frederick
-
Ok so still having some problems
We are following these instructions for setting the Z=0 datumWe run the Z offset macro that you made to move to the center of the bed
and probe to set the config_probe.g G31 ZWe got a reading of 1.752
So we changed that in the Config.probe.g
(do we need to change it anywhere else ? for example mesh.g
? global_mesh_g in config.g file ? )Then we run your probe in center of be code - With a added Z0
G1 X{((move.axes[0].max + move.axes[0].min) / 2) - sensors.probes[0].offsets[0]}, Y{((move.axes[1].max + move.axes[1].min) / 2) - sensors.probes[0].offsets[1]}, F1800 Z0
It should be at the same 1.752 but it is not. Its further away from the
bed than that by .40so we go back and add that .40 to the 1.752 = 2.152 in the config.probe.g
it didn't work. we are still further away.
its not saving it for some reason.
-
Where are you executing the G30 at the center of the bed to set the Z=0 Datum?
Frederick
-
@fcwilt
Yes, that is where we are executing it from, the center of the bed.