How to measure tool offset with fixed tool sensor in PlanetCNC TNG software

This tutorial will explain how to correctly use the Tool Offset / Measure feature with a fixed tool sensor using PlanetCNC TNG software and PlanetCNC motion controllers.

 

Fixed tool sensor

For a fixed tool sensor, we can use a dedicated tool measuring switch or, most basic solution, a standard microswitch fixed to a machine table.

When the tool activates the tool sensor, the controllers corresponding input is activated and the software sets a new tool offset value.

Example of fixed tool sensor used with Mk3 controller:

Configuring fixed tool sensor in  PlanetCNC TNG software

In PlanetCNC TNG under File/Settings/Program Options/Probe & Measure configure the input pin that you intend to use for the fixed tool sensor.

You can select between either Probe 1 or Probe 2 option. It doesn’t matter which one you choose.

 

The sensor input pin is selected from drop-down menu:

Now that your sensor is connected and configured, it is best to activate the sensor by hand to check if everything is functioning OK. Jog your machine (it can be in any direction) and see if the machine stops when you activate the sensor.

Under IO tab of main display check if the input is activated correctly:

 

Now move the machine to a position where a fixed sensor is mounted. Make sure that tool is right above the center of the fixed tool sensor or in case that you use the micro switch, above the lever.

 

Write down the Machine coordinates of the X and Y-axis. These values will be used for the configuration of sensors X and Y-axis position:

 

Jog Z-axis towards the sensor. When the sensor is activated, write down the Machine coordinate of the Z-axis. This value will be used for the configuration of sensor Z-axis position:

We would like to emphasize that it is very important what kind of tool is used when obtaining the Z-axis position value because all future tool measurements will be dependent on this value. That is why we call this tool also a default tool. The default tool should not be too long or too short. It should be some normal length.

Signs that your default tool was not suitable are usually Z-axis plunging into machine table or Z-axis activating limit switch after tool offset measurement.

 

Under File/Settings/Program Options/Offsets/Tool Offset/Measure Length, insert values that you previously wrote down for Sensor Position X, Y and Z:

 

Speed & Low:

Speed and Low are speed values of first and second tool offset measurement moves (only Z-axis).

The first reference move will be performed at Speed value. After the fixed tool sensor is activated, the machine retracts for the switch click distance and starts with the second measurement move, but this time at a Low-speed value. Make sure that the Speed value is not set too high to the point where a fixed tool sensor, tool, or machine could get damaged. The low value should be significantly lower than the Speed value.

Safe Height: After both tools offset measurement moves are finished, the machine will ascend to Safe Height value and return to the previous position.

Switch Click Distance: This is the distance from the point where the fixed tool sensor is activated and to the point when it is deactivated.

 

 

Measuring tool offset with  PlanetCNC TNG software

Tool offset measure procedure can be executed via menu item Machine/Tool Offset/Measure Length or  with left toolbar button:

ToolbarButton

Default sequence of Tool Offset Measure procedure:

-Machine will ascend to safe height at the current machine position and move to fixed sensors XY position.

-Machine will descend towards the fixed tool sensor with Speed value and when the sensor gets activated, Z-axis will retract for Switch Click Distance and measure tool offset again at Low-speed value. The machine will stop and ascend to a safe height.

-Software will set the new tool offset value

-Machine will return back to XYZ position

 

Measure tool offset script file

If you would like to edit script code or have a more in-depth look at the procedure itself, you can do that by opening the script file.

You can access and edit script files in settings under File/Settings/Program Options/Scripts/Tool Offset/Measure Length and click the button Edit Script.

The script file will open in TNG gcode editor. In order for the Measure Length script file to be generated and saved in your profiles Script folder, you need to click the Save button.

 

Leave a Reply