Auto Levelling using G38.6

Auto levelling maps the surface of your material with the G38.6 digitising probe cycle, then uses the resulting height map to adjust your original G-code file. This page shows how to set up the third-party software AutolevellerAE to work with MASSO.

Uses
G38.6 digitising probe cycle
You need
Touch probe set up as a tool; AutolevellerAE
INFORMATION
AutolevellerAE is open-source software and MASSO has no association with it. This page covers only the settings needed to use it with MASSO, not how to use the software itself. AutolevellerAE generates the probing G-code; you then load the resulting MASSO Probe data.txt file back into it with your project G-code to create an adjusted file.

1. Set up the Z initialisation routine

1
Open Options › Z initialization routine.
2
Select Use Custom Block and enter your start-up routine (example below).
3
Press Apply, then OK.
Options menu, Z initialization routineCustom Z initialization block

Example custom Z initialisation block

This routine changes to the probe tool and uses G38.2 to zero Z at the correct starting height. Change it to suit your machine.

G21
MSG Load Probe
G04 P2000
Tx M06
MSG Probing the Z axis
G38.2 Z-150 F200
G92 Z0
G0 Z20
MSG Z axis now zeroed
G04 P2000
MSG Press Cycle Start to begin
M00
CodeResult
G21Sets metric units.
MSG Load Probe
G04 P2000
Shows “Load Probe”, then waits 2 seconds.
Tx M06Tool change to the touch probe. Replace Tx with the probe tool number set on the F1-Setup screen (Touch Probe setting), 1 to 100. For example, if the probe is tool 99, use T99 M06.
MSG Probing the Z axis
G38.2 Z-150 F200
Probes Z down at 200 mm/min and stops on touch. Z−150 is a machine coordinate; change it to suit your machine.
G92 Z0Sets Z0 at the surface with a temporary work offset.
G0 Z20Moves Z up 20 mm to Z20.
MSG Z axis now zeroed
G04 P2000
Shows “Z axis now zeroed”, then waits 2 seconds.
MSG Press Cycle Start to begin
M00
Shows the message, then stops and waits for Cycle Start.
INFORMATION
Define a touch probe tool and select it while probing, even without an automatic tool changer. The touch probe tool disables the spindle while selected – an important safety feature.
INFORMATION
The routine uses G92 to set Z zero. If you stop the file before it finishes, clear the temporary offset by running G92.1 in MDI.

2. Custom controller options

Open Options › Custom Controller Options and enter:

FieldValue
Probe WordG38.6
Open Log CommandMSG Probing Complete
Close Log CommandG92.1
File Extensionnc

Values in greyed-out fields can be ignored.

Custom Controller Options

3. Create a probing mesh

Probing mesh settings
FieldWhat to enter
Starting X / Starting YX and Y working coordinates to start probing from.
X Width / Y LengthX and Y working coordinates to finish probing at.
XY FeedFeed rate between probing locations.
Z FeedFeed rate for the Z probing move.
Probe DepthZ working coordinate where probing ends. If nothing is touched by this depth, a Probing error at: line is written to MASSO Probe data.txt before moving to the next point.
Probe ClearanceZ working coordinate the probe rises to after each touch. Too high makes probing slow; too low risks hitting the part between points.
Point SpacingDistance between probing locations.
Probe Safe HeightHeight Z rises to at the end of the probing cycle.

When you're happy with the settings, press Generate PFG to create the probing G-code file.

INFORMATION
The same process captures point clouds of 3D objects. A finer point spacing gives a more detailed capture, which you can pass to other software to render a 3D model.

4. Create an auto-levelled file

1
Load your G-code file (called the OGF in the software).
2
Load the captured MASSO Probe data.txt from your MASSO flash drive via File › Raw Data File (RPF).
3
Adjust the parameters as needed. See the AutolevellerAE manual for details.
4
Press Autolevel to generate the adjusted G-code file to run on MASSO.
WARNING
Incorrect use of this G-code can damage your probe and the item being probed, and can cause injury. Make sure you understand it and take care.

5. Probing check sheet

Setting up the PFG file
Start X / YMatch the X and Y position where cutting takes place, or you'll scan the wrong area.
Probe DepthDeep enough to cover the full surface. Where possible, stay within the travel of your touch probe to avoid damaging it.
Probe ClearanceThe minimum needed to clear the surface, for the most efficient cycle.
Point SpacingCoarse for auto levelling, fine for 3D rendering.
Probe Safe HeightHigh enough to clear clamps and other obstructions at the end of the file.
Getting ready to probe
1Load the probing PFG file.
2Load the probe tool with Tx M06, where Tx is the tool number in the F1-Setup screen Touch Probe setting.
3Set the probe's X and Y zero to match the cutter's X and Y zero, or you'll scan the wrong area.
4Move to the start X Y position you chose for probing. This may not be X0 Y0.
5If you're using the auto-zero routine above, set the probe's Z zero above the surface being probed.
6Run the G-code file.