Using the Claude Code extension within Visual Studio Code (VSC) should allow me to compare 2 sets of files, identify the differences between them and update one of them to include the content in the other. This might be Linuxcnc files such as the .ini and .hal files that define critical parameters and info such as the interconnections, scaling factors, preferences etc, without which your CNC system could not operate correctly.
I want to make a clean, new install of Linuxcnc, this time using the Probe Basic Lathe ("PBL") GUI, as I find the current "gmoccapy" interface rather clunky - it's a classic example of an interface that was designed by an engineer rather than any form of creative type with an eye for attractive aesthetics - "autist rather than artist", perhaps?
Yes, it's an annoying name - what is the reason for such a bizarre name? Like this apparently: Glade (the tool used to design the user interface); MOdular (reflecting its flexible design); CCAPY (an abbreviation for a Python-based CNC Control Application).
Certainly, Claude Code claims to be able to handle this kind of challenge. So let's give it a go. Go big or go home etc...
So the "workflow" might look like this:
- Use the Claude Code "chat" agent to guide me through installing a clean copy of the latest version of PBL. This initially runs as a simulation, using a collection of dummy files to fool it into thinking it's running a real machine.
- Install the Claude Code extension within VCS and identify a existing (working) version of Linuxcnc - in this case my gmoccapy instance.
- From within VSC, use the Claude Code chat panel to ask it to update the PBL files using the gmoccapy content. To do this yourself manually would require you to compare the contents of both corresponding files, identify any differences and decide which are correct. That in itself requires a deep understanding of how the Linuxcnc system works.
- Test run the installation, copying and pasting any error messages into the chat panel. You can allow it to automatically identify and edit the appropriate files to rectify any outstanding issues.
Blogger being the crap that it is will only allow pasting of plain text or rich text with some content missing. In this case, many of the text boxes are not showing their content and I can't see any way to get round it.
So here's what it did for me, with my prompts shown along the way:
I'll read both INI files in parallel to compare them.
Now I have both files. Let me do a systematic comparison.
Here is a complete breakdown of every line to change, organised by section. I've separated machine-specific values (must match gmoccapy) from app-specific lines (keep as probe_basic needs them).
[DISPLAY] — machine-specific values to change
| Line | Current (PB) | Change to | Why |
|---|---|---|---|
POSITION_OFFSET | RELATIVE | MACHINE | gmoccapy uses MACHINE |
MAX_LINEAR_VELOCITY | 3.333334 | 5.000000 | gmoccapy value (mm/s) |
DEFAULT_SPINDLE_SPEED | 300 | 1000 | gmoccapy value |
MAX_SPINDLE_OVERRIDE | 2.000000 | 1.5000000 | gmoccapy value |
INCREMENTS | JOG .10in .01in .001in .0001in | JOG 1mm 0.6mm 0.3mm 0.1mm 0.05mm 0.02mm | units + your preferred steps |
Keep as-is (PB-specific): DISPLAY, BACK_TOOL_LATHE, CONFIRM_EXIT, PREFERENCE_FILE, CONFIG_FILE, INTRO_GRAPHIC, USER_BUTTONS_PATH, USER_DROS_PATH, DRO_DISPLAY, OFFSET_COLUMNS, TOOL_TABLE_COLUMNS, KEYBOARD_JOG*, OPEN_FILE
[RS274NGC]
| Line | Current | Change to |
|---|---|---|
RS274NGC_STARTUP_CODE | G90 G7 G18 G95 G96 D2000 S200 | G7 G18 (gmoccapy value; the G90/G95/G96 etc. may cause issues on your real machine) |
PARAMETER_FILE | sim-lathe.var | linuxcnc.var |
[EMCMOT]
| Line | Current | Change to |
|---|---|---|
BASE_PERIOD = 100000 | present | Remove — Mesa FPGA hardware doesn't need a software base period |
[HAL] — entire section needs replacing
This is where the simulation files are referenced. Replace the three simulation HALFILEs with your real hardware files from gmoccapy:
[HAL]
POSTGUI_HALFILE = hallib/time.hal
HALUI = halui
HALFILE = hallib/Bantam_v1.hal
HALFILE = hallib/xhc-whb04b-6.hal
SHUTDOWN = hallib/shutdown.hal
POSTGUI_HALFILE = hallib/probe_basic_lathe_postgui.hal
Note: keep probe_basic_lathe_postgui.hal as the postgui file (not the gmoccapy one). You'll need to verify what PB requires in its postgui HAL, but the main hardware HAL files should be the same as gmoccapy.
[TRAJ]
| Line | Current | Change to |
|---|---|---|
LINEAR_UNITS | inch | mm |
MAX_LINEAR_VELOCITY | 3.333334 | 100.00 |
NO_FORCE_HOMING | 0 | 1 |
DEFAULT_VELOCITY = 1.0 | present | Remove (not in gmoccapy) |
DEFAULT_ACCELERATION = 20.0 | present | Remove |
MAX_ACCELERATION = 20.0 | present | Remove |
Keep: SPINDLES = 2 (PB may need this for its spindle controls)
[AXIS_X]
| Line | Current | Change to |
|---|---|---|
MIN_LIMIT | -5.0 | -100 |
MAX_LIMIT | 5.0 | 1.0 |
MAX_VELOCITY | 3.333334 | 100.0 |
MAX_ACCELERATION | 20.0 | 600.0 |
[JOINT_0]
| Line | Current | Change to |
|---|---|---|
MAX_VELOCITY | 3.333334 | 100 |
MAX_ACCELERATION | 20.0 | 600.0 |
INPUT_SCALE | 4000 | -200 |
MIN_LIMIT | -5.0 | -100.0 |
MAX_LIMIT | 5.0 | 1 |
FERROR | 0.050 | 10 |
MIN_FERROR | 0.010 | 1.00 |
HOME_OFFSET | 1.0 | 2.0 |
HOME_IGNORE_LIMITS | NO | YES |
HOME_IS_SHARED = 1 | present | Remove |
Add these lines (from gmoccapy, required for Mesa stepgen):
STEPGEN_MAXVEL = 125
STEPGEN_MAXACCEL = 750
P = 60
I = 40
D = 1
FF0 = 0
FF1 = 0.4
FF2 = 0.01
BIAS = 0
DEADBAND = 0.0045
MAX_OUTPUT = 0
DIRSETUP = 10000
DIRHOLD = 10000
STEPLEN = 2500
STEPSPACE = 2500
STEP_SCALE = 1000
[AXIS_Z]
| Line | Current | Change to |
|---|---|---|
MIN_LIMIT | 0 | -440 |
MAX_LIMIT | 12.0 | 2.0 |
MAX_VELOCITY | 3.333334 | 100 |
MAX_ACCELERATION | 20.0 | 600 |
[JOINT_1]
| Line | Current | Change to |
|---|---|---|
MAX_VELOCITY | 3.333334 | 100 |
MAX_ACCELERATION | 20.0 | 600 |
INPUT_SCALE | 4000 | 200 |
MIN_LIMIT | 0.0 | -440 |
MAX_LIMIT | 12.0 | 2.0 |
FERROR | 0.050 | 50 |
MIN_FERROR | 0.010 | 10.0 |
HOME_OFFSET | 1.0 | 5.0 |
HOME_IGNORE_LIMITS | NO | YES |
HOME_IS_SHARED = 1 | present | Remove |
HOME_SEQUENCE | 1 | leave blank: HOME_SEQUENCE = (matches gmoccapy — means Z is not auto-sequenced) |
Add these lines:
STEPGEN_MAXVEL = 125
STEPGEN_MAXACCEL = 750
P = 50
I = 10
D = 3
FF0 = 0
FF1 = 0.85
FF2 = 0.005
BIAS = 0
DEADBAND = 0.0045
MAX_OUTPUT = 0
DIRSETUP = 10000
DIRHOLD = 10000
STEPLEN = 2500
STEPSPACE = 2500
STEP_SCALE = 846.15
[SPINDLE_0] — add entire section (not present in PB file at all)
[SPINDLE_0]
P = 1
I = 0
D = 0
FF0 = 1
FF1 = 0
FF2 = 0
BIAS = 0
DEADBAND = 0
MAX_OUTPUT = 4000
ENCODER_SCALE = 2400
OUTPUT_SCALE = 4475
OUTPUT_MIN_LIMIT = 0
OUTPUT_MAX_LIMIT = 4000
One note on HOME_SEQUENCE for Z: gmoccapy has it blank, which disables automatic Z homing sequence. If you want Z to home automatically after X (as the sim config has it), you may want to keep HOME_SEQUENCE = 1. The blank value in gmoccapy is probably intentional — worth confirming.
Do you want me to apply all these changes directly to probe_basic_lathe.ini?
cp /home/murray/linuxcnc/configs/pb_lathe_murray/probe_basic_lathe.ini /home/murray/linuxcnc/configs/pb_lathe_murray/probe_basic_lathe.ini.bak(Bash completed with no output)Backup created. Now applying all changes.
Now let me verify the final file looks correct:
The file looks correct. All changes are applied and the backup is at probe_basic_lathe.ini.bak.
Summary of what was changed:
- [DISPLAY]: POSITION_OFFSET→MACHINE, MAX_LINEAR_VELOCITY→5.0, DEFAULT_SPINDLE_SPEED→1000, MAX_SPINDLE_OVERRIDE→1.5, INCREMENTS→mm steps
- [RS274NGC]: startup code stripped to
G7 G18, PARAMETER_FILE→linuxcnc.var - [EMCMOT]: removed BASE_PERIOD
- [HAL]: replaced 3 simulation HAL files with the real hardware files from gmoccapy
- [TRAJ]: units→mm, MAX_LINEAR_VELOCITY→100, NO_FORCE_HOMING→1, removed DEFAULT_VELOCITY/DEFAULT_ACCELERATION/MAX_ACCELERATION
- [AXIS_X/Z]: limits, velocity, acceleration updated to machine values
- [JOINT_0/1]: scales, PID, ferror, home offsets, stepgen params, timing values all updated; HOME_IS_SHARED removed; full stepgen/PID block added
- [SPINDLE_0]: entire section added
probe_basic_lathe.ini -- Changes from simulation defaults to machine settings
Date: 22 April 2026
Source of machine values: gmoccapy_lathe/gmoccapy_lathe.ini (known-working)
Backup of original file: probe_basic_lathe.ini.bak
================================================================================
[DISPLAY]
POSITION_OFFSET RELATIVE -> MACHINE
MAX_LINEAR_VELOCITY 3.333334 -> 5.000000
DEFAULT_SPINDLE_SPEED 300 -> 1000
MAX_SPINDLE_OVERRIDE 2.000000 -> 1.5000000
INCREMENTS JOG .10in .01in -> JOG 1mm 0.6mm 0.3mm 0.1mm 0.05mm 0.02mm
.001in .0001in
[RS274NGC]
RS274NGC_STARTUP_CODE G90 G7 G18 G95 -> G7 G18
G96 D2000 S200
PARAMETER_FILE sim-lathe.var -> linuxcnc.var
[EMCMOT]
BASE_PERIOD = 100000 -> REMOVED (not needed with Mesa FPGA hardware)
[HAL]
HALFILE = hallib/core_sim_2.hal -> REMOVED (simulation files)
HALFILE = hallib/simulated_home_xz.hal -> REMOVED
HALFILE = hallib/simulated_lathe.hal -> REMOVED
-> ADDED: POSTGUI_HALFILE = hallib/time.hal
-> ADDED: HALFILE = hallib/Bantam_v1.hal
-> ADDED: HALFILE = hallib/xhc-whb04b-6.hal
-> ADDED: SHUTDOWN = hallib/shutdown.hal
POSTGUI_HALFILE = hallib/probe_basic_lathe_postgui.hal (kept)
[TRAJ]
LINEAR_UNITS inch -> mm
MAX_LINEAR_VELOCITY 3.333334 -> 100.00
NO_FORCE_HOMING 0 -> 1
DEFAULT_VELOCITY = 1.0 -> REMOVED
DEFAULT_ACCELERATION = 20.0 -> REMOVED
MAX_ACCELERATION = 20.0 -> REMOVED
[AXIS_X]
MIN_LIMIT -5.0 -> -100
MAX_LIMIT 5.0 -> 1.0
MAX_VELOCITY 3.333334 -> 100.0
MAX_ACCELERATION 20.0 -> 600.0
[JOINT_0]
MAX_VELOCITY 3.333334 -> 100
MAX_ACCELERATION 20.0 -> 600.0
INPUT_SCALE 4000 -> -200
MIN_LIMIT -5.0 -> -100.0
MAX_LIMIT 5.0 -> 1
FERROR 0.050 -> 10
MIN_FERROR 0.010 -> 1.00
HOME_OFFSET 1.0 -> 2.0
HOME_IGNORE_LIMITS NO -> YES
HOME_IS_SHARED = 1 -> REMOVED
ADDED: STEPGEN_MAXVEL = 125
ADDED: STEPGEN_MAXACCEL = 750
ADDED: P = 60, I = 40, D = 1
ADDED: FF0 = 0, FF1 = 0.4, FF2 = 0.01
ADDED: BIAS = 0, DEADBAND = 0.0045, MAX_OUTPUT = 0
ADDED: DIRSETUP = 10000, DIRHOLD = 10000
ADDED: STEPLEN = 2500, STEPSPACE = 2500
ADDED: STEP_SCALE = 1000
[AXIS_Z]
MIN_LIMIT 0 -> -440
MAX_LIMIT 12.0 -> 2.0
MAX_VELOCITY 3.333334 -> 100
MAX_ACCELERATION 20.0 -> 600
[JOINT_1]
MAX_VELOCITY 3.333334 -> 100
MAX_ACCELERATION 20.0 -> 600
INPUT_SCALE 4000 -> 200
MIN_LIMIT 0.0 -> -440
MAX_LIMIT 12.0 -> 2.0
FERROR 0.050 -> 50
MIN_FERROR 0.010 -> 10.0
HOME_OFFSET 1.0 -> 5.0
HOME_IGNORE_LIMITS NO -> YES
HOME_SEQUENCE 1 -> (blank -- Z not auto-sequenced, matches gmoccapy)
HOME_IS_SHARED = 1 -> REMOVED
ADDED: STEPGEN_MAXVEL = 125
ADDED: STEPGEN_MAXACCEL = 750
ADDED: P = 50, I = 10, D = 3
ADDED: FF0 = 0, FF1 = 0.85, FF2 = 0.005
ADDED: BIAS = 0, DEADBAND = 0.0045, MAX_OUTPUT = 0
ADDED: DIRSETUP = 10000, DIRHOLD = 10000
ADDED: STEPLEN = 2500, STEPSPACE = 2500
ADDED: STEP_SCALE = 846.15
[SPINDLE_0] -- ENTIRE SECTION ADDED (was absent from simulation file)
P = 1, I = 0, D = 0
FF0 = 1, FF1 = 0, FF2 = 0
BIAS = 0, DEADBAND = 0
MAX_OUTPUT = 4000
ENCODER_SCALE = 2400
OUTPUT_SCALE = 4475
OUTPUT_MIN_LIMIT = 0
OUTPUT_MAX_LIMIT = 4000
================================================================================
Lines NOT changed (probe_basic_lathe specific, left as-is):
[DISPLAY] DISPLAY, BACK_TOOL_LATHE, CONFIRM_EXIT, PREFERENCE_FILE,
CONFIG_FILE, INTRO_GRAPHIC, OPEN_FILE, USER_BUTTONS_PATH,
USER_DROS_PATH, DRO_DISPLAY, OFFSET_COLUMNS,
TOOL_TABLE_COLUMNS, KEYBOARD_JOG, KEYBOARD_JOG_SAFETY_OFF
[RS274NGC] SUBROUTINE_PATH
[TRAJ] SPINDLES = 2
[EMCIO] TOOL_TABLE = lathe.tbl
================================================================================
Log saved to changes_from_sim_to_machine_2026-04-22.txt. It's a plain text file so any text editor or print dialog will render it cleanly.
Let me first survey both directories to understand what exists.
find /home/murray/linuxcnc/configs/gmoccapy_Bantam -type f | sort && echo "---" && find /home/murray/linuxcnc/configs/pb_lathe_murray -type f | sort/home/murray/linuxcnc/configs/gmoccapy_Bantam/also_working_lathemacro.ui
/home/murray/linuxcnc/configs/gmoccapy_Bantam/AP_lathemacro.ui
/home/murray/linuxcnc/configs/gmoccapy_Bantam/combined (current).ini
/home/murray/linuxcnc/configs/gmoccapy_Bantam/combined.hal
/home/murray/linuxcnc/configs/gmoccapy_Bantam/combined.ini
/home/murray/linuxcnc/configs/gmoccapy_Bantam/combined_untidy_but_working.hal
/home/murray/linuxcnc/configs/gmoccapy_Bantam/combined_untidy_but_works.ini
/home/murray/linuxcnc/configs/gmoccapy_Bantam/custom.hal
/home/murray/linuxcnc/configs/gmoccapy_Bantam/custom_postgui.hal
/home/murray/linuxcnc/configs/gmoccapy_Bantam/ex_hallib/combined.hal
/home/murray/linuxcnc/configs/gmoccapy_Bantam/ex_hallib/custom.hal
/home/murray/linuxcnc/configs/gmoccapy_Bantam/ex_hallib/custom_postgui.hal
/home/murray/linuxcnc/configs/gmoccapy_Bantam/ex_hallib/gmoccapy_postgui.hal
/home/murray/linuxcnc/configs/gmoccapy_Bantam/ex_hallib/shutdown.hal
/home/murray/linuxcnc/configs/gmoccapy_Bantam/ex_hallib/xhc-whb04b-6.hal
/home/murray/linuxcnc/configs/gmoccapy_Bantam/ex_sim.log
/home/murray/linuxcnc/configs/gmoccapy_Bantam/gmoccapy_postgui.hal
/home/murray/linuxcnc/configs/gmoccapy_Bantam/gmoccapy_preferences
/home/murray/linuxcnc/configs/gmoccapy_Bantam/lathehandler.py
/home/murray/linuxcnc/configs/gmoccapy_Bantam/lathehandler.pyc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/lathe_macros/2016 files/position.txt
/home/murray/linuxcnc/configs/gmoccapy_Bantam/lathe_macros/2016 files/savestate.sav
/home/murray/linuxcnc/configs/gmoccapy_Bantam/lathe_macros/2016 files/simulated_home.hal
/home/murray/linuxcnc/configs/gmoccapy_Bantam/lathe_macros/2016 files/sim.var
/home/murray/linuxcnc/configs/gmoccapy_Bantam/lathe_macros/axis_manualtoolchange.hal
/home/murray/linuxcnc/configs/gmoccapy_Bantam/lathe_macros/bender.ngc~
/home/murray/linuxcnc/configs/gmoccapy_Bantam/lathe_macros/boring.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/lathe_macros/boring.ngc~
/home/murray/linuxcnc/configs/gmoccapy_Bantam/lathe_macros/chamfer.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/lathe_macros/core_sim.hal~
/home/murray/linuxcnc/configs/gmoccapy_Bantam/lathe_macros/drilling.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/lathe_macros/.DS_Store
/home/murray/linuxcnc/configs/gmoccapy_Bantam/lathe_macros/facing.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/lathe_macros/grooving.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/lathe_macros/lathe.hal
/home/murray/linuxcnc/configs/gmoccapy_Bantam/lathe_macros/lathe.hal~
/home/murray/linuxcnc/configs/gmoccapy_Bantam/lathe_macros/lathehandler.py
/home/murray/linuxcnc/configs/gmoccapy_Bantam/lathe_macros/lathehandler.py~
/home/murray/linuxcnc/configs/gmoccapy_Bantam/lathe_macros/lathehandler.pyc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/lathe_macros/lathemacro_backup_2026-01-31.ui
/home/murray/linuxcnc/configs/gmoccapy_Bantam/lathe_macros/lathemacro.ini
/home/murray/linuxcnc/configs/gmoccapy_Bantam/lathe_macros/lathemacro.ini~
/home/murray/linuxcnc/configs/gmoccapy_Bantam/lathe_macros/lathe_macros.ini
/home/murray/linuxcnc/configs/gmoccapy_Bantam/lathe_macros/LatheMacro.svg
/home/murray/linuxcnc/configs/gmoccapy_Bantam/lathe_macros/LatheMacro.svg~
/home/murray/linuxcnc/configs/gmoccapy_Bantam/lathe_macros/lathemacro.ui
/home/murray/linuxcnc/configs/gmoccapy_Bantam/lathe_macros/lathemacro.ui~
/home/murray/linuxcnc/configs/gmoccapy_Bantam/lathe_macros/LICENSE
/home/murray/linuxcnc/configs/gmoccapy_Bantam/lathe_macros/radius.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/lathe_macros/README
/home/murray/linuxcnc/configs/gmoccapy_Bantam/lathe_macros/README~
/home/murray/linuxcnc/configs/gmoccapy_Bantam/lathe_macros/sim_pin.hal~
/home/murray/linuxcnc/configs/gmoccapy_Bantam/lathe_macros/simulated_home.hal~
/home/murray/linuxcnc/configs/gmoccapy_Bantam/lathe_macros/test_lathemacro.ui
/home/murray/linuxcnc/configs/gmoccapy_Bantam/lathe_macros/threading.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/lathe_macros/tool.tbl
/home/murray/linuxcnc/configs/gmoccapy_Bantam/lathe_macros/touchy.hal
/home/murray/linuxcnc/configs/gmoccapy_Bantam/lathe_macros/touchy.hal~
/home/murray/linuxcnc/configs/gmoccapy_Bantam/lathe_macros/turning.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/lathe_macros/turning.ngc~
/home/murray/linuxcnc/configs/gmoccapy_Bantam/LatheMacro.svg
/home/murray/linuxcnc/configs/gmoccapy_Bantam/lathemacro.ui
/home/murray/linuxcnc/configs/gmoccapy_Bantam/lathemacro.ui~
/home/murray/linuxcnc/configs/gmoccapy_Bantam/linuxcnc.var
/home/murray/linuxcnc/configs/gmoccapy_Bantam/linuxcnc.var.bak
/home/murray/linuxcnc/configs/gmoccapy_Bantam/Muzzer_Gmoccapy_lathe_combined.pref
/home/murray/linuxcnc/configs/gmoccapy_Bantam/possiblymessedlathemacro.ui
/home/murray/linuxcnc/configs/gmoccapy_Bantam/__pycache__/lathehandler.cpython-311.pyc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/python/remap.py
/home/murray/linuxcnc/configs/gmoccapy_Bantam/python/stdglue.py
/home/murray/linuxcnc/configs/gmoccapy_Bantam/python/toplevel.py
/home/murray/linuxcnc/configs/gmoccapy_Bantam/savestate.sav
/home/murray/linuxcnc/configs/gmoccapy_Bantam/savestate.sav.BAD
/home/murray/linuxcnc/configs/gmoccapy_Bantam/shutdown.hal
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/change.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/clamptool.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/extendatc.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/go_to_g30.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/go_to_home.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/go_to_position.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/go_to_zero.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/m10.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/m11.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/m12.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/m13.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/m14.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/m21.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/m22.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/m23.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/m24.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/m25.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/m26.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/m6_tool_call_main_panel.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/m6_tool_call_mt_touch_panel.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/m6_tool_call_touch_panel.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/macro_Instructions.txt
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/mxx_ngc_files_combined.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/mxx_ngc_sim_files_combined.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/on_abort.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/probe_back_left_inside_corner.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/probe_back_left_top_corner.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/probe_back_right_inside_corner.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/probe_back_right_top_corner.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/probe_back_top_side.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/probe_cal_reset.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/probe_cal_round_boss.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/probe_cal_round_pocket.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/probe_cal_square_boss.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/probe_cal_square_pocket.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/probe_corner_x_minus_edge_angle.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/probe_corner_x_plus_edge_angle.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/probe_corner_y_minus_edge_angle.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/probe_corner_y_plus_edge_angle.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/probe_front_left_inside_corner.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/probe_front_left_top_corner.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/probe_front_right_inside_corner.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/probe_front_right_top_corner.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/probe_front_top_side.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/probe_left_top_side.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/probe_rect_boss.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/probe_rect_pocket.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/probe_ridge_x.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/probe_ridge_y.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/probe_right_top_side.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/probe_round_boss.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/probe_round_pocket.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/probe_top_back_edge_angle.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/probe_top_front_edge_angle.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/probe_top_left_edge_angle.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/probe_top_right_edge_angle.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/probe_valley_x.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/probe_valley_y.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/probe_x_minus.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/probe_x_minus_wco.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/probe_x_plus.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/probe_x_plus_wco.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/probe_y_minus.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/probe_y_minus_wco.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/probe_y_plus.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/probe_y_plus_wco.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/probe_z_minus.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/probe_z_minus_sub.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/probe_z_minus_wco.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/reset_all_data.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/retractatc.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/set_g30_position.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/set_mt_x_sub.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/set_mt_z_sub.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/toolchange.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/touch_off_x.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/touch_off_z.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/touch_x.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/touch_z.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/unclamptool.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/x_data_reset.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/subroutines/z_data_reset.ngc
/home/murray/linuxcnc/configs/gmoccapy_Bantam/Thursday_lathemacro.ui
/home/murray/linuxcnc/configs/gmoccapy_Bantam/tool.tbl
/home/murray/linuxcnc/configs/gmoccapy_Bantam/works_lathemacro (copy 1).ui
/home/murray/linuxcnc/configs/gmoccapy_Bantam/xhc-whb04b-6.hal
---
/home/murray/linuxcnc/configs/pb_lathe_murray/changes_from_sim_to_machine_2026-04-22.txt
/home/murray/linuxcnc/configs/pb_lathe_murray/custom_config.yml
/home/murray/linuxcnc/configs/pb_lathe_murray/hallib/core_sim_2.hal
/home/murray/linuxcnc/configs/pb_lathe_murray/hallib/core_sim_4.hal
/home/murray/linuxcnc/configs/pb_lathe_murray/hallib/core_xyzclathe_sim.hal
/home/murray/linuxcnc/configs/pb_lathe_murray/hallib/probe_basic_lathe_postgui.hal
/home/murray/linuxcnc/configs/pb_lathe_murray/hallib/sim_spindle_encoder.hal
/home/murray/linuxcnc/configs/pb_lathe_murray/hallib/simulated_home_xyzc.hal
/home/murray/linuxcnc/configs/pb_lathe_murray/hallib/simulated_home_xz.hal
/home/murray/linuxcnc/configs/pb_lathe_murray/hallib/simulated_lathe.hal
/home/murray/linuxcnc/configs/pb_lathe_murray/hallib/spindle_sim.hal
/home/murray/linuxcnc/configs/pb_lathe_murray/lathe.tbl
/home/murray/linuxcnc/configs/pb_lathe_murray/pbsplash.png
/home/murray/linuxcnc/configs/pb_lathe_murray/probe_basic_lathe.ini
/home/murray/linuxcnc/configs/pb_lathe_murray/probe_basic_lathe.ini.bak
/home/murray/linuxcnc/configs/pb_lathe_murray/python/remap.py
/home/murray/linuxcnc/configs/pb_lathe_murray/python/stdglue.py
/home/murray/linuxcnc/configs/pb_lathe_murray/python/toplevel.py
/home/murray/linuxcnc/configs/pb_lathe_murray/sim-lathe.var
/home/murray/linuxcnc/configs/pb_lathe_murray/sim-lathe.var.bak
/home/murray/linuxcnc/configs/pb_lathe_murray/sim.log
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/backup_restore.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/backup_status.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/chamfer.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/clamptool.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/drill.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/extendatc.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/facing.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/go_to_g30.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/go_to_home.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/go_to_zero.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/m10.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/m11.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/m12.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/m13.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/m21.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/m22.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/m23.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/m24.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/m25.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/m26.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/m6_tool_call_main_panel.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/m6_tool_call_touch_panel.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/move_head_above_carousel.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/move_tool_to_carousel_height.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/on_abort.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/orientspindle.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_back_left_inside_corner.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_back_left_top_corner.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_back_right_inside_corner.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_back_right_top_corner.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_back_top_side.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_cal_reset.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_cal_round_boss.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_cal_round_pocket.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_cal_square_boss.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_cal_square_pocket.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_corner_x_minus_edge_angle.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_corner_x_plus_edge_angle.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_corner_y_minus_edge_angle.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_corner_y_plus_edge_angle.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_front_left_inside_corner.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_front_left_top_corner.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_front_right_inside_corner.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_front_right_top_corner.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_front_top_side.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_left_top_side.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_rect_boss.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_rect_pocket_center_start.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_rect_pocket.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_ridge_x.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_ridge_y.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_right_top_side.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_round_boss.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_round_pocket_center_start.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_round_pocket.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_spindle_nose.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_top_back_edge_angle.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_top_front_edge_angle.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_top_left_edge_angle.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_top_right_edge_angle.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_valley_x_center_start.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_valley_x.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_valley_y_center_start.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_valley_y.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_x_minus.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_x_minus_wco.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_x_plus.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_x_plus_wco.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_y_minus.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_y_minus_wco.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_y_plus.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_y_plus_wco.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_z_minus_sub.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_z_minus_wco.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/program_coolant.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/radius.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/reset_all_data.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/retractatc.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/set_g30_position.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/set_mt_x_sub.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/set_mt_z_sub.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/tapping.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/threading.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/toolchange.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/tool_touch_off.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/touch_off_x.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/touch_off_z.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/touch_x.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/touch_z.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/unclamptool.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/x_data_reset.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/z_data_reset.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/user_buttons/template_user_buttons/__pycache__/template_user_buttons.cpython-311.pyc
/home/murray/linuxcnc/configs/pb_lathe_murray/user_buttons/template_user_buttons/template_user_buttons.py
/home/murray/linuxcnc/configs/pb_lathe_murray/user_buttons/template_user_buttons/template_user_buttons.ui
/home/murray/linuxcnc/configs/pb_lathe_murray/user_buttons/template_user_buttons/template_user_buttons_ui.py
/home/murray/linuxcnc/configs/pb_lathe_murray/user_dro_display/user_dros/dros_user.py
/home/murray/linuxcnc/configs/pb_lathe_murray/user_dro_display/user_dros/dros_user.ui
/home/murray/linuxcnc/configs/pb_lathe_murray/user_dro_display/user_dros/dros_user_ui.py
/home/murray/linuxcnc/configs/pb_lathe_murray/user_dro_display/user_dros/offset_dros_user.ui
/home/murray/linuxcnc/configs/pb_lathe_murray/user_dro_display/user_dros/offset_dros_user_ui.py
/home/murray/linuxcnc/configs/pb_lathe_murray/user_dro_display/xyzc_dros/dros_xyzc.py
/home/murray/linuxcnc/configs/pb_lathe_murray/user_dro_display/xyzc_dros/dros_xyzc.ui
/home/murray/linuxcnc/configs/pb_lathe_murray/user_dro_display/xyzc_dros/dros_xyzc_ui.py
/home/murray/linuxcnc/configs/pb_lathe_murray/user_dro_display/xyzc_dros/offset_dros_xyzc.ui
/home/murray/linuxcnc/configs/pb_lathe_murray/user_dro_display/xyzc_dros/offset_dros_xyzc_ui.py
/home/murray/linuxcnc/configs/pb_lathe_murray/user_dro_display/xzc_dros/dros_xzc.py
/home/murray/linuxcnc/configs/pb_lathe_murray/user_dro_display/xzc_dros/dros_xzc.ui
/home/murray/linuxcnc/configs/pb_lathe_murray/user_dro_display/xzc_dros/dros_xzc_ui.py
/home/murray/linuxcnc/configs/pb_lathe_murray/user_dro_display/xzc_dros/offset_dros_xzc.ui
/home/murray/linuxcnc/configs/pb_lathe_murray/user_dro_display/xzc_dros/offset_dros_xzc_ui.py
/home/murray/linuxcnc/configs/pb_lathe_murray/user_dro_display/xz_dros/dros_xz.py
/home/murray/linuxcnc/configs/pb_lathe_murray/user_dro_display/xz_dros/dros_xz.ui
/home/murray/linuxcnc/configs/pb_lathe_murray/user_dro_display/xz_dros/dros_xz_ui.py
/home/murray/linuxcnc/configs/pb_lathe_murray/user_dro_display/xz_dros/offset_dros_xz.ui
/home/murray/linuxcnc/configs/pb_lathe_murray/user_dro_display/xz_dros/offset_dros_xz_ui.py
/home/murray/linuxcnc/configs/pb_lathe_murray/user_dro_display/xz_dros/__pycache__/dros_xz.cpython-311.pyc
/home/murray/linuxcnc/configs/pb_lathe_murray/user_tabs/template_main/template_main.py
/home/murray/linuxcnc/configs/pb_lathe_murray/user_tabs/template_main/template_main.ui
/home/murray/linuxcnc/configs/pb_lathe_murray/user_tabs/template_main/template_main_ui.py
/home/murray/linuxcnc/configs/pb_lathe_murray/user_tabs/template_sidebar/template_sidebar.py
/home/murray/linuxcnc/configs/pb_lathe_murray/user_tabs/template_sidebar/template_sidebar.ui
/home/murray/linuxcnc/configs/pb_lathe_murray/user_tabs/template_sidebar/template_sidebar_ui.py
/home/murray/linuxcnc/configs/pb_lathe_murray/.vcp_persistent_data.pickleNow let me read all the relevant HAL files from gmoccapy_Bantam and the gmoccapy_lathe hallib, plus the existing PB postgui HAL:
Now let me read the gmoccapy_lathe hallib files and the gmoccapy_Bantam custom_postgui to get the full picture:
Now I have everything I need. Let me analyse the situation before writing:
Bantam_v1.hal— usecombined.halas the base (it's the Nov 2025 version, more complete thanBantam_v1.hal), but swap outhal_manualtoolchangefor PB'sqtpyvcptool-change nets, and add ascale_to_rpmcomponent that the PB postgui expects for spindle RPM display.xhc-whb04b-6.hal— copy from gmoccapy_Bantam directly (already correct for this hardware).shutdown.hal— empty, same as gmoccapy_Bantam.- Also update the INI to remove
POSTGUI_HALFILE = hallib/time.hal— the PB postgui already loadstimeandnot, so keeping it would cause a double-load error.
ls /home/murray/linuxcnc/configs/pb_lathe_murray/hallib/core_sim_2.hal
core_sim_4.hal
core_xyzclathe_sim.hal
probe_basic_lathe_postgui.hal
sim_spindle_encoder.hal
simulated_home_xyzc.hal
simulated_home_xz.hal
simulated_lathe.hal
spindle_sim.halGood — no existing Bantam_v1.hal, xhc-whb04b-6.hal or shutdown.hal. Creating all three now, then updating the INI.
# Muzzer / Probe Basic Lathe
# Derived from gmoccapy_Bantam/combined.hal (30 Nov 2025)
# Adapted for Probe Basic: hal_manualtoolchange replaced by iocontrol nets
# (PB postgui connects tool-change to qtpyvcp_manualtoolchange)
# Added scale_to_rpm component for PB spindle RPM display
loadrt [KINS]KINEMATICS
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
loadrt hostmot2
loadrt hm2_pci config=" num_encoders=4 num_pwmgens=0 num_stepgens=2 sserial_port_0=00xxxx"
setp hm2_5i25.0.watchdog.timeout_ns 5000000
loadrt pid names=pid.x,pid.z,pid.s
loadrt scale names=scale_to_rpm
addf hm2_5i25.0.read servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf pid.x.do-pid-calcs servo-thread
addf pid.z.do-pid-calcs servo-thread
addf pid.s.do-pid-calcs servo-thread
addf scale_to_rpm.0 servo-thread
addf hm2_5i25.0.write servo-thread
setp hm2_5i25.0.dpll.01.timer-us -50
setp hm2_5i25.0.stepgen.timer-number 1
# external input signals
net max-home-x <= hm2_5i25.0.7i76.0.0.input-00
net min-x <= hm2_5i25.0.7i76.0.0.input-01-not
net max-home-z <= hm2_5i25.0.7i76.0.0.input-03
net min-z <= hm2_5i25.0.7i76.0.0.input-02
#*******************
# AXIS X JOINT 0
#*******************
setp pid.x.Pgain [JOINT_0]P
setp pid.x.Igain [JOINT_0]I
setp pid.x.Dgain [JOINT_0]D
setp pid.x.bias [JOINT_0]BIAS
setp pid.x.FF0 [JOINT_0]FF0
setp pid.x.FF1 [JOINT_0]FF1
setp pid.x.FF2 [JOINT_0]FF2
setp pid.x.deadband [JOINT_0]DEADBAND
setp pid.x.maxoutput [JOINT_0]MAX_OUTPUT
setp pid.x.error-previous-target true
setp pid.x.maxerror 5.0
net x-index-enable <=> pid.x.index-enable
net x-enable => pid.x.enable
net x-pos-cmd => pid.x.command
net x-pos-fb => pid.x.feedback
net x-output <= pid.x.output
# Step Gen signals/setup
setp hm2_5i25.0.stepgen.00.dirsetup [JOINT_0]DIRSETUP
setp hm2_5i25.0.stepgen.00.dirhold [JOINT_0]DIRHOLD
setp hm2_5i25.0.stepgen.00.steplen [JOINT_0]STEPLEN
setp hm2_5i25.0.stepgen.00.stepspace [JOINT_0]STEPSPACE
setp hm2_5i25.0.stepgen.00.position-scale [JOINT_0]STEP_SCALE
setp hm2_5i25.0.stepgen.00.step_type 0
setp hm2_5i25.0.stepgen.00.control-type 1
setp hm2_5i25.0.stepgen.00.maxaccel [JOINT_0]STEPGEN_MAXACCEL
setp hm2_5i25.0.stepgen.00.maxvel [JOINT_0]STEPGEN_MAXVEL
# ---closedloop stepper signals---
setp hm2_5i25.0.encoder.02.scale [JOINT_0]INPUT_SCALE
net x-pos-cmd <= joint.0.motor-pos-cmd
net x-vel-cmd <= joint.0.vel-cmd
net x-output <= hm2_5i25.0.stepgen.00.velocity-cmd
net x-pos-fb <= hm2_5i25.0.encoder.02.position
net x-pos-fb => joint.0.motor-pos-fb
net x-enable <= joint.0.amp-enable-out
net x-enable => hm2_5i25.0.stepgen.00.enable
# ---setup home / limit switch signals---
net max-home-x => joint.0.home-sw-in
net min-x => joint.0.neg-lim-sw-in
net max-home-x => joint.0.pos-lim-sw-in
#*******************
# AXIS Z JOINT 1
#*******************
setp pid.z.Pgain [JOINT_1]P
setp pid.z.Igain [JOINT_1]I
setp pid.z.Dgain [JOINT_1]D
setp pid.z.bias [JOINT_1]BIAS
setp pid.z.FF0 [JOINT_1]FF0
setp pid.z.FF1 [JOINT_1]FF1
setp pid.z.FF2 [JOINT_1]FF2
setp pid.z.deadband [JOINT_1]DEADBAND
setp pid.z.maxoutput [JOINT_1]MAX_OUTPUT
setp pid.z.error-previous-target true
setp pid.z.maxerror 5.0
net z-index-enable <=> pid.z.index-enable
net z-enable => pid.z.enable
net z-pos-cmd => pid.z.command
net z-pos-fb => pid.z.feedback
net z-output <= pid.z.output
# Step Gen signals/setup
setp hm2_5i25.0.stepgen.01.dirsetup [JOINT_1]DIRSETUP
setp hm2_5i25.0.stepgen.01.dirhold [JOINT_1]DIRHOLD
setp hm2_5i25.0.stepgen.01.steplen [JOINT_1]STEPLEN
setp hm2_5i25.0.stepgen.01.stepspace [JOINT_1]STEPSPACE
setp hm2_5i25.0.stepgen.01.position-scale [JOINT_1]STEP_SCALE
setp hm2_5i25.0.stepgen.01.step_type 0
setp hm2_5i25.0.stepgen.01.control-type 1
setp hm2_5i25.0.stepgen.01.maxaccel [JOINT_1]STEPGEN_MAXACCEL
setp hm2_5i25.0.stepgen.01.maxvel [JOINT_1]STEPGEN_MAXVEL
# ---closedloop stepper signals---
setp hm2_5i25.0.encoder.03.scale [JOINT_1]INPUT_SCALE
net z-pos-cmd <= joint.1.motor-pos-cmd
net z-vel-cmd <= joint.1.vel-cmd
net z-output <= hm2_5i25.0.stepgen.01.velocity-cmd
net z-pos-fb <= hm2_5i25.0.encoder.03.position
net z-pos-fb => joint.1.motor-pos-fb
net z-enable <= joint.1.amp-enable-out
net z-enable => hm2_5i25.0.stepgen.01.enable
# ---setup home / limit switch signals---
net max-home-z => joint.1.home-sw-in
net min-z => joint.1.neg-lim-sw-in
net max-home-z => joint.1.pos-lim-sw-in
#*******************
# SPINDLE
#*******************
setp pid.s.Pgain [SPINDLE_0]P
setp pid.s.Igain [SPINDLE_0]I
setp pid.s.Dgain [SPINDLE_0]D
setp pid.s.bias [SPINDLE_0]BIAS
setp pid.s.FF0 [SPINDLE_0]FF0
setp pid.s.FF1 [SPINDLE_0]FF1
setp pid.s.FF2 [SPINDLE_0]FF2
setp pid.s.deadband [SPINDLE_0]DEADBAND
setp pid.s.maxoutput [SPINDLE_0]MAX_OUTPUT
setp pid.s.error-previous-target true
net spindle-index-enable <=> pid.s.index-enable
net spindle-enable => pid.s.enable
net spindle-vel-cmd-rpm-abs => pid.s.command
net spindle-vel-fb-rpm-abs => pid.s.feedback
net spindle-output <= pid.s.output
# ---digital potentiometer output signals/setup---
setp hm2_5i25.0.7i76.0.0.spinout-minlim [SPINDLE_0]OUTPUT_MIN_LIMIT
setp hm2_5i25.0.7i76.0.0.spinout-maxlim [SPINDLE_0]OUTPUT_MAX_LIMIT
setp hm2_5i25.0.7i76.0.0.spinout-scalemax [SPINDLE_0]OUTPUT_SCALE
net spindle-output => hm2_5i25.0.7i76.0.0.spinout
net spindle-enable => hm2_5i25.0.7i76.0.0.spinena
net spindle-ccw => hm2_5i25.0.7i76.0.0.spindir
# ---Encoder feedback signals/setup---
setp hm2_5i25.0.encoder.00.counter-mode 0
setp hm2_5i25.0.encoder.00.filter 1
setp hm2_5i25.0.encoder.00.index-invert 0
setp hm2_5i25.0.encoder.00.index-mask 0
setp hm2_5i25.0.encoder.00.index-mask-invert 0
setp hm2_5i25.0.encoder.00.scale [SPINDLE_0]ENCODER_SCALE
net spindle-revs <= hm2_5i25.0.encoder.00.position
net spindle-vel-fb-rps <= hm2_5i25.0.encoder.00.velocity
net spindle-index-enable <=> hm2_5i25.0.encoder.00.index-enable
# ---setup spindle control signals---
net spindle-vel-cmd-rps <= spindle.0.speed-out-rps
net spindle-vel-cmd-rps-abs <= spindle.0.speed-out-rps-abs
net spindle-vel-cmd-rpm <= spindle.0.speed-out
net spindle-vel-cmd-rpm-abs <= spindle.0.speed-out-abs
net spindle-enable <= spindle.0.on
net spindle-cw <= spindle.0.forward
net spindle-ccw <= spindle.0.reverse
net spindle-brake <= spindle.0.brake
net spindle-revs => spindle.0.revs
net spindle-at-speed => spindle.0.at-speed
net spindle-vel-fb-rps => spindle.0.speed-in
net spindle-index-enable <=> spindle.0.index-enable
# ---Setup spindle at speed signals---
net spindle-at-speed <= hm2_5i25.0.7i76.0.0.input-05
net vfd-fault <= hm2_5i25.0.7i76.0.0.input-04
# ---Spindle RPS to RPM for Probe Basic display---
setp scale_to_rpm.0.gain 60
net spindle-vel-fb-rps => scale_to_rpm.0.in
#******************************
# connect miscellaneous signals
#******************************
# ---HALUI signals---
net axis-select-x halui.axis.x.select
net jog-x-pos halui.axis.x.plus
net jog-x-neg halui.axis.x.minus
net jog-x-analog halui.axis.x.analog
net x-is-homed halui.joint.0.is-homed
net axis-select-z halui.axis.z.select
net jog-z-pos halui.axis.z.plus
net jog-z-neg halui.axis.z.minus
net jog-z-analog halui.axis.z.analog
net z-is-homed halui.joint.1.is-homed
net jog-selected-pos halui.axis.selected.plus
net jog-selected-neg halui.axis.selected.minus
net machine-is-on halui.machine.is-on
net jog-speed halui.axis.jog-speed
net MDI-mode halui.mode.is-mdi
# ---coolant signals---
net coolant-mist <= iocontrol.0.coolant-mist
net coolant-flood <= iocontrol.0.coolant-flood
# ---probe signal---
net probe-in => motion.probe-input
# ---motion control signals---
net in-position <= motion.in-position
net machine-is-enabled <= motion.motion-enabled
# ---estop signals---
loadrt estop_latch
addf estop-latch.0 servo-thread
net estop-loopout iocontrol.0.emc-enable-in <= estop-latch.0.ok-out
net estop-loopin iocontrol.0.user-enable-out => estop-latch.0.ok-in
net estop-reset iocontrol.0.user-request-enable => estop-latch.0.reset
net remote-estop estop-latch.0.fault-in <= hm2_5i25.0.7i76.0.0.input-07-not
# ---tool change signals (connected to qtpyvcp_manualtoolchange in postgui)---
net tool-change-request iocontrol.0.tool-change
net tool-change-confirmed iocontrol.0.tool-changed
net tool-number iocontrol.0.tool-prep-number
net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared
# ---signals to show tool offset in the GUI---
net tooloffset-x <= motion.tooloffset.x
net tooloffset-z <= motion.tooloffset.z
The files don't exist yet so there's nothing to back up there, but the INI will be changed — let me back that up first.
cp /home/murray/linuxcnc/configs/pb_lathe_murray/probe_basic_lathe.ini /home/murray/linuxcnc/configs/pb_lathe_murray/probe_basic_lathe.ini.bak2(Bash completed with no output)INI backed up as probe_basic_lathe.ini.bak2. Now creating the three HAL files and updating the INI:
# Muzzer / Probe Basic Lathe
# Derived from gmoccapy_Bantam/combined.hal (30 Nov 2025)
# Adapted for Probe Basic: hal_manualtoolchange replaced by iocontrol nets
# (PB postgui connects tool-change to qtpyvcp_manualtoolchange)
# Added scale_to_rpm component for PB spindle RPM display
loadrt [KINS]KINEMATICS
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
loadrt hostmot2
loadrt hm2_pci config=" num_encoders=4 num_pwmgens=0 num_stepgens=2 sserial_port_0=00xxxx"
setp hm2_5i25.0.watchdog.timeout_ns 5000000
loadrt pid names=pid.x,pid.z,pid.s
loadrt scale names=scale_to_rpm
addf hm2_5i25.0.read servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf pid.x.do-pid-calcs servo-thread
addf pid.z.do-pid-calcs servo-thread
addf pid.s.do-pid-calcs servo-thread
addf scale_to_rpm.0 servo-thread
addf hm2_5i25.0.write servo-thread
setp hm2_5i25.0.dpll.01.timer-us -50
setp hm2_5i25.0.stepgen.timer-number 1
# external input signals
net max-home-x <= hm2_5i25.0.7i76.0.0.input-00
net min-x <= hm2_5i25.0.7i76.0.0.input-01-not
net max-home-z <= hm2_5i25.0.7i76.0.0.input-03
net min-z <= hm2_5i25.0.7i76.0.0.input-02
#*******************
# AXIS X JOINT 0
#*******************
setp pid.x.Pgain [JOINT_0]P
setp pid.x.Igain [JOINT_0]I
setp pid.x.Dgain [JOINT_0]D
setp pid.x.bias [JOINT_0]BIAS
setp pid.x.FF0 [JOINT_0]FF0
setp pid.x.FF1 [JOINT_0]FF1
setp pid.x.FF2 [JOINT_0]FF2
setp pid.x.deadband [JOINT_0]DEADBAND
setp pid.x.maxoutput [JOINT_0]MAX_OUTPUT
setp pid.x.error-previous-target true
setp pid.x.maxerror 5.0
net x-index-enable <=> pid.x.index-enable
net x-enable => pid.x.enable
net x-pos-cmd => pid.x.command
net x-pos-fb => pid.x.feedback
net x-output <= pid.x.output
# Step Gen signals/setup
setp hm2_5i25.0.stepgen.00.dirsetup [JOINT_0]DIRSETUP
setp hm2_5i25.0.stepgen.00.dirhold [JOINT_0]DIRHOLD
setp hm2_5i25.0.stepgen.00.steplen [JOINT_0]STEPLEN
setp hm2_5i25.0.stepgen.00.stepspace [JOINT_0]STEPSPACE
setp hm2_5i25.0.stepgen.00.position-scale [JOINT_0]STEP_SCALE
setp hm2_5i25.0.stepgen.00.step_type 0
setp hm2_5i25.0.stepgen.00.control-type 1
setp hm2_5i25.0.stepgen.00.maxaccel [JOINT_0]STEPGEN_MAXACCEL
setp hm2_5i25.0.stepgen.00.maxvel [JOINT_0]STEPGEN_MAXVEL
# ---closedloop stepper signals---
setp hm2_5i25.0.encoder.02.scale [JOINT_0]INPUT_SCALE
net x-pos-cmd <= joint.0.motor-pos-cmd
net x-vel-cmd <= joint.0.vel-cmd
net x-output <= hm2_5i25.0.stepgen.00.velocity-cmd
net x-pos-fb <= hm2_5i25.0.encoder.02.position
net x-pos-fb => joint.0.motor-pos-fb
net x-enable <= joint.0.amp-enable-out
net x-enable => hm2_5i25.0.stepgen.00.enable
# ---setup home / limit switch signals---
net max-home-x => joint.0.home-sw-in
net min-x => joint.0.neg-lim-sw-in
net max-home-x => joint.0.pos-lim-sw-in
#*******************
# AXIS Z JOINT 1
#*******************
setp pid.z.Pgain [JOINT_1]P
setp pid.z.Igain [JOINT_1]I
setp pid.z.Dgain [JOINT_1]D
setp pid.z.bias [JOINT_1]BIAS
setp pid.z.FF0 [JOINT_1]FF0
setp pid.z.FF1 [JOINT_1]FF1
setp pid.z.FF2 [JOINT_1]FF2
setp pid.z.deadband [JOINT_1]DEADBAND
setp pid.z.maxoutput [JOINT_1]MAX_OUTPUT
setp pid.z.error-previous-target true
setp pid.z.maxerror 5.0
net z-index-enable <=> pid.z.index-enable
net z-enable => pid.z.enable
net z-pos-cmd => pid.z.command
net z-pos-fb => pid.z.feedback
net z-output <= pid.z.output
# Step Gen signals/setup
setp hm2_5i25.0.stepgen.01.dirsetup [JOINT_1]DIRSETUP
setp hm2_5i25.0.stepgen.01.dirhold [JOINT_1]DIRHOLD
setp hm2_5i25.0.stepgen.01.steplen [JOINT_1]STEPLEN
setp hm2_5i25.0.stepgen.01.stepspace [JOINT_1]STEPSPACE
setp hm2_5i25.0.stepgen.01.position-scale [JOINT_1]STEP_SCALE
setp hm2_5i25.0.stepgen.01.step_type 0
setp hm2_5i25.0.stepgen.01.control-type 1
setp hm2_5i25.0.stepgen.01.maxaccel [JOINT_1]STEPGEN_MAXACCEL
setp hm2_5i25.0.stepgen.01.maxvel [JOINT_1]STEPGEN_MAXVEL
# ---closedloop stepper signals---
setp hm2_5i25.0.encoder.03.scale [JOINT_1]INPUT_SCALE
net z-pos-cmd <= joint.1.motor-pos-cmd
net z-vel-cmd <= joint.1.vel-cmd
net z-output <= hm2_5i25.0.stepgen.01.velocity-cmd
net z-pos-fb <= hm2_5i25.0.encoder.03.position
net z-pos-fb => joint.1.motor-pos-fb
net z-enable <= joint.1.amp-enable-out
net z-enable => hm2_5i25.0.stepgen.01.enable
# ---setup home / limit switch signals---
net max-home-z => joint.1.home-sw-in
net min-z => joint.1.neg-lim-sw-in
net max-home-z => joint.1.pos-lim-sw-in
#*******************
# SPINDLE
#*******************
setp pid.s.Pgain [SPINDLE_0]P
setp pid.s.Igain [SPINDLE_0]I
setp pid.s.Dgain [SPINDLE_0]D
setp pid.s.bias [SPINDLE_0]BIAS
setp pid.s.FF0 [SPINDLE_0]FF0
setp pid.s.FF1 [SPINDLE_0]FF1
setp pid.s.FF2 [SPINDLE_0]FF2
setp pid.s.deadband [SPINDLE_0]DEADBAND
setp pid.s.maxoutput [SPINDLE_0]MAX_OUTPUT
setp pid.s.error-previous-target true
net spindle-index-enable <=> pid.s.index-enable
net spindle-enable => pid.s.enable
net spindle-vel-cmd-rpm-abs => pid.s.command
net spindle-vel-fb-rpm-abs => pid.s.feedback
net spindle-output <= pid.s.output
# ---digital potentiometer output signals/setup---
setp hm2_5i25.0.7i76.0.0.spinout-minlim [SPINDLE_0]OUTPUT_MIN_LIMIT
setp hm2_5i25.0.7i76.0.0.spinout-maxlim [SPINDLE_0]OUTPUT_MAX_LIMIT
setp hm2_5i25.0.7i76.0.0.spinout-scalemax [SPINDLE_0]OUTPUT_SCALE
net spindle-output => hm2_5i25.0.7i76.0.0.spinout
net spindle-enable => hm2_5i25.0.7i76.0.0.spinena
net spindle-ccw => hm2_5i25.0.7i76.0.0.spindir
# ---Encoder feedback signals/setup---
setp hm2_5i25.0.encoder.00.counter-mode 0
setp hm2_5i25.0.encoder.00.filter 1
setp hm2_5i25.0.encoder.00.index-invert 0
setp hm2_5i25.0.encoder.00.index-mask 0
setp hm2_5i25.0.encoder.00.index-mask-invert 0
setp hm2_5i25.0.encoder.00.scale [SPINDLE_0]ENCODER_SCALE
net spindle-revs <= hm2_5i25.0.encoder.00.position
net spindle-vel-fb-rps <= hm2_5i25.0.encoder.00.velocity
net spindle-index-enable <=> hm2_5i25.0.encoder.00.index-enable
# ---setup spindle control signals---
net spindle-vel-cmd-rps <= spindle.0.speed-out-rps
net spindle-vel-cmd-rps-abs <= spindle.0.speed-out-rps-abs
net spindle-vel-cmd-rpm <= spindle.0.speed-out
net spindle-vel-cmd-rpm-abs <= spindle.0.speed-out-abs
net spindle-enable <= spindle.0.on
net spindle-cw <= spindle.0.forward
net spindle-ccw <= spindle.0.reverse
net spindle-brake <= spindle.0.brake
net spindle-revs => spindle.0.revs
net spindle-at-speed => spindle.0.at-speed
net spindle-vel-fb-rps => spindle.0.speed-in
net spindle-index-enable <=> spindle.0.index-enable
# ---Setup spindle at speed signals---
net spindle-at-speed <= hm2_5i25.0.7i76.0.0.input-05
net vfd-fault <= hm2_5i25.0.7i76.0.0.input-04
# ---Spindle RPS to RPM for Probe Basic display---
setp scale_to_rpm.0.gain 60
net spindle-vel-fb-rps => scale_to_rpm.0.in
#******************************
# connect miscellaneous signals
#******************************
# ---HALUI signals---
net axis-select-x halui.axis.x.select
net jog-x-pos halui.axis.x.plus
net jog-x-neg halui.axis.x.minus
net jog-x-analog halui.axis.x.analog
net x-is-homed halui.joint.0.is-homed
net axis-select-z halui.axis.z.select
net jog-z-pos halui.axis.z.plus
net jog-z-neg halui.axis.z.minus
net jog-z-analog halui.axis.z.analog
net z-is-homed halui.joint.1.is-homed
net jog-selected-pos halui.axis.selected.plus
net jog-selected-neg halui.axis.selected.minus
net machine-is-on halui.machine.is-on
net jog-speed halui.axis.jog-speed
net MDI-mode halui.mode.is-mdi
# ---coolant signals---
net coolant-mist <= iocontrol.0.coolant-mist
net coolant-flood <= iocontrol.0.coolant-flood
# ---probe signal---
net probe-in => motion.probe-input
# ---motion control signals---
net in-position <= motion.in-position
net machine-is-enabled <= motion.motion-enabled
# ---estop signals---
loadrt estop_latch
addf estop-latch.0 servo-thread
net estop-loopout iocontrol.0.emc-enable-in <= estop-latch.0.ok-out
net estop-loopin iocontrol.0.user-enable-out => estop-latch.0.ok-in
net estop-reset iocontrol.0.user-request-enable => estop-latch.0.reset
net remote-estop estop-latch.0.fault-in <= hm2_5i25.0.7i76.0.0.input-07-not
# ---tool change signals (connected to qtpyvcp_manualtoolchange in postgui)---
net tool-change-request iocontrol.0.tool-change
net tool-change-confirmed iocontrol.0.tool-changed
net tool-number iocontrol.0.tool-prep-number
net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared
# ---signals to show tool offset in the GUI---
net tooloffset-x <= motion.tooloffset.x
net tooloffset-z <= motion.tooloffset.z
# ######################################################################
# load pendant components
#
# Modified - Muzzer 7th November 2021
# Modified - Muzzer 30th November 2025
# Removed duplicated nets from main hal file. This file is now pretty much
# what was given in the original example here:
# http://linuxcnc.org/docs/2.9/html/man/man1/xhc-whb04b-6.1.html
#
# ######################################################################
loadusr -W xhc-whb04b-6 -HsfB
# ######################################################################
# pendant signal configuration
# ######################################################################
# On/Off signals
#@ net machine.is-on halui.machine.is-on whb.halui.machine.is-on
net pdnt.machine.on whb.halui.machine.on halui.machine.on
net pdnt.machine.off whb.halui.machine.off halui.machine.off
# program related signals
net pdnt.program.is-idle whb.halui.program.is-idle halui.program.is-idle
net pdnt.program.is-paused whb.halui.program.is-paused halui.program.is-paused
net pdnt.program-is-running whb.halui.program.is-running halui.program.is-running
net pdnt.program.resume whb.halui.program.resume halui.program.resume
net pdnt.program.pause whb.halui.program.pause halui.program.pause
net pdnt.program.run whb.halui.program.run halui.program.run
net pdnt.program.stop whb.halui.program.stop halui.program.stop
# machine mode related signals
net pdnt.mode.auto whb.halui.mode.auto halui.mode.auto
net pdnt.mode.manual whb.halui.mode.manual halui.mode.manual
net pdnt.mode.mdi whb.halui.mode.mdi halui.mode.mdi
net pdnt.mode.joint whb.halui.mode.joint halui.mode.joint
net pdnt.mode.teleop whb.halui.mode.teleop halui.mode.teleop
net pdnt.mode.is-auto halui.mode.is-auto whb.halui.mode.is-auto
net pdnt.mode.is-manual halui.mode.is-manual whb.halui.mode.is-manual
net pdnt.mode.is-mdi whb.halui.mode.is-mdi
net pdnt.mode.is-joint halui.mode.is-joint whb.halui.mode.is-joint
net pdnt.mode.is-teleop halui.mode.is-teleop whb.halui.mode.is-teleop
# "selected axis" signals
net pdnt.axis.x.select whb.halui.axis.x.select # halui.axis.x.select
net pdnt.axis.z.select whb.halui.axis.z.select # halui.axis.z.select
net pdnt.axis.x.jog-scale whb.axis.x.jog-scale axis.x.jog-scale
# net pdnt.axis.y.jog-scale whb.axis.y.jog-scale axis.y.jog-scale
net pdnt.axis.z.jog-scale whb.axis.z.jog-scale axis.z.jog-scale
net pdnt.axis.x.jog-counts whb.axis.x.jog-counts axis.x.jog-counts
# net pdnt.axis.y.jog-counts whb.axis.y.jog-counts axis.y.jog-counts
net pdnt.axis.z.jog-counts whb.axis.z.jog-counts axis.z.jog-counts
net pdnt.axis.x.jog-enable whb.axis.x.jog-enable axis.x.jog-enable
# net pdnt.axis.y.jog-enable whb.axis.y.jog-enable axis.y.jog-enable
net pdnt.axis.z.jog-enable whb.axis.z.jog-enable axis.z.jog-enable
net pdnt.axis.x.jog-vel-mode whb.axis.x.jog-vel-mode axis.x.jog-vel-mode
# net pdnt.axis.y.jog-vel-mode whb.axis.y.jog-vel-mode axis.y.jog-vel-mode
net pdnt.axis.z.jog-vel-mode whb.axis.z.jog-vel-mode axis.z.jog-vel-mode
# macro buttons to MDI commands
net pdnt.macro-1 whb.button.macro-1 #@ halui.mdi-command-01 # use MDI command from main.ini
net pdnt.macro-2 whb.button.macro-2 #@ halui.mdi-command-02 # use MDI command from main.ini or used for Hardcoded lube on/off
net pdnt.reserved.for.spindle+ whb.button.macro-3 # Harcoded for spindle+ whb.halui.spindle.increase
net pdnt.reserved.for.spindle- whb.button.macro-4 # Harcoded for spindle- whb.halui.spindle.decrease
net pdnt.macro-5 whb.button.macro-5 #@ halui.mdi-command-05 # use MDI command from main.ini
net pdnt.macro-6 whb.button.macro-6 #@ halui.mdi-command-06 # use MDI command from main.ini
net pdnt.macro-7 whb.button.macro-7 #@ halui.mdi-command-07 # use MDI command from main.ini
net pdnt.reserved.for.spindle.dir whb.button.macro-8 # Harcoded for spindle direction inside pendant
net pdnt.macro-9 whb.button.macro-9 #@ halui.mdi-command-09 # use MDI command from main.ini
net pdnt.reserved.for.ABS-REL whb.button.macro-10 # Hardcoded for swap Dro Relative/Absolue
net pdnt.macro-14 whb.button.macro-14 #@ halui.mdi-command-14 # use MDI command from main.ini
net pdnt.reserved.for.flood whb.button.macro-15 # Harcoded for halui.flood on/off
net pdnt.reserved.for.mist whb.button.macro-16 # Harcoded for halui.mist on/off
net pdnt.macro.11 whb.button.macro-11 #@ halui.mdi-command-11 # use MDI command from main.ini
net pdnt.macro.12 whb.button.macro-12 #@ halui.mdi-command-12 # use MDI command from main.ini
net pdnt.macro.13 whb.button.macro-13 #@ halui.mdi-command-13 # use MDI command from main.ini
# flood and mist toggle signals
net pdnt.flood.is-on whb.halui.flood.is-on halui.flood.is-on #return signal is on or off
net pdnt.flood.off whb.halui.flood.off halui.flood.off #reserved whb.button.macro-15
net pdnt.flood.on whb.halui.flood.on halui.flood.on #reserved whb.button.macro-15
net pdnt.mist.is-on whb.halui.mist.is-on halui.mist.is-on #return signal is on or off
net pdnt.mist.off whb.halui.mist.off halui.mist.off #reserved whb.button.macro-16
net pdnt.mist.on whb.halui.mist.on halui.mist.on #reserved whb.button.macro-16
net pdnt.lube.is-on whb.halui.lube.is-on halui.lube.is-on #return signal is on or off
net pdnt.lube.off whb.halui.lube.off halui.lube.off #reserved whb.button.macro-2
net pdnt.lube.on whb.halui.lube.on halui.lube.on #reserved whb.button.macro-2
# default function button signals
net pdnt.button.m-home whb.button.m-home halui.home-all # Homing use built-in halui home all
net pdnt.button.safe-z whb.button.safe-z #@ halui.mdi-command-03 # Safe-z use MDI command from main.ini
net pdnt.button.w-home whb.button.w-home #@ halui.mdi-command-04 # Unpark use MDI command from main.ini
net pdnt.button.probe-z whb.button.probe-z #@ halui.mdi-command-08 # Probe-Z use MDI command from main.ini
# spindle related signals
net pdnt.spindle.is-on whb.halui.spindle.is-on #@ spindle.0.on
net pdnt.spindle.start whb.halui.spindle.start halui.spindle.0.start
net pdnt.spindle.stop whb.halui.spindle.stop halui.spindle.0.stop
net pdnt.spindle.forward whb.halui.spindle.forward halui.spindle.0.forward
net pdnt.spindle.reverse whb.halui.spindle.reverse halui.spindle.0.reverse
net pdnt.spindle.increase whb.halui.spindle.increase halui.spindle.0.increase # reserved whb.button.macro-3
net pdnt.spindle.decrease whb.halui.spindle.decrease halui.spindle.0.decrease # reserved whb.button.macro-4
net pdnt.spindle-speed-abs whb.halui.spindle-speed-cmd #@ spindle.0.speed-out-abs # speed cmd from motion in rpm absolue
# spindle speed override signals
net pdnt.spindle-override.scale whb.halui.spindle-override.scale halui.spindle.0.override.scale # needed for both spindle+/- and spindleoverride+/- button
net pdnt.spindle.override.value halui.spindle.0.override.value whb.halui.spindle-override.value # GUI feed rate related signals
net pdnt.spindle.override.increase whb.halui.spindle-override.increase halui.spindle.0.override.increase
net pdnt.spindle.override.decrease whb.halui.spindle-override.decrease halui.spindle.0.override.decrease
# GUI feed rate related signals can be used when program is running moving GUI slider
net pdnt.feed-override.scale whb.halui.feed-override.scale halui.feed-override.scale # needed for both FeedOverride+/- and rotary knob button
net pdnt.max-velocity.value whb.halui.max-velocity.value halui.max-velocity.value # needed for Mpg mode : button feed position% * max-velocity = Mpg feedrate
# take feed override min/max values from/to the GUI
net pdnt.feed-override.value halui.feed-override.value whb.halui.feed-override.value # GUI feed rate related signals
net pdnt.feed-override.increase whb.halui.feed-override.increase halui.feed-override.increase
net pdnt.feed-override.decrease whb.halui.feed-override.decrease halui.feed-override.decrease
# axis position related signals feedback
net pdnt.axis.x.pos-feedback halui.axis.x.pos-feedback whb.halui.axis.x.pos-feedback
net pdnt.axis.z.pos-feedback halui.axis.z.pos-feedback whb.halui.axis.z.pos-feedback
# axis position related signals relative
net pdnt.axis.x.pos-relative halui.axis.x.pos-relative whb.halui.axis.x.pos-relative
net pdnt.axis.z.pos-relative halui.axis.z.pos-relative whb.halui.axis.z.pos-relative
Now remove the POSTGUI_HALFILE = hallib/time.hal line from the INI — the PB postgui already loads time and not, so loading it twice would crash:
Now verify the final state of both the INI [HAL] section and the new files list:
grep -A 8 '^\[HAL\]' /home/murray/linuxcnc/configs/pb_lathe_murray/probe_basic_lathe.ini && echo "---" && ls /home/murray/linuxcnc/configs/pb_lathe_murray/hallib/[HAL]
HALUI = halui
HALFILE = hallib/Bantam_v1.hal
HALFILE = hallib/xhc-whb04b-6.hal
SHUTDOWN = hallib/shutdown.hal
POSTGUI_HALFILE = hallib/probe_basic_lathe_postgui.hal
[HALUI]
---
Bantam_v1.hal
core_sim_2.hal
core_sim_4.hal
core_xyzclathe_sim.hal
probe_basic_lathe_postgui.hal
shutdown.hal
sim_spindle_encoder.hal
simulated_home_xyzc.hal
simulated_home_xz.hal
simulated_lathe.hal
spindle_sim.hal
xhc-whb04b-6.halEverything is in place. Here's a summary of what was created:
hallib/Bantam_v1.hal — the main hardware HAL, based on gmoccapy_Bantam/combined.hal (Nov 2025) with these PB-specific adaptations:
hal_manualtoolchangeremoved; tool-change nets now just connect iocontrol so the PB postgui can wire them toqtpyvcp_manualtoolchange- Added
loadrt scale names=scale_to_rpm+gain 60to convert spindle encoder rps→rpm, which the PB postgui (spindle-rpm-filtered.0) expects - Kept the
dpll.01.timer-usandstepgen.timer-numberperformance tuning lines from the Bantam version
hallib/xhc-whb04b-6.hal — copied from gmoccapy_Bantam/xhc-whb04b-6.hal (Nov 2025, the correct version for this hardware)
hallib/shutdown.hal — empty placeholder
INI [HAL] section — removed POSTGUI_HALFILE = hallib/time.hal (the PB postgui already loads loadrt time and loadrt not; running it twice would crash LinuxCNC on startup)
pb_lathe_murray -- HAL files created/changed for real hardware
Date: 22 April 2026
Source of machine HAL: gmoccapy_Bantam/combined.hal (30 Nov 2025, known-working)
INI backup before changes: probe_basic_lathe.ini.bak2
================================================================================
OVERVIEW
--------
The simulation HAL files were replaced with real hardware HAL files derived
from the working gmoccapy_Bantam configuration. Three new files were created
in hallib/ and one line was removed from the INI.
================================================================================
FILE: probe_basic_lathe.ini
================================================================================
[HAL] section:
REMOVED: POSTGUI_HALFILE = hallib/time.hal
REASON: probe_basic_lathe_postgui.hal already loads the 'time' and 'not'
RT components and connects all time signals to qtpyvcp. Loading
time.hal as a second postgui file would cause a duplicate loadrt
error on startup.
================================================================================
FILE: hallib/Bantam_v1.hal (NEW -- did not exist before)
================================================================================
SOURCE: gmoccapy_Bantam/combined.hal (30 Nov 2025)
WHAT IT DOES:
- Loads hostmot2 / hm2_pci for the Mesa 5i25/7i76 hardware
- Configures closed-loop stepgen + encoder feedback for X (joint 0) and Z (joint 1)
- Configures spindle PID, digital pot output, and encoder feedback
- Sets up limit/home switches, estop latch, HALUI jog signals
- Provides tool-change nets for the PB postgui to connect
CHANGES MADE vs gmoccapy_Bantam/combined.hal:
1. hal_manualtoolchange REMOVED
gmoccapy used:
loadusr -W hal_manualtoolchange
net tool-change-request iocontrol.0.tool-change => hal_manualtoolchange.change
net tool-change-confirmed iocontrol.0.tool-changed <= hal_manualtoolchange.changed
net tool-number iocontrol.0.tool-prep-number => hal_manualtoolchange.number
Replaced with (iocontrol nets only, no component loaded):
net tool-change-request iocontrol.0.tool-change
net tool-change-confirmed iocontrol.0.tool-changed
net tool-number iocontrol.0.tool-prep-number
net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared
REASON: Probe Basic handles tool changes via qtpyvcp_manualtoolchange,
which is connected in probe_basic_lathe_postgui.hal
2. scale_to_rpm component ADDED
loadrt scale names=scale_to_rpm
addf scale_to_rpm.0 servo-thread
setp scale_to_rpm.0.gain 60
net spindle-vel-fb-rps => scale_to_rpm.0.in
REASON: probe_basic_lathe_postgui.hal expects scale_to_rpm.0.out to
exist so it can feed qtpyvcp.spindle-encoder-rpm.in.
The encoder gives velocity in RPS; gain of 60 converts to RPM.
KEPT from combined.hal (not in original Bantam_v1.hal):
- setp hm2_5i25.0.dpll.01.timer-us -50
- setp hm2_5i25.0.stepgen.timer-number 1
(performance/timing tweaks added Nov 2025)
- net axis-select-x/z halui.axis.x/z.select
(needed so pendant HAL can drive axis selection)
- net machine-is-on halui.machine.is-on
- net tooloffset-x/z <= motion.tooloffset.x/z
================================================================================
FILE: hallib/xhc-whb04b-6.hal (NEW -- did not exist before)
================================================================================
SOURCE: gmoccapy_Bantam/xhc-whb04b-6.hal (30 Nov 2025)
CHANGES: None -- copied verbatim. This is the correct version for the
Bantam hardware configuration. The older gmoccapy_lathe version
(hallib/xhc-whb04b-6.hal) differs in two places:
- axis.select lines: older version connects to halui.axis.x/z.select
directly; Bantam version leaves those commented out (the main
HAL declares them separately via net axis-select-x/z)
- spindle.is-on and spindle-speed-abs: older version connects
these directly to spindle.0 pins; Bantam version comments them
out to avoid duplicate driver conflicts
================================================================================
FILE: hallib/shutdown.hal (NEW -- did not exist before)
================================================================================
SOURCE: gmoccapy_Bantam/shutdown.hal
CONTENT: Empty placeholder (comment only). No shutdown commands required.
================================================================================
SIMULATION FILES SUPERSEDED (still present but no longer referenced by INI)
================================================================================
hallib/core_sim_2.hal
hallib/simulated_home_xz.hal
hallib/simulated_lathe.hal
(These were the three HALFILE entries removed from the INI in the
previous session -- see changes_from_sim_to_machine_2026-04-22.txt)
================================================================================
Log saved to hal_changes_2026-04-22.txt. It covers all three new HAL files, every change made vs the gmoccapy source, the reason for each change, and which simulation files were superseded.
/home/murray/linuxcnc/configs/pb_lathe_murray
Let me first check the full file list carefully before moving anything.
find /home/murray/linuxcnc/configs/pb_lathe_murray -not -path '*/subroutines/*' -not -path '*/user_buttons/*' -not -path '*/user_dro_display/*' -not -path '*/user_tabs/*' -not -path '*/__pycache__/*' -type f | sort/home/murray/linuxcnc/configs/pb_lathe_murray/changes_from_sim_to_machine_2026-04-22.txt
/home/murray/linuxcnc/configs/pb_lathe_murray/custom_config.yml
/home/murray/linuxcnc/configs/pb_lathe_murray/hal_changes_2026-04-22.txt
/home/murray/linuxcnc/configs/pb_lathe_murray/hallib/Bantam_v1.hal
/home/murray/linuxcnc/configs/pb_lathe_murray/hallib/core_sim_2.hal
/home/murray/linuxcnc/configs/pb_lathe_murray/hallib/core_sim_4.hal
/home/murray/linuxcnc/configs/pb_lathe_murray/hallib/core_xyzclathe_sim.hal
/home/murray/linuxcnc/configs/pb_lathe_murray/hallib/probe_basic_lathe_postgui.hal
/home/murray/linuxcnc/configs/pb_lathe_murray/hallib/shutdown.hal
/home/murray/linuxcnc/configs/pb_lathe_murray/hallib/sim_spindle_encoder.hal
/home/murray/linuxcnc/configs/pb_lathe_murray/hallib/simulated_home_xyzc.hal
/home/murray/linuxcnc/configs/pb_lathe_murray/hallib/simulated_home_xz.hal
/home/murray/linuxcnc/configs/pb_lathe_murray/hallib/simulated_lathe.hal
/home/murray/linuxcnc/configs/pb_lathe_murray/hallib/spindle_sim.hal
/home/murray/linuxcnc/configs/pb_lathe_murray/hallib/xhc-whb04b-6.hal
/home/murray/linuxcnc/configs/pb_lathe_murray/lathe.tbl
/home/murray/linuxcnc/configs/pb_lathe_murray/pbsplash.png
/home/murray/linuxcnc/configs/pb_lathe_murray/probe_basic_lathe.ini
/home/murray/linuxcnc/configs/pb_lathe_murray/probe_basic_lathe.ini.bak
/home/murray/linuxcnc/configs/pb_lathe_murray/probe_basic_lathe.ini.bak2
/home/murray/linuxcnc/configs/pb_lathe_murray/python/remap.py
/home/murray/linuxcnc/configs/pb_lathe_murray/python/stdglue.py
/home/murray/linuxcnc/configs/pb_lathe_murray/python/toplevel.py
/home/murray/linuxcnc/configs/pb_lathe_murray/sim-lathe.var
/home/murray/linuxcnc/configs/pb_lathe_murray/sim-lathe.var.bak
/home/murray/linuxcnc/configs/pb_lathe_murray/sim.log
/home/murray/linuxcnc/configs/pb_lathe_murray/.vcp_persistent_data.pickleI can see one important issue: the INI now references linuxcnc.var as the parameter file, but only sim-lathe.var exists. I'll copy it to linuxcnc.var before archiving the sim version. Then I'll move all defunct files into an archive/ subfolder preserving the directory structure.
cd /home/murray/linuxcnc/configs/pb_lathe_murray && cp sim-lathe.var linuxcnc.var && mkdir -p archive/hallib && mv probe_basic_lathe.ini.bak probe_basic_lathe.ini.bak2 sim-lathe.var sim-lathe.var.bak sim.log changes_from_sim_to_machine_2026-04-22.txt hal_changes_2026-04-22.txt archive/ && mv hallib/core_sim_2.hal hallib/core_sim_4.hal hallib/core_xyzclathe_sim.hal hallib/sim_spindle_encoder.hal hallib/simulated_home_xyzc.hal hallib/simulated_home_xz.hal hallib/simulated_lathe.hal hallib/spindle_sim.hal archive/hallib/(Bash completed with no output)find /home/murray/linuxcnc/configs/pb_lathe_murray -not -path '*/__pycache__/*' -type f | sort/home/murray/linuxcnc/configs/pb_lathe_murray/archive/changes_from_sim_to_machine_2026-04-22.txt
/home/murray/linuxcnc/configs/pb_lathe_murray/archive/hal_changes_2026-04-22.txt
/home/murray/linuxcnc/configs/pb_lathe_murray/archive/hallib/core_sim_2.hal
/home/murray/linuxcnc/configs/pb_lathe_murray/archive/hallib/core_sim_4.hal
/home/murray/linuxcnc/configs/pb_lathe_murray/archive/hallib/core_xyzclathe_sim.hal
/home/murray/linuxcnc/configs/pb_lathe_murray/archive/hallib/sim_spindle_encoder.hal
/home/murray/linuxcnc/configs/pb_lathe_murray/archive/hallib/simulated_home_xyzc.hal
/home/murray/linuxcnc/configs/pb_lathe_murray/archive/hallib/simulated_home_xz.hal
/home/murray/linuxcnc/configs/pb_lathe_murray/archive/hallib/simulated_lathe.hal
/home/murray/linuxcnc/configs/pb_lathe_murray/archive/hallib/spindle_sim.hal
/home/murray/linuxcnc/configs/pb_lathe_murray/archive/probe_basic_lathe.ini.bak
/home/murray/linuxcnc/configs/pb_lathe_murray/archive/probe_basic_lathe.ini.bak2
/home/murray/linuxcnc/configs/pb_lathe_murray/archive/sim-lathe.var
/home/murray/linuxcnc/configs/pb_lathe_murray/archive/sim-lathe.var.bak
/home/murray/linuxcnc/configs/pb_lathe_murray/archive/sim.log
/home/murray/linuxcnc/configs/pb_lathe_murray/custom_config.yml
/home/murray/linuxcnc/configs/pb_lathe_murray/hallib/Bantam_v1.hal
/home/murray/linuxcnc/configs/pb_lathe_murray/hallib/probe_basic_lathe_postgui.hal
/home/murray/linuxcnc/configs/pb_lathe_murray/hallib/shutdown.hal
/home/murray/linuxcnc/configs/pb_lathe_murray/hallib/xhc-whb04b-6.hal
/home/murray/linuxcnc/configs/pb_lathe_murray/lathe.tbl
/home/murray/linuxcnc/configs/pb_lathe_murray/linuxcnc.var
/home/murray/linuxcnc/configs/pb_lathe_murray/pbsplash.png
/home/murray/linuxcnc/configs/pb_lathe_murray/probe_basic_lathe.ini
/home/murray/linuxcnc/configs/pb_lathe_murray/python/remap.py
/home/murray/linuxcnc/configs/pb_lathe_murray/python/stdglue.py
/home/murray/linuxcnc/configs/pb_lathe_murray/python/toplevel.py
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/backup_restore.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/backup_status.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/chamfer.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/clamptool.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/drill.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/extendatc.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/facing.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/go_to_g30.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/go_to_home.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/go_to_zero.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/m10.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/m11.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/m12.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/m13.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/m21.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/m22.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/m23.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/m24.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/m25.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/m26.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/m6_tool_call_main_panel.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/m6_tool_call_touch_panel.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/move_head_above_carousel.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/move_tool_to_carousel_height.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/on_abort.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/orientspindle.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_back_left_inside_corner.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_back_left_top_corner.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_back_right_inside_corner.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_back_right_top_corner.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_back_top_side.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_cal_reset.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_cal_round_boss.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_cal_round_pocket.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_cal_square_boss.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_cal_square_pocket.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_corner_x_minus_edge_angle.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_corner_x_plus_edge_angle.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_corner_y_minus_edge_angle.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_corner_y_plus_edge_angle.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_front_left_inside_corner.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_front_left_top_corner.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_front_right_inside_corner.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_front_right_top_corner.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_front_top_side.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_left_top_side.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_rect_boss.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_rect_pocket_center_start.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_rect_pocket.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_ridge_x.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_ridge_y.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_right_top_side.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_round_boss.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_round_pocket_center_start.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_round_pocket.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_spindle_nose.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_top_back_edge_angle.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_top_front_edge_angle.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_top_left_edge_angle.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_top_right_edge_angle.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_valley_x_center_start.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_valley_x.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_valley_y_center_start.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_valley_y.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_x_minus.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_x_minus_wco.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_x_plus.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_x_plus_wco.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_y_minus.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_y_minus_wco.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_y_plus.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_y_plus_wco.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_z_minus_sub.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/probe_z_minus_wco.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/program_coolant.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/radius.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/reset_all_data.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/retractatc.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/set_g30_position.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/set_mt_x_sub.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/set_mt_z_sub.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/tapping.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/threading.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/toolchange.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/tool_touch_off.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/touch_off_x.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/touch_off_z.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/touch_x.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/touch_z.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/unclamptool.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/x_data_reset.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/subroutines/z_data_reset.ngc
/home/murray/linuxcnc/configs/pb_lathe_murray/user_buttons/template_user_buttons/template_user_buttons.py
/home/murray/linuxcnc/configs/pb_lathe_murray/user_buttons/template_user_buttons/template_user_buttons.ui
/home/murray/linuxcnc/configs/pb_lathe_murray/user_buttons/template_user_buttons/template_user_buttons_ui.py
/home/murray/linuxcnc/configs/pb_lathe_murray/user_dro_display/user_dros/dros_user.py
/home/murray/linuxcnc/configs/pb_lathe_murray/user_dro_display/user_dros/dros_user.ui
/home/murray/linuxcnc/configs/pb_lathe_murray/user_dro_display/user_dros/dros_user_ui.py
/home/murray/linuxcnc/configs/pb_lathe_murray/user_dro_display/user_dros/offset_dros_user.ui
/home/murray/linuxcnc/configs/pb_lathe_murray/user_dro_display/user_dros/offset_dros_user_ui.py
/home/murray/linuxcnc/configs/pb_lathe_murray/user_dro_display/xyzc_dros/dros_xyzc.py
/home/murray/linuxcnc/configs/pb_lathe_murray/user_dro_display/xyzc_dros/dros_xyzc.ui
/home/murray/linuxcnc/configs/pb_lathe_murray/user_dro_display/xyzc_dros/dros_xyzc_ui.py
/home/murray/linuxcnc/configs/pb_lathe_murray/user_dro_display/xyzc_dros/offset_dros_xyzc.ui
/home/murray/linuxcnc/configs/pb_lathe_murray/user_dro_display/xyzc_dros/offset_dros_xyzc_ui.py
/home/murray/linuxcnc/configs/pb_lathe_murray/user_dro_display/xzc_dros/dros_xzc.py
/home/murray/linuxcnc/configs/pb_lathe_murray/user_dro_display/xzc_dros/dros_xzc.ui
/home/murray/linuxcnc/configs/pb_lathe_murray/user_dro_display/xzc_dros/dros_xzc_ui.py
/home/murray/linuxcnc/configs/pb_lathe_murray/user_dro_display/xzc_dros/offset_dros_xzc.ui
/home/murray/linuxcnc/configs/pb_lathe_murray/user_dro_display/xzc_dros/offset_dros_xzc_ui.py
/home/murray/linuxcnc/configs/pb_lathe_murray/user_dro_display/xz_dros/dros_xz.py
/home/murray/linuxcnc/configs/pb_lathe_murray/user_dro_display/xz_dros/dros_xz.ui
/home/murray/linuxcnc/configs/pb_lathe_murray/user_dro_display/xz_dros/dros_xz_ui.py
/home/murray/linuxcnc/configs/pb_lathe_murray/user_dro_display/xz_dros/offset_dros_xz.ui
/home/murray/linuxcnc/configs/pb_lathe_murray/user_dro_display/xz_dros/offset_dros_xz_ui.py
/home/murray/linuxcnc/configs/pb_lathe_murray/user_tabs/template_main/template_main.py
/home/murray/linuxcnc/configs/pb_lathe_murray/user_tabs/template_main/template_main.ui
/home/murray/linuxcnc/configs/pb_lathe_murray/user_tabs/template_main/template_main_ui.py
/home/murray/linuxcnc/configs/pb_lathe_murray/user_tabs/template_sidebar/template_sidebar.py
/home/murray/linuxcnc/configs/pb_lathe_murray/user_tabs/template_sidebar/template_sidebar.ui
/home/murray/linuxcnc/configs/pb_lathe_murray/user_tabs/template_sidebar/template_sidebar_ui.py
/home/murray/linuxcnc/configs/pb_lathe_murray/.vcp_persistent_data.pickleThat's clean. Here's what was done:
Archived to archive/:
probe_basic_lathe.ini.bakand.bak2— old INI backupssim-lathe.varand.bak— old parameter file (sim-named)sim.log— runtime logchanges_from_sim_to_machine_2026-04-22.txtandhal_changes_2026-04-22.txt— the printable log files are safely inarchive/rather than deleted
Archived to archive/hallib/:
- All 8 simulation HAL files (
core_sim_2.hal,core_sim_4.hal,core_xyzclathe_sim.hal,sim_spindle_encoder.hal,simulated_home_xyzc.hal,simulated_home_xz.hal,simulated_lathe.hal,spindle_sim.hal)
Also created:
linuxcnc.var— copied fromsim-lathe.varbefore archiving it, so the INI'sPARAMETER_FILE = linuxcnc.varreference now has a file to find on first run.
Both log files updated. The changes added to each:
changes_from_sim_to_machine_2026-04-22.txt — corrected the [HAL] section (removed the erroneous time.hal ADD entry, clarified it was actually removed and why), then added a new section at the bottom covering linuxcnc.var creation and all files moved to archive.
hal_changes_2026-04-22.txt — replaced the vague "still present" note with the full list of archived simulation HAL files, then added the same tidy-up section covering the linuxcnc.var creation and complete lists of archived and active files.
The issue is with the names= syntax for the scale component. When names= is used, HAL creates the function and pins without the .0 index suffix — so scale_to_rpm.0 doesn't exist; it's just scale_to_rpm. I need to fix the addf, setp, and net lines in Bantam_v1.hal, and the matching pin reference in the postgui.
Now fix the matching pin reference in the postgui:
The root cause: with loadrt scale names=scale_to_rpm, HAL names everything with the bare name — function is scale_to_rpm, pins are scale_to_rpm.in/out/gain. The .0 index only appears when using count=N syntax. Three lines fixed across two files.
The error is clear — emcSpindleInit(1) failed means LinuxCNC is trying to initialise a second spindle (index 1) because SPINDLES = 2 is set in [TRAJ], but nothing in the HAL is wired to spindle.1.*. The machine only has one spindle. This is a single-line INI fix.
# Fix: emcSpindleInit(1) failed on startup
## Context
LinuxCNC fails to start with `emcSpindleInit(1) failed` because `SPINDLES = 2`
in `[TRAJ]` tells the motion controller to initialise two spindles. The HAL
only wires `spindle.0.*` (one physical spindle). The second spindle init call
finds nothing connected and aborts startup. This value was carried over from
the PB simulation template and was never appropriate for this machine.
## Change
**File:** `pb_lathe_murray/probe_basic_lathe.ini`
In `[TRAJ]`:
```
SPINDLES = 2 → SPINDLES = 1
```
That is the only change required.
## Verification
LinuxCNC should start without the `emcSpindleInit` error and reach the
Probe Basic GUI successfully.
Done. SPINDLES = 2 → SPINDLES = 1 in [TRAJ]. The motion controller will now only attempt to initialise the one spindle that is wired in the HAL.
The error is on line 8 of the postgui:
net prog-running not.0.in <= halui.program.is-idle
halui.program.is-idle is already linked to the signal pdnt.program.is-idle by the pendant HAL. The postgui can't link it to a second signal. The fix is to add not.0.in as an extra reader on the existing pdnt.program.is-idle signal instead. The next line has the same latent problem with halui.program.is-paused vs pdnt.program.is-paused — fixing both now.
The pendant HAL already created those two signals with halui.program.is-idle and halui.program.is-paused as their sources. By referencing the existing signal names (pdnt.program.is-idle and pdnt.program.is-paused) we just add not.0.in and time.0.pause as additional readers on those same signals — no conflict.
And .... in one bound we were free!! Yes it actually works, delivering a working, living instance of PBL, all within 30 mins or less. Previous attempts were "somewhat less fruitful".
The only feature I've noticed that doesn't function at first scan is the wireless MPG. I will have to go back and have another session with Claude later to fix it but on this first experience I'm encouraged - and possibly even optimistic that I will get it sorted out.
No comments:
Post a Comment