a blog of ideas and improvements for tormach cnc mills
articles | plugins | for sale | about | contact

PathPilot Plugins for Tormach Mills

Useful add-ons I've developed and tested on my 1100M. They should work on all Tormach mills (770M, 1100M, 15L, etc.). Lathe users may need minor edits—feel free to email me for help.


Available Plugins

      Custom Tab and WCS Array Adds a custom tab with quick buttons and a live WCS coordinate grid.
      Position Logger (to file) Floating window to quickly log current position in active WCS to ~/gcode/logger.txt. Great for reverse engineering or building drilling cycles by hand.
      Custom Admin Commands from MDI Line Run predefined scripts directly from MDI.
      F1 Status Window Toggle Killer F1 press now persistent - keeps you on the Status tab.
      Keyboard Jogging Killer Optional disable of keyboard jogging if you prefer pendant-only control.
      Modified ProbeGuard Prevents spindle start if tool 99 (probe) is selected OR if probe is out of limit switch-protected holder.
      Custom 4th Axis Scaling For DIY 4th axis builds, you will find the scaling incorrect versus OEM products like the MicroARC. This script helps you adjust the settings correctly.
      Auto Tool Table Backup Automates backing up your tool table to /gcode/tool_table_backup - default is hourly.
      Cycle Complete Notifier + Toggle Wrote a PathPilot script today that will send notifications (or do anything) when a file completes. But not as an M code. This runs as a plugin so that it will run after every NC program completes. As such, I have it on a toggle via CTRL + H.

The use case is for a situation I find myself in often: I load a long program not thinking I'm going to walk away from the machine, but then end up needing to go in the house or whatever. The NC file doesn't have a notification built in and, because it's running, I can't add retroactively add it. So, I'll toggle it on via CTRL+H and I'll get a Cycle Complete email once it's done.

      Tool Breakage &
Custom Message Notifier
This script is similar to the Cycle Complete Notifier. For users running an ETS with an ATC and implementing tool breakage detection, this script will notify you upon missed, wrong or broken tools.

It can also be edited to notify you on any Status Window message (like if the machine has been e-stopped).

      Estimated Runtime PathPilot will tell you the ETA of a running program, but only after it's run once and if you rename the file, you have to start all over.

Annoying on longer programs.

This script calculates run time on each file load and pushes it to the Status window.


Installation

Simply copy the plugin files into:

/home/operator/gcode/python/

Also required: ui_hooks.py (MD5: 33b0fc42b2d23884e8086c3e33eaacdd) must be present in the same folder.

After copying, restart PathPilot—the plugins will load automatically.


Additional Plugins

Dave Loomes also shares some excellent plugins at:

http://xoomspeed.com/CNC/pathpilot/plugins.htm

His original ProbeGuard is highly recommended. The version listed above is a lightly modified variant he kindly adapted for me.

Happy machining!
Let me know if you run into issues or have feature requests.

CUSTOM TAB AND WCS ARRAY V1.00

This plugin creates your own custom tab right on the PathPilot main page. It sits to the left of the Status tab.

It features a few buttons I slapped together, though you can edit this with a bit of python savvy. The big feature, though, is the WCS array, which features all X, Y and Z coordinates for G53 through G59. These update in real time as you move the machine.

Also features buttons that switch to G53-G59, buttons to Zero each of those WCS and a Zero All button that does exactly that.

The plugin is lightly invasive in that it modifies one OEM file (but backs it up before it does). I include an uninstall script to go back to stock settings (or, you can just rename the file yourself if you know how). The uninstall script ONLY uninstalls the plugin. It doesn't touch anything else on your machine, including your g code files.

For the geeks, the script modifies /home/operator/<your version>/python/images/tormach_mill_ui.glade (it makes a backup to tormach_mill_ui.glade.bak). Everything else is handled within the _plugin.py.


Patched Message

Uninstalled Message

This plugin survives PathPilot updates in that it will simply reinstall itself if it notices you have upgraded.

Copy ALL files (except the reversion script) into /gcode/python. Load PathPilot. It will install, then you will have to reload PathPilot to see the actual tab take effect. In other words, two reboots.

HOWEVER, if you are going from an older version to v2.10 or newer, Tormach significantly changed the UI, so I have two versions of this script (before approx 2.10 and after).

If you download it and it doesn't work, try the other version.

Install progress, errors, uninstall progress are all displayed in the Status Window.

Tested on 2.8.3, 2.9.1, 2.13.0, 2.14.0.

To uninstall, simply copy glade_and_tabs_reversion_plugin.py into /gcode/python and reboot.

If you want the midpoint and reboot scripts to work, copy them into /gcode/scripts (you may have to make the scripts directory). The reboot script DOES ask you if you're sure.


If you have the "brushed metal" background (versions earlier than approx 2.10), download these files.


If you have the more plain background (versions typically 2.10 or later), download these files.

glade_and_tabs_plugin.py (the plugin itself)

glade_custom_tab.txt (the code that's injected into the UI itself)

glade_match_block.txt (what the script finds to determine what version you have)

glade_patched_marker.txt (what the script finds to see if the plugin has been installed)

glade_and_tabs_reversion_plugin.py (the uninstall script)

glade_and_tabs_plugin.py

glade_custom_tab.txt

glade_match_block.txt

glade_patched_marker.txt

glade_and_tabs_reversion_plugin.py

POSITION LOGGER (TO FILE)

This plugin may be suitable for those reverse engineering or otherwise building code from hand.

You can move your machine to position and quickly log that position to file.

It'd be useful like if you had to write a drilling cycle program and didn't want to hande type a bunch of positions in.

Uses the active WCS and supports G20 and G21.

Logs to logger.txt and you can change the format of what's logged (G1 F50 before the coords, G0, nothing at all, etc) with minor python editing.

Position Logger v0.96

CUSTOM ADMIN COMMANDS FROM MDI LINE - v1.00

This plugin adds additional ADMIN commands to the PathPilot MDI line, similar to built-in commands like 'ADMIN CALC' and 'ADMIN DISPLAY'.

You can easily add your own, too.

 ─────────────────────────────────────────────────────────────────────
 ADDED COMMANDS:
 ADMIN GEDIT → Opens the Gedit text editor
 ADMIN CAJA → Opens the Caja file manager
 ADMIN TERM → Opens a Mate terminal window

Custom Admin Commands From MDI Line v1.00
MD5 Hash: e0dae34623beb0ed9434106722826b90

 F1 TOGGLE KILLER v1.00

PathPilot normally uses the F1 key as a shortcut to show the Status Window.
However, this view is *temporary* — the moment you release F1, the UI snaps
back to the previous screen. This plugin disables that automatic return,
letting the Status Window stay visible until you choose to leave it.

 HOW IT WORKS:
 • This plugin locates the active version of PathPilot's main UI script:
 /home/operator/vX.X.X/python/tormach_mill_ui.py
 • It searches for the line that performs the "F1 snap-back" behavior.
 • If found and not already patched, it:
 → Backs up the original file as tormach_mill_ui.py.bak
 → Comments out the F1 line safely
 → Writes the patched file back in place
 • A confirmation popup will appear, and log messages will be printed to
 the Status Window to confirm the patch was applied.

 SAFETY NOTES:
 • The patch is only applied once — it won’t touch the file if already patched.
 • A full backup is created before any changes are made.
 • If PathPilot is updated, the patch will reapply the next time it runs.
 • The original file can be restored at any time using the backup.

F1 Toggle Killer v1.00
MD5 Hash: 5e4f3830a856d76f21d9346967a4e9e8

 KEYBOARD JOG KILLER v1.00

 By default, PathPilot allows jogging the machine using keyboard keys:
 • Arrow keys (← ↑ ↓ →) move the X and Y axes
 • Page Up / Page Down control the Z axis

 While useful in some setups, this behavior can also be dangerous — a stray
 keystroke could unintentionally move your machine.

Keyboard Jog Killer v1.00
MD5 Hash: 2cb5682f27bf12e3f7e6891d01330ae6

MODIFIED PROBEGUARD v1.00

Xoomspeed's ProbeGuard will refuse to turn the spindle on if T99 is selected in PathPilot. This helps prevents destroying your wired probe, cable, etc. However, it does nothing if the probe is in the spindle, but T99 isn't selected, so I wanted to go one step further. I put a limit switch in the cradle where I store the probe. Which is connected to the USB IO module. So, when the probe is safely stored in its cradle, the limit switch is CLOSED.

The modified probeguard looks for that closed circuit. If it's open, it refuses to turn the spindle on. This provides, for me, the ultimate in spindle safety.

Modified ProbeGuard v1.00
MD5 Hash: 75836e6073451e50bcfb3abb7c9eca75

CUSTOM 4TH AXIS SCALING
##################################################
##                                              ##
##     CUSTOM 4TH AXIS SCALE MODIFIER v0.95     ##
##            www.tormachtips.com               ##
##               07 Jan 2026                    ##
##                                              ##
##################################################

# OVERVIEW:
# This plugin automatically applies custom scaling values for DIY or non-Tormach 4th axis hardware.
# Tormach-branded 4th axes (such as the MicroARC) use predefined steps-per-revolution values
# tuned for their hardware. However, when using custom-built or third-party 4th axis setups,
# these default values often result in incorrect angular rotation.
#
# SYMPTOM:
# You command a 360° rotation, but the 4th axis either under-rotates or over-rotates.
# This is caused by a mismatch in the SCALE parameter — which defines how many steps
# equal one full revolution.

# FILE MODIFIED:
# This plugin modifies the OEM configuration file:
#     /home/operator/v<version_number>/configs/common/4th_axes.inc
#
# That file is updated or replaced with each PathPilot update, so manual changes will not survive.
# This plugin ensures the correct values are restored automatically.

# WHAT IT DOES:
# - On PathPilot boot, determines the installed PathPilot version and builds the correct path.
# - Scans the 4th_axes.inc file for a "# CUSTOM SCALE" marker.
# - If not present:
#     - Creates a one-time backup at 4th_axes.inc.backup
#     - Comments out the original SCALE, STEPGEN_MAX_VEL, and STEPGEN_MAXACCEL lines.
#     - Inserts new values tuned for a typical Amazon DIY 4th axis:
#           SCALE            = 166.6666666
#           STEPGEN_MAX_VEL  = 162.0
#           STEPGEN_MAXACCEL = 1000.0
#     - Marks the file as modified with "# CUSTOM SCALE" on separate lines (to avoid breaking INI parsing).
#
# INSTRUCTIONS:
# - This plugin runs automatically each time PathPilot boots.
# - If changes were required, you will be notified in the PathPilot status window
#   and prompted to reboot to apply them.
# - Once patched, the plugin will not reapply changes unless the file is replaced or you upgrae PathPilot. 
#
# SAFETY:
# These values are known to work with commonly used 4th axis assemblies (e.g. 90:1 or 100:1 worm gearboxes with common stepper motor drivers).
# However, **always verify rotation distance manually** after first applying this patch.
# Incorrect SCALE or velocity/accel values may cause inaccurate cuts, lost steps, or drive faults.
#
# For support, tuning tips, or troubleshooting:
#     Visit: https://www.tormachtips.com
custom_4th_axis_plugin.py
AUTO TOOL TABLE BACKUP
#############################################
##                                         ##
##      Tool Table Auto Backup v0.95       ##
##           www.tormachtips.com           ##
##                                         ##
#############################################

## DESCRIPTION:
## This PathPilot plugin automatically backs up the tool table at regular time intervals.
## It runs as a background thread within the main UI thread using `ui_hooks`, and requires no user interaction.
##
## The backup is written as a timestamped `.csv` file to the directory specified by BACKUP_DIRECTORY.
## It supports both imperial and metric units, adapts to the tool table format found at runtime,
## and is compatible with both older and newer PathPilot versions for mill machines.
##
## This script is designed for *mill-only* machines and will silently skip backups on unsupported machine types.
## Lathe support is not yet included.

## HOW IT WORKS:
## - After plugin initialization, a backup is scheduled 5 seconds later.
## - A background thread is started which sleeps for `INTERVAL` seconds (default: 3600 (one hour)) between each backup.
## - On each interval, `perform_backup()` is called using `glib.idle_add` to stay thread-safe with the UI.
## - The tool table is polled and written out as a CSV with either the newer extended format (wear offsets, if supported)
##   or the legacy 4-column format (for compatibility with older PathPilot versions).
## - Script is written to be functionally similar to pressing the EXPORT button in PathPilot. 

## FEATURES:
## - Fully automated, no UI required
## - Metric/imperial detection via G-code (G21/G20)
## - Adaptive column format for new/old PathPilot versions
## - Timestamped backups with no overwrite risk
## - Writes to `/home/operator/gcode/tool_table_backup/` by default
## - Runs in a daemon thread for low system impact

## LIMITATIONS:
## - Only tested and supported on mill configurations (`MACHINE_TYPE_MILL`)
## - Lathe support is not yet implemented
## - No file rotation or cleanup logic — old backups will accumulate unless managed manually
## - Backups are based on polling the HAL status and may fail if the UI isn't fully initialized

## TO CUSTOMIZE:
## - Change `INTERVAL` (in seconds) to control how often backups occur
## - Change `BACKUP_DIRECTORY` to store CSVs elsewhere (must be writable by PathPilot)
## - Change `MAX_MILL_TOOLS` if your configuration uses a different tool pocket range

## SAFE TO IMPORT:
## CSVs generated by this plugin contain extra columns when supported but are still
## safely importable on older PathPilot systems. Extra columns are ignored during import.
auto_tool_table_backup_plugin.py
Cycle Complete Notifier + Toggle

Wrote a PathPilot script today that will send notifications (or do anything) when a file completes. But not as an M code. This runs as a plugin so that it will run after every NC program completes. As such, I have it on a toggle via CTRL + H.

Because it runs as a background plugin, you don't need to enter any custom M codes into your NC programs. It watches for, and will run, after every program-completed declaration.

The use case is for a situation I find myself in often: I load a long program not thinking I'm going to walk away from the machine, but then end up needing to go in the house or whatever. The NC file itself doesn't have a notification built in and, because it's already running, I can't add retroactively add it. So, I'll toggle the plugin on via CTRL+H and I'll get a Cycle Complete email once it's done.

Thought of another way: This gives you Cycle Complete functionality on every program you run, without having to add M codes to them. This, of course, is often unnecessary, so you toggle it off via CTRL + H.

To set this up, you'll need a gmail account with an App Password. This script uses the same logic and instructions from the M Code email sender. Follow those instructions and enter your settings in the included INI file.

You can toggle this script with CTRL + H or by editing the INI file directly (which is what CTRL + H does behind the scenes).

Cycle Complete Notifier + Toggle

Tool Breakage & Custom Message Notifier
DESCRIPTION:
    This PathPilot plugin monitors for important machine errors,
    such as tool breakage or ETS mismatches, by intercepting messages
    written to the internal error handler (Status Window). When a watched 
    phrase is detected, an email alert is automatically sent 
    to a configured recipient.

    It’s commonly used with G37 — an ETS command that verifies
    tool lengths against expected values. Deviations trigger a soft alarm,
    which this plugin can detect and notify you about.
    
    Use G37 P0.005 (for example). This checks if the currently loaded tool is 
    within 0.005" of tolerance when the ETS is tripped. If it's too long 
    (wrong tool or drawbar failure) or too short (wrong tool or broken tool), 
    it will alert PathPilot and thus this script and will email you.

INSTALLATION:
    1. Copy both of the following files into your PathPilot system:
          - breakage_plugin.py (this script)
          - breakage_config.ini (configuration file)

    2. Place both files into:
          /home/operator/gcode/python/

    3. Ensure this required support file is also present in that folder:
          - ui_hooks.py

    4. Edit the config (.ini) file. The fields are pretty straightforward.
       string1, string2, etc, are partial masks for anything that displays 
       in the Status Window. The exceeds tolerance lines are for tool breakage 
       across different versions of PathPilot (different verbiage).

    Notes:
    - `\\n` in the body becomes a newline.
    - `{msg}` is replaced with the raw PathPilot error message.
    - `{match}` is replaced with the string from [strings] that triggered the alert.
    - You may leave unused `string#` entries blank — they’ll be ignored.

NOTES:
    - The plugin hot-loads the INI on every event trigger.
    - No restart of PathPilot is needed to apply config changes.
    - Email sending is done in the background and does not interfere with machine performance.

To set this up, you'll need a gmail account with an App Password. This script uses the same logic and instructions from the M Code email sender.

Follow those instructions and enter your settings in the included INI file.

Tool Breakage & Custom Message Notifier

Estimated Runtime

PathPilot only shows the ETA of a program after it’s run once — and if you rename the file, that estimate resets. This can be frustrating, especially for longer jobs.

This plugin calculates an estimated runtime every time a file is loaded and displays it in the Status window. No need to run the file first.

It supports standard G-code (G0, G1, G20, G21), but doesn’t handle arcs (G2, G3) or all edge cases.

Default rapid speed for G0 moves is set to 100 IPM. You can adjust this in the script if your machine differs (e.g. MX, etc.).

For more advanced estimators with line-by-line analysis, see my scripts here and here.

Estimated Runtime