Z LEVEL COMPENSATION
Z level compensation is a bed levelling/distortion correction function typically used in 3D printing or engraving. It uses a HAL user space component which utilizes the external offsets feature of LinuxCNC. The loadusr command in the handler_postgui file specifies an interpolation type, which must be one of nearest, linear or cubic. If none is specified or if an invalid word is specified, the default is assumed to be cubic.
When Z LEVEL COMP is enabled:
The probe_points.txt file can be updated at any time while compensation is disabled. When next enabled, the file will be reread and the compensation map is recalculated.
The necessary HAL connections are as follows:
net xpos-cmd compensate.x-pos <= axis.x.pos-cmd
net ypos-cmd compensate.x-pos <= axis.y.pos-cmd
net zpos-cmd compensate.x-pos <= halui.axis.z.pos-relative
net compensate-on compensate.enable-in <= woodpecker.comp-on
net eoffset-clr2 compensate.clear => or2_1.in1
net comp-count compensate.counts => woodpecker.comp-count
net map-ready compensate.map-ready => woodpecker.map-ready
setp compensate.fade-height 0.0
setp axis.z.eoffset-enable True
Workflow
The gcode program that creates probe_points.txt is created by one of 2 possible methods.
There should now be a file in the nc_files folder called {something}-probe-only.ngc. From the FILE page, set the file filter to G-Code Files, and navigate to the nc_files directory and load this file. Running this program will create a file called probe_points.txt