Mesh compensation results backwards
-
Based on your feedback I added an additional G30 just after my Z-Axis leveling and before loading the heightmap. Also changed the points at which I am measuring for the left and right to exactly align with the point I am looking for the G30 based on the offsets.
; homez.g ; called to home the Z axis ; G91 ; relative positioning G1 Z5 F6000 H2 ; lift Z relative to current position G90 ; absolute positioning ; Clear height map until we are done. G29 S2 ; Z-Axis probe likely triggers beyond tool height. ; If we have an active tool we need to drop it now. if state.currentTool >= 0 M28 "/sys/tprevious.g" T{state.currentTool} M29 M98 P"/sys/tactive.g" > null ; Delete the register file so we don't try to dock again. M30 "/sys/tactive.g" G1 X190 Y220 F6000 ; go to first probe point G30 ; home Z by probing the bed ;; Points are not related to bed coordinates, but rather probe coordinates. ;; 2 Point G30 P0 X35 Y185.6 Z-9999 ; Left Center G30 P1 X371 Y185.6 Z-9999 S2 ; Right Center G1 X190 Y220 F6000 ; go to first probe point G30 ; home Z by probing the bed ; Load previous tool M98 P"/sys/tprevious.g" M30 "/sys/tprevious.g" ; Load Height Map M375
MeshCompensation
;; Heat up bed to common temperature range M140 H0 S70 M190 S70 ; Home the Axis' G28 ; Clear the current height map. G29 S2 ; Define probing grid M557 X10:370 Y20:320 S20 ; Perform Mesh Compensation probing. G29 ; Turn off bed. M140 S0
Appreciate the feedback!
Not sure if this is getting after my problem with the results as they are being recorded appear to be reversed in X/Y from what they are being measured... Not sure what else needs to be explored for the automatic mode to work. I'm sure the manual method will! -
@gamefanatic3d said in Mesh compensation results backwards:
Appreciate the feedback!
Not sure if this is getting after my problem with the results as they are being recorded appear to be reversed in X/Y from what they are being measured... Not sure what else needs to be explored for the automatic mode to work. I'm sure the manual method will!I would think that if there was some sort of firmware issue that caused the reversal someone would have noticed it by now.
Have you verified that the bed leveling is actually working? One member I worked with had the wiring to the Z steppers reversed and each bed leveling attempt made things worse.
Here is an simplified version of bed leveling that I use which makes use of the programming features of firmware 3.3 to make multiple passes checking the results at the end of each pass.
while true ; run leveling pass ; determine where to probe G30 P0 X-145 Y-65 Z-99999 ; probe near ball stud #1 G30 P1 X0 Y100 Z-99999 ; probe near ball stud #2 G30 P2 X145 Y-65 Z-99999 S3 ; probe near ball stud #3 ; check results - exit loop if results are good 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 --- M98 P"center_probe.g" ; position for probing G30 ; do single probe which sets Z to trigger height of Z probe
-
@fcwilt
Thank you for the code. I added your code to my homez.g and it worked the first time every time. I've had bed leveling working for a few years now. I do require that I have two probes to the bed at each point and that they are within 0.005 before accepting the data and that it run no more than 10 times.Here is the output after homing the Z twice.
8/20/2021, 9:54:14 PM Leadscrew adjustments made: 0.061 0.061, points used 2, (mean, deviation) before (0.061, 0.000) after (-0.000, 0.000) 8/20/2021, 9:53:36 PM Leadscrew adjustments made: 0.047 0.073, points used 2, (mean, deviation) before (0.060, 0.008) after (0.000, 0.000)
I will also add that in my previous attempt to resolve the problem as noted above I did nothing more than run the meshcompensation macro and tested the results with a print to find the problem, then took the heightmap.csv and brought it into excel to reverse the numbers to get my desired effect. Things were much closer to what they should be (even though not perfect).
So leveling / mesh compensation is working, but I may have something wrong which is causing this issue, but I'm not skilled in memory enough these days to figure out what would have the X and Y coordinates reversed and yet still have everything else working normally. -
A simple way to confirm that the height map is created correctly in regards to left/right would be to create a 4 point height map covering most of the bed.
But before running the process put something a few mm thick (ruler, piece of plastic, etc) on the right side being sure that the two right side probes hit the piece.
This should generate a very tilted height map which, when viewed in the DWC height map viewer, should make it clear if the height map is correct or somehow reversed.
Frederick
-
Well that was a simple trick. I put a small calibration square on the bed to the right side and it quickly polled it. Definitely showing it on the correct side.
So not sure what direction to go from here. I know my probe is good, but the results of the mesh compensation isn't.
-
@gamefanatic3d is your printer a tool changer with a z probe switch on the head like the E3D one?
Could simply be that the weight of the tools when printing is causing the gantry to sag which won't be measured when you probe -
@engikeneer
Yes, I'm using the tool plates setup from E3D and the BLTouch. The BLTouch is on the opposite side of the rail from the tool head. If the weight were to make a difference it would slightly fall to the side of the tool which would naturally bring it closer to the bed, but I'm experiencing results further. The BLTouch would move away due to the twisting action, but I never measure with a Tool on since there is never enough clearance. I had thought about this, but the issue is that I can repeatably measure the distance from the bed to the nozzle compared to what DuetWeb / PanelDue is reporting. In either case, I designed my tools such that the weight of the motor was supported by the tool carriage and was nearly evenly distributed across the rail for just this reasoning.I wrote a macro to perform a G30 twice at each spot and calculate the difference from the trigger height and move down the bed after getting an accurate read of the two dives within 0.005. I disabled mesh compensation and went through a full manual bed leveling last night using just my probe to measure the distances and came up with slightly different values than when the mesh compensation routine ran, but the end result was approximately the same.
However, much along the lines of what you have suggested here, I baby stepped -0.16 when running my test and got T0 to accurately lay down the first layer. I'm not sure why this is the case and I haven't tested against T1 as of yet.
-
@fcwilt said in Mesh compensation results backwards:
I would think that if there was some sort of firmware issue that caused the reversal someone would have noticed it by now.
That's the point, this is by far not the first thread reporting such issues with toolchangers... At least two other people (me being one of them) have similar issues... Troubleshooting has so far not been any useful...
-
@gamefanatic3d Can you show how a typical first layer comes out for you? Just some cube or so. I have similar issues with my toolchanger and haven't been able to diagnose the cause yet...
-
@gamefanatic3d said in Mesh compensation results backwards:
However, much along the lines of what you have suggested here, I baby stepped -0.16 when running my test and got T0 to accurately lay down the first layer. I'm not sure why this is the case and I haven't tested against T1 as of yet.
What happens if you do this:
- disable mesh compensation
- set the Z=0 datum at a XY point on the bed where the height map suggests it is quite flat
- move tool 0 to that XY point
- move tool 0 to Z=0
- does the nozzle is just touch the bed?
- move tool 1 to that XY point
- move tool 1 to Z=0
- does the nozzle is just touch the bed?
Frederick
-
I hadn't been taking pictures of the results but set up a simple single-lined box to test a run of making the first layer and not waste too much filament.
Calibration-Bed-Level-Single-Extrusion-Boxes.stl
With one of the heightmaps that were generated by the system. You will notice is the image below a lot of areas where the single extrusion lines are missing. This is a result of not getting close enough from what I can tell and as I watched it extrude it would just gather on the nozzle in most cases. Even better, when it actually got something to stick, the slicer thought it best to go back over that line, and low and behold the nozzle would scoop it back up again due to it not barely touching. Here is the result of one such test:
Even after running through my own macro to get the deviations in the bed, I had problems. Now I'm in the process of doing the following:
- Warm the bed and Nozzle to operating temps (Bed: 70°C, Nozzle: 230°C).
- Run G28
- Disable mesh compensation
- Using a feeler gauge manually measure the height of T0 to the bed at my typical 0 location (X200 Y200).
- Move the nozzle to the point on the bed that would normally be measured by the probe and lower it until it just barely touches my feeler gauge.
- Write down the difference in the coordinate on my custom heightmap (feeler gauge is 0.8mm) <feeler gauge height> - <Duet reported Z> = <heightmap value>
Maybe I should have done a smaller height map, but I didn't. It was 3 am and wasn't thinking clearly. I got through the first 3 furthest most Y-Axis rows. I uploaded my slightly modified map and enabled mesh compensation and measured both tools to the feeler gauge at both X200 Y200 and at least one of the points on the map and got approximately a 0 gap. So the method appears to be working, but have a ways to go.
In this image, you can see the right side (bottom of the picture) has a greatly improved first layer. This was using the heightmap I generated using my macro as the basis.
Going forward I need to find my Z-probe tool to make this an easier task and less burning of skin!
-
Just remember that when checking the Z=0 position of your tools it needs to be done at the same XY point you used for setting the Z=0 datum, otherwise bed unevenness may affect the reading.
And mesh compensation should be disabled.
Frederick
-
@fcwilt
I ran a similar test to what you were asking, I think.I turned off mesh compensation and measured at my typical 0 (X200, Y200) location with a feeler gauge (0.8mm) and then moved to a spot that was lower and found that I needed to move the head down. The results were very different from what was recorded either by my manual mesh macro attempts or the systems.
I believe the deviation the probe is finding is accurate, but for some reason is not being applied properly when the tool is engaged and thus having a larger than a normal gap. Not sure about this quite yet.
-
@gamefanatic3d said in Mesh compensation results backwards:
I believe the deviation the probe is finding is accurate, but for some reason is not being applied properly when the tool is engaged and thus having a larger than a normal gap. Not sure about this quite yet.
That is why you need to verify, using the procedure I suggested, that when a tool is positioned at Z=0 the nozzle will be just touching the bed.
It may be simply a question of the Z offset setting for the tool is not quite right.
Frederick
-
@fcwilt
I'm not sure if you saw my comment, but I have performed the procedure. I didn't drag the head across the bed, but rather my feeler gauge. The result was there was a gap at the end as I expected. Rather that was coming from the gantry or the bed height I could not tell you, but there was a variation in the height from when it started to when it finished.I'm not sure if your goal in this was to prove there was variation in the bed or that mesh leveling had been turned off successfully. I know that my bed leveling measures at X180 Y200 and my typical measuring point is X200 Y200, and have tested the gap at both locations with and without the mesh compensation engaged. Each time I get the same result.
If it seems that I'm not providing you the feedback you are looking for, I may just be miss understanding the intended goal or I may not be describing it correctly?
-
@gamefanatic3d said in Mesh compensation results backwards:
@fcwilt
I'm not sure if you saw my comment, but I have performed the procedure. I didn't drag the head across the bed, but rather my feeler gauge. The result was there was a gap at the end as I expected. Rather that was coming from the gantry or the bed height I could not tell you, but there was a variation in the height from when it started to when it finished.I'm not sure if your goal in this was to prove there was variation in the bed or that mesh leveling had been turned off successfully. I know that my bed leveling measures at X180 Y200 and my typical measuring point is X200 Y200, and have tested the gap at both locations with and without the mesh compensation engaged. Each time I get the same result.
If it seems that I'm not providing you the feedback you are looking for, I may just be miss understanding the intended goal or I may not be describing it correctly?
It is likely that I am not making myself clear.
My goal is to verify that the Z probe Z Trigger Height setting is correct and that the Z Offset settings of the tools are correct.
The point of setting the Z=0 datum is to get the logical Z position (what the firmware "thinks" the Z position is) to match the actual Z position.
If the Z probe Z Trigger Height setting is off then the logical Z position will be off.
When you have a single tool printer like mine to verify that the Z probe Z Trigger Height setting is correct you position the nozzle at the exact same XY point you used to set the Z=0 datum and jog the nozzle down until it just touches the bed (or some object of a known thickness) and verify the Z position reported in the DWC is correct.
When you have a multiple tool printer you have the added complication of getting the Tool Z offset setting correct.
It would seem that both the Z probe Z Trigger Height setting and the Tool Z offset setting could lead to the Z logical position being wrong.
Having not worked with a multiple tool printer I don't know how you work that out. Perhaps it is in the Duet documentation.
How do you determine the Tool Z offset setting is correct?
Frederick
-
@fcwilt said in Mesh compensation results backwards:
What happens if you do this:
- disable mesh compensation
- set the Z=0 datum at a XY point on the bed where the height map suggests it is quite flat
- move tool 0 to that XY point
- move tool 0 to Z=0
- does the nozzle is just touch the bed?
- move tool 1 to that XY point
- move tool 1 to Z=0
- does the nozzle is just touch the bed?
So to respond to this request:
I used an area near the edge of the bed to ensure the feeler gauge isn't being supported by another higher area. My probe is offset from my Nozzles: X= 31.75, Y= -34.4
So when I move to a location I want to test both the probe and the nozzle at the same location I use the above to offset the Duets coordinates for the probe. There is no offset for the Nozzle as those are set by the associated G10 commands and will move to the spot shown by the Duet.
I perform a homing of Z. The process disables mesh compensation, performs the homing, and when done enables mesh compensation.
Step-1 - Prepare Environment
- Heat Bed: 70°C
- T0: 230°C
- T1: 230°C
Step 2 - Probe Height:
- Disable mesh compensation using Duet WebGUI
- G1 X338.25 Y54.4 Z6
- G30 S-1
Result:
8/22/2021, 12:15:34 PM M98 P"0:/macros/Homing/Bed/Bed_Height_Test" Stopped at height 0.949 mm 0.049
Step 3 - T0 Height
- T0 (Selected from GUI)
- G1 X370 Y20 Z6
- Using PanelDue Z-5 to achieve Z1.0 height.
- Using Z-0.05 movements after 4 adjustments I'm at Z0.8 and the feeler gauge is now just barely getting a tap when I wiggle it under the tip.
- Using PanelDue Z+5
Step 4 - T1 Height
- T1 (Selected from GUI, system knows to put the T0 back and grab T1)
- G1 X370 Y20 Z6 (Entered it again, but is redundant at this point as my Tools will automatically move to the last point on the bed.)
- Using PanelDue Z-5 to achieve Z1.0 height.
- Using Z-0.05 movements after 5 adjustments I'm at Z0.75 and the feeler gauge is now just barely getting a tap when I wiggle it under the tip.
- Using PanelDue Z+5
It's probably worth noting that my Probe Trigger height is 0.9. So the result noted in Step 2 was the difference from the point measured and my trigger height thus 0.049.
-
@fcwilt said in Mesh compensation results backwards:
@gamefanatic3d said in Mesh compensation results backwards:
My goal is to verify that the Z probe Z Trigger Height setting is correct and that the Z Offset settings of the tools are correct.So I repeated the steps above which are essentially how I get my G10 settings so that I can ensure I've performed as you noted.
Step 1 - Pre environment:
- Bed Temp: 70
- T0 Temp: 230°C
- T1 Temp: 230°C
- Click Home All in WebGUI
- Click Disable Mesh Compensation in WebGUI
Step 2 - Probe Height:
- G1 X168.25 Y234.4 Z6
- G30 S-1
Result:
8/22/2021, 12:47:32 PM M98 P"0:/macros/Homing/Bed/Bed_Height_Test" Stopped at height 0.871 mm -0.029
Step 3 - T0 Height:
- Click Tool-0 in WebGUI
- G1 X200 Y200 Z6
- Using PanelDue move Z-5 (Z=1.0)
- Using Z-0.05 movements, after 3 adjustments I'm at Z0.85, and the feeler gauge is now just barely getting a tap when I wiggle it under the tip.
- Using PanelDue Z+5
Step 4 - T1 Height:
- Click Tool-1 in WebGUI
- G1 X200 Y200 Z6
- Using PanelDue move Z-5 (Z=1.0)
- Using Z-0.05 movements, after 3 adjustments I'm at Z0.85, and the feeler gauge is now just barely getting a tap when I wiggle it under the tip.
- Using PanelDue Z+5
- Click Tool-1 in WebGUI to dock.
Blow on fingers and look for ice and a band-aide...
-
I use this macro when just probing a single point on the bed during the previous tests:
Bed_Height_Test
G1 Z5 F6000 G30 S-1 G1 Z5 F6000 echo (sensors.probes[0].lastStopHeight - sensors.probes[0].triggerHeight)
-
@gamefanatic3d said in Mesh compensation results backwards:
G1 X168.25 Y234.4 Z6
Where does those X and Y values come from?
They are different from the X and Y values you use in homez.g when setting the Z=0 Datum.
Given that with a single tool printer the nozzle becomes the reference for checking the Z probe Z Trigger Height setting I'm thinking that to deal with multiple tools the tool 0 Z Offset setting would be 0 so you take the value out of the equation and you can now use the nozzle of that tool as your reference for checking the Z probe Z Trigger Height setting.
Then you set the other tool(s) Z offset based on tool 0.
Frederick