Co-ordinate system
-
In my attempt to diagnose a z height problem (using BL Touch) on my machine I have embarked on a quest to understand the co-ordinate system.
By this I mean how the co-ordinates are acted upon and reported. What are machine co-ordiantes and user co-ordinates. If their is a document that explains this can someone reference it please.With no mesh compensation (G29 S2) and no offsets (G10 P0 X0 Y0 Z0) .
I send the tool to Z10. The obect model reports
move.axes[2].machinePosition = 10
move.axes[2].userPosition = 10
The DWC reports Z10In the Console I then enable bed mesh compensation from a previous learn (G29 S1) load mesh.
move.axes[2].machinePosition = 10
move.axes[2].userPosition = 10.137
The DWC reports Z10.14
So by implication its showing the mesh offset by the difference in machine and user positions.However if I now send the Tool to 10 (G1 Z10) I get
move.axes[2].machinePosition = 10
move.axes[2].userPosition = 10
The DWC reports Z10So this suggests the Mesh compensation offsets are hidden thereafter.
I have yet to figure how the BL Touch (sensors.probes[0].lastStopHeight) affects the machine to user co-ordinates reporting.
-
@St-Taw
The mesh offset is typically set to taper off as the Z height increases.This is set by M376 in config.g (usually)
https://docs.duet3d.com/en/User_manual/Reference/Gcodes#m376-set-bed-compensation-taper
Any baby steps applied will also result in a difference between user and machine positions.
Last stop height reports the Z height when the sensor triggered. No mesh offset is applied. However for it to be accurate, you must calibrate it.
https://docs.duet3d.com/User_manual/Connecting_hardware/Z_probe_testing -
@St-Taw the bed compensation is hidden in machine coordinates. However, when you change from not having a mesh loaded to having a mesh loaded, the firmware has to allow for the compensation where the head currently is, which is why you see the machine and user coordinates change. The alternative would have been to execute a Z move to apply the compensation.
There are 4 sets of coordinates: user coordinates (what the GCode commands specify), machine coordinates (with tool offsets, tool axis mapping, workplace offsets, G68 rotation and axis scaling applied), compensated coordinates (with bed compensation and axis skew compensation applied), and motor coordinates (with inverse kinematics transform applied).
-
Thanks for the explanation. Does the object model have anywhere, the hidden value applied to the machine co-ordinates? Not that is will actually help me, just interesting.
I will turn off bed compensation whilst investigating my BL Touch problem just for clarity.
On a slight aside. it occured to me that, as the term implies, 'Bed compensation' assumes the error in height is due to the bed shape. If the error was actually due to the X gantry being in error, say lower in the middle), then applying bed compensation to correct it would result in other errors. It would be expected to improve bed adhesion but as the the correction tapers off the top surface of the print could be dished. I not sayinbg this needs to be addressed, just a thought experiment.
-
@St-Taw regarding your aside, yes that is true.