This tutorial will explain how to correctly use Work Position / Measure Height feature with movable sensor using PlanetCNC TNG software and PlanetCNC motion controllers.
Movable sensor is basically a switch that sends signal to motion controller corresponding input pin. Software will then calculate Z axis work position zero value, which is usually on the top of the material surface (tool tip just touching the material surface).
The most basic type of movable sensor is usually copper-clad laminate. Clad has soldered wire that is connected to controller sensor input, while GND signal is attached to tool via e.g. crocodile clip. But other switch hardware can be used too (lever switch etc… ), you just need to configure it correctly in settings.
Example of movable sensor used with Mk3 controller:
Connecting movable sensor with PlanetCNC motion controller
Configuring movable sensor in PlanetCNC TNG software
In PlanetCNC TNG under File/Settings/Program Options/Probe & Measure configure input pin that you intend to use for movable tool sensor.
You can select between either Probe 1 or Probe 2 option. It doesn’t matter which one you choose.
Input pin is selected from drop down menu:
Now that your sensor is connected and its input configured, it is best to activate sensor by hand to check if everything is functioning OK. Jog your machine (it can be in any direction) and see if machine stops when you activate sensor. Please note, that sensor dedicated input LED will be ON only when input is activated. If you use normally closed switch for your movable sensor, make sure that you invert its input under File/Settings/Input&Output.
Under IO tab of main display check if input is activated correctly:
Under File/Settings/Program Options/Offsets/Work Position/Measure Height, configure movable sensor parameters:
Speed & Low:
Speed and Low are speed values of first and second work position measurement moves (only Z axis).
First measurement move will be performed at Speed value. After movable sensor is activated, machine retracts for switch click distance and starts with the second measurement move, but this time at Low speed value. Make sure that Speed value is not set too high to the point where movable tool sensor, tool or machine could get damaged. Low value should be significantly lower that Speed value.
Size Z: If you use copper board as a movable sensor, then value of this parameter is the thickness of the copper board( usually 1.6mm).
Switch Click Distance: This is the distance from the point where movable tool sensor is activated and to the point when it is deactivated. For movable sensor this is usually zero. But you can use some small value, in order that software performs second measurement move.
Please note: Make sure that Speed value is not set too high. You see, during measuring procedure, when tool touches the surface (sensor gets activated) machine stops immediately. If your speed is too high, inertia on Z axis may cause loss of steps of Z axis stepper motor.
Work Position/Measure Height with PlanetCNC TNG software
Work position measure procedure can be executed via menu item Machine/Work Position/Measure Height or using left toolbar button:
Default sequence of Work Position/Measure Height procedure:
-Machine will start descending at current position in -Z direction using Speed value.
-When sensor is activated, machine will stop and ascend to Z height from which we started Measure Height procedure.
-Software will set new work position offset value
-Z axis work position value on surface of material should now be 0(zero).
Work Position/Measure Height script file
If you would like to edit script code or have more in-depth look at the procedure itself, you can do that by opening script file.
You can access and edit script file in settings under File/Settings/Program Options/Scripts/Work Position/Measure Height and click button Edit Script.
Script file will open in TNG gcode editor. In order that Work Position/Measure Height script file is generated and saved in your profiles Script folder, you need to click Save button.