Category: Advanced Configuration
[SOLVED] XHC-WHB04B-6 on LinuxCNC 2.9.6 (QtDragonHD + 7i96S) — Beginner notes
(I am sharing the exact steps I followed, written simply. Many threads assume advanced users; I am a beginner.)
My machine / system
- Gantry router XYYZ (dual Y motors), work area approx. 1300 x 1210 mm
- Controller: Mesa 7i96S (Ethernet, step/dir)
- Spindle: 2.2 kW, 24,000 RPM
- UI: QtVCP / QtDragon_HD
- OS: Raspberry Pi 5, Debian 12 (Bookworm)
- LinuxCNC 2.9.6
What actually fixed it (short version)
- Load the pendant HAL file as a HALFILE (before the post-GUI), same as the donor machine.
- Add MDI_COMMAND lines under [HALUI] so pins halui.mdi-command-XX exist.
- Keep qtvcp_postgui.hal clean (only GUI signals, no pendant driver).
- In my case, moving the WHB USB dongle to another port made the wheel/jog and DRO updates work.
STEP 1 — Copy the pendant HAL file
Place xhc-whb04b-6.hal in your config folder (the same folder that has your .ini and main .hal), e.g.:
~/linuxcnc/configs/YOUR-MACHINE/xhc-whb04b-6.hal
STEP 2 — Load the pendant before the post-GUI
Open your .ini and in the [HAL] section add this line and keep this exact order:
[HAL]
HALUI = halui
HALFILE = CNC-CARPINTERA.hal
HALFILE = custom.hal
HALFILE = xhc-whb04b-6.hal ; <<< NEW: load the pendant here
POSTGUI_HALFILE = qtvcp_postgui.hal ; keep this AFTER
SHUTDOWN = shutdown.hal
Important: do not load the WHB driver inside qtvcp_postgui.hal.
STEP 3 — Create MDI pins under [HALUI]
In the same .ini, find (or create) the [HALUI] section and paste this block right under it:
[HALUI]
MDI_COMMAND = (DEBUG,<1>) ; <<< NEW (good for testing macros)
MDI_COMMAND = G10 L20 P0 X[#<_x>/2.0] ; <<< NEW (zero X at part center)
MDI_COMMAND = G10 L20 P0 Y[#<_y>/2.0] ; <<< NEW (zero Y at part center)
MDI_COMMAND = (DEBUG,<4>) ; <<< NEW
MDI_COMMAND = (DEBUG,<5>) ; <<< NEW
MDI_COMMAND = G10 L20 P0 X0 ; <<< NEW (Zero X)
MDI_COMMAND = G10 L20 P0 Y0 ; <<< NEW (Zero Y)
MDI_COMMAND = G10 L20 P0 Z0 ; <<< NEW (Zero Z)
This creates halui.mdi-command-00..07 (indexes follow the order above).
Add more MDI_COMMAND lines if your xhc-whb04b-6.hal uses higher indices.
Notes so jogging actually works
- E-STOP released, Machine ON
- Manual mode
- Fully homed (for XYYZ: X, Y1, Y2, Z)
- On the pendant, use Continuous, or Step + Step size
- If the wheel does nothing or DRO does not update: try a different USB port/dongle (this was the final fix for me)
Thanks and request
Many thanks to the original thread’s author for sharing files and guidance.
If possible, could you post a short summary of the final button mapping (what each macro-N does, Continuous/Step, ABS/REL, etc.)? That would help beginners keep their configs consistent.
If anyone needs it, I can share my final .ini, xhc-whb04b-6.hal, and a minimal qtvcp_postgui.hal exactly as they ended up.