XHC-WHB04B-6(1)

πŸ“¦
version 2.9.4 Β· 4 versions
, in ubuntu resolute, ubuntu stonking

XHC-WHB04B-6(1) β€” okay bestie, this is the LinuxCNC Documentation page for xhc-whb04b-6, and we're doing this in 4 parts. Part 1 is right here. Hydrate. πŸ’–βœ¨

🌸 NAME 🌸

xhc-whb04b-6 β€” a non-realtime jog dial HAL component for the wireless XHC WHB04B-6 USB device. That's the whole vibe. πŸŽ€

✨ SYNOPSIS ✨

xhc-whb04b-6 [-h] | [-H] [OPTIONS]

πŸ’… DESCRIPTION πŸ’…

Okay so the xhc-whb04b-6 HAL component supports the XHC WHB04B-6, a 6-axis wireless USB pendant. It's giving: a bunch of push-buttons, a jogwheel, two rotary buttons for axis and speed / step selection, and an ordinary LCD display. πŸ‘‘

The LCD display has a very simple firmware interface, so it can only show the following listed information. No other info β€” like custom data β€” can be printed. Periodt. πŸ’…

  • Activated axis (X, Y, Z, A, B or C)
  • Current axis position of X, Y, Z and separately of A, B, C.
  • Whether machine (X, Y, Z, A, B or C) or relative (X1, Y1, Z1, A1, B1 or C1) coordinates are displayed.
  • Step size or velocity depending on the operating mode (MPG or Step or Continuous).
  • Feedrate override
  • Spindle Feedrate override
  • Machine state such as reset.
  • Battery level
  • Wireless signal strength

The pendant display, its rotary selector switch, and the component pin names use designators x, y, z, a, b and c. While this arrangement presumes a machine configured as X, Y, Z, A, B an C, the pins can be assigned independently as required in a HAL configuration. (Yes, the docs say β€œan C” β€” we keep it exactly, no cap. 😭)

πŸ‘‘ OPTIONS πŸ‘‘

  • -h, --help β€” Prints the synopsis and the most commonly used commands.
  • -H β€” Run xhc-whb04b-6 in HAL-mode instead of interactive mode. When in HAL mode commands from device will be exposed to HAL’s shred memory. Interactive mode is useful for testing device connectivity and debugging.
  • -s β€” Lead + jogwheel changes the spindle override speed. Each tick will increase/decrease the spindle override.
  • -f β€” MPG + jogwheel changes the feed override. Each tick will increment/decrement the feed override.
  • -B β€” Add 5 mm and 10 mm to Step feedrate output
  • -t β€” Wait with timeout for USB device then proceed, exit otherwise. Without -t the timeout is implicitly infinite.
  • -u, -U β€” Show received data from device. With -U received and transmitted data will be printed. Output is prefixed with "usb".
  • -p β€” Show HAL pins and HAL related messages. Output is prefixed with "hal".
  • -e β€” Show captured events such as button pressed/released, jog dial, axis rotary button, and feed rotary button event. Output is prefixed with "event".
  • -a β€” Enable all logging facilities without explicitly specifying each.
  • -c β€” Enable checksum output which is necessary for debugging the checksum generator function. Do not rely on this feature since it will be removed once the generator is implemented.
  • -n β€” Force being silent and not printing any output except of errors. This will also inhibit messages prefixed with "init".

πŸ¦‹ UDEV πŸ¦‹

The xhc-whb04b-6 executable needs permission for reading the pendant’s USB device. There may be the need for additional udev rules. If so, this file /etc/udev/rules.d/99-xhc-whb04b-6.rules should be created with the single line:

ATTR{idProduct}=="eb93", ATTR{idVendor}=="10ce", MODE="0666", OWNER="root", GROUP="plugdev"

🌈 STANDALONE USAGE 🌈

The xhc-whb04b-6 program can be run from the command line without LinuxCNC to test a pendant. This standalone mode is used to identify the button codes produced for each button press and debug transmitted USB data. πŸ”

πŸŽ€ EXAMPLES πŸŽ€

  • xhc-whb04b-6 -ue β€” Start in simulation mode and prints incoming USB data transfer and generated key pressed/released events.
  • xhc-whb04b-6 -p β€” Start in simulation mode and prints HAL pin names and events distributed to HAL memory.
  • xhc-whb04b-6 -H β€” Start in HAL mode (Normal mode for real machine use).
  • xhc-whb04b-6 -HsfB β€” Start in HAL mode + Spindle Override + Feedrate Override + Big step 5/10 mm).

πŸ’œ HAL USAGE πŸ’œ

Use the -H option to specify HAL mode and other options as required:

loadusr -W xhc-whb04b-6 -HsfB

πŸ’– Input/Output Signals πŸ’–

Note: For each button an output pin is provided even if no functionality is realized with that signal. For example, to stop a running program the Stop button pin may be directly connected to halui.program.stop. However, to start/pause/resume a program, the corresponding button toggles besides whb.button.start-pause also the whb.halui.program.{run,pause,resume} signals accordingly.
Note: The Spindle+/Spindle- buttons do manipulate the spindle override. The spindle speed is set with the respective combos Fn + Spindle- and FN + Spindle+.

The following tables list all in-/output pins and state which signals they are meant to be connected to.

βš™οΈ Axis and Stepgen βš™οΈ

Signals utilized for moving axis.

<N> ... denotes the axis number, which is of {x, y, z, a, b, c}.

  • whb.halui.home-all (bit,out) β€” connect to halui.home-all, driven by M-Home. Pin for requesting all axis to home. See also whb.button.m-home.
  • whb.halui.axis._<N>_.select (bit,out) β€” connect to halui.axis._<N>_.select. Pin to select axis.
  • whb.axis._<N>_.jog-counts (s32,out) β€” connect to axis._<N>_.jog-counts. The count pin of the jogwheel.
  • whb.axis._<N>_.jog-enable (bit,out) β€” connect to axis._<N>_.jog-enable. If true (and in manual mode), any change to "jog-counts" will result in motion. If false, "jog-counts" is ignored.
  • whb.axis._<N>_.jog-scale (float,out) β€” connect to axis.`__<N>__.jog-scale` . The distance to move for each count on "jog-counts", in machine units.
  • whb.axis._<N>_.jog-vel-mode (bit,out) β€” connect to axis.`__<N>__.jog-jog-vel-mode` . If false the jogwheel operates in position mode. The axis will move exactly jog-scale units for each count, regardless of how long that might take. If true, the jogwheel operates in velocity mode - motion stops when the wheel stops, even if that means the commanded motion is not completed.
  • whb.halui.max-velocity.value (float,in) β€” connect to halui.max-velocity.value. The maximum allowable velocity, in units per second (<N> is two digit 0-padded).
  • whb.halui.feed-override.scale (float,in) β€” connect to halui.feed-override.scale. The scaling for feed override value.
  • whb.halui.axis.`__<N>__.pos-feedback` (float,in) β€” connect to halui.axis.`__<N>__.pos-feedback` . Feedback axis position in machine coordinates to be displayed.
  • whb.halui.axis._<N>_.pos-relative (float,in) β€” connect to halui.axis.`__<N>__.pos-relative` . Commanded axis position in relative coordinates to be displayed.

πŸ› οΈ Machine πŸ› οΈ

Signals utilized for toggling machine status.

  • whb.halui.machine.on (bit,out) β€” connect to halui.machine.on. Pin for requesting machine on.
  • whb.halui.machine.is-on (bit,in) β€” connect to halui.machine.is-on. Pin that indicates machine is on.
  • whb.halui.machine.off (bit,out) β€” connect to halui.machine.off. Pin for requesting machine off.

πŸŒ€ Spindle πŸŒ€

Signals utilized for operating a spindle.

  • whb.halui.spindle.start (bit,out) β€” connect to halui.spindle.0.start. Pin to start the spindle.
  • whb.halui.spindle.is-on (bit,in) β€” connect to halui.spindle.0.on. Pin to indicate spindle is on (either direction).
  • whb.halui.spindle.stop (bit,out) β€” connect to halui.spindle.0.stop. Pin to stop the spindle.
  • whb.halui.spindle.forward (bit,out) β€” connect to halui.spindle.0.forward. Pin to make the spindle go forward.
  • whb.halui.spindle.reverse (bit,out) β€” connect to halui.spindle.0.reverse. Pin to make the spindle go reverse.
  • whb.halui.spindle.decrease (bit,out) β€” connect to halui.spindle.0.decrease. Pin to decrease the spindle speed.
  • whb.halui.spindle.increase (bit,out) β€” connect to halui.spindle.0.increase. Pin to increase the spindle speed.
  • whb.halui.spindle-override.increase (bit,out) β€” connect to halui.spindle.0.override.increase. Pin for increasing the spindle override by the amount of scale.
  • whb.halui.spindle-override.decrease (bit,out) β€” connect to halui.spindle.0.override.decrease. Pin for decreasing the spindle override by the amount of scale.
  • whb.halui.spindle-override.value (float,in) β€” connect to halui.spindle.0.override.value. The current spindle override value.
  • whb.halui.spindle-override.scale (float,in) β€” connect to halui.spindle.0.override.scale. The current spindle scaling override value.

πŸ“ Feed πŸ“

Signals utilized for operating spindle and feed override. The feed rotary button can serve in

  • Continuous move x% from max velocity
  • Step move x mm
  • MPG override feed/spindle
  • The special position Lead.

Continuous: In this mode jogging is performed at the selected feed rate. As long the jogwheel turns, the selected axis moves.

Step: In this mode the machine moves steps * wheel_counts at the currently selected step size and the current set feed rate in machine units. If the commanded position is not reached the machine keeps moving even the jogwheel is not turning.

Lead: Manipulates the spindle override.

MPG: Manipulates the feedrate override.

Note: As a consequence of 3 modes from manufacturer, switching the feed rotary button back from Lead revert to MPG mode, MPG mode is default mode at startup. Depending on the mode before turning the rotary button, the feed override results in different values. In MPG/CON the feed rate will change to 100%, 60%, ... and so forth. In Step mode the feed rate is specified in mm.
  • whb.halui.feed-override.value (float,in) β€” connect to halui.feed-override.value. The current feed override value.
  • whb.halui.feed-override.decrease (bit,out) β€” connect to halui.feed-override.decrease. Pin for decreasing the feed override by amount of scale.
  • whb.halui.feed-override.increase (bit,out) β€” connect to halui.feed-override.increase. Pin for increasing the feed override by amount of scale.
  • whb.halui.feed-override.scale (float,out) β€” connect to halui.feed-override.scale. Pin for setting the scale on changing the feed override.
  • whb.halui.max-velocity.value (float,out) β€” connect to halui.max-velocity.value.

▢️ Program ▢️

Signals for operating program and MDI mode.

  • whb.halui.program.run (bit,out) β€” connect to halui.program.run in for running a program.
  • whb.halui.program.is-running (bit,in) β€” wire this to halui.program.is-running, it tells you a program is out here running πŸ’…
  • whb.halui.program.pause (bit,out) β€” wire this to halui.program.pause. this is the pin that pauses a program ⏸️
  • whb.halui.program.is-paused (bit,in) β€” wire this to halui.program.is-paused. this pin says a program is pausing πŸ”₯
  • whb.halui.program.resume (bit,out) β€” wire this to halui.program.resume. the pin that resumes a program ▢️
  • whb.halui.program.stop (bit,out) β€” wire this to program.stop. the pin that stops a program πŸ›‘
  • whb.halui.program.is-idle (bit,in) β€” wire this to halui.program.is-idle. this pin says literally no program is running, bestie, we're chilling 🌸
  • whb.halui.mode.auto (bit,out) β€” wire this to halui.mode.auto. the pin for requesting auto mode πŸ€–
  • whb.halui.mode.is-auto (bit,in) β€” wire this to halui.mode.is-auto. the pin that tells you auto mode is ON πŸ‘‘
  • whb.halui.mode.joint (bit,out) β€” wire this to halui.mode.joint. the pin for requesting joint by joint mode πŸ¦‹
  • whb.halui.mode.is-joint (bit,in) β€” wire this to halui.mode.is-joint. this pin says joint by joint mode is on ✨
  • whb.halui.mode.manual (bit,out) β€” wire this to halui.mode.manual. the pin for requesting manual mode πŸ™Œ
  • whb.halui.mode.is-manual (bit,in) β€” wire this to halui.mode.is-manual. this pin says manual mode is on πŸ’–
  • whb.halui.mode.mdi (bit,out) β€” wire this to halui.mode.mdi. the pin for requesting MDI mode ⌨️
  • whb.halui.mode.is-mdi (bit,in) β€” wire this to halui.mode.is-mdi. this pin says MDI mode is on 🌈
  • whb.halui.mode.teleop (bit,out) β€” wire this to halui.mode.teleop. the pin for requesting axis by axis mode πŸŽ€
  • whb.halui.mode.is-teleop (bit,in) β€” wire this to halui.mode.is-teleop. this pin says axis by axis mode is on ⭐

Buttons πŸ’…

okay so for flexibility reasons, every single button hands you an output pin β€” even when no functionality is actually realized directly with that signal. no pin left behind, periodt.

The Fn button can be combined with each other push-button. this includes also RESET, Stop, Start/Pause, Macro-10, and Step|Continuous. By default the more frequent used orange buttons are executed, whereas blue ones (whb.button.macro-<M>) go off by combining them with Fn β€” so press Fn first, then the button πŸ“.

Button macro needs to be added to your INI and needs to be edited for your own use πŸ‘‡

[HALUI]
MDI_COMMAND=(debug,macro0)  # this one is for numbering but not used by pendant (need 1 to 16)
MDI_COMMAND=(debug,macro1)
MDI_COMMAND=(debug,macro2)
MDI_COMMAND=(debug,macro3)
MDI_COMMAND=(debug,macro4)
MDI_COMMAND=(debug,macro5)
MDI_COMMAND=(debug,macro6)
MDI_COMMAND=(debug,macro7)
MDI_COMMAND=(debug,macro8)
MDI_COMMAND=(debug,macro9)
MDI_COMMAND=(debug,macro10)
MDI_COMMAND=(debug,macro11)
MDI_COMMAND=(debug,macro12)
MDI_COMMAND=(debug,macro13)
MDI_COMMAND=(debug,macro14)
MDI_COMMAND=(debug,macro15)
MDI_COMMAND=(debug,macro16)

<M> … denotes an arbitrary macro number which is of {1, 2, ..., 16} 🎲

  • whb.button.reset (bit,out) β€” see whb.halui.estop.{activate, reset}. True when one Reset button is down, false otherwise. for toggling E-stop use whb.halui.estop.active and .reset πŸ”΄
  • whb.button.stop (bit,out) β€” see whb.halui.program.stop. True on Stop button down, false otherwise. for stopping a program use whb.halui.program.stop πŸ›‘
  • whb.button.start-pause (bit,out) β€” see whb.halui.program.{run, pause, resume}. True on Start-Pause button down, false otherwise. for toggling start-pause use whb.halui.program.run, .pause, and .resume ⏯️
  • whb.button.feed-plus (bit,out) β€” True on Feed+ button down, false otherwise βž•
  • whb.button.feed-minus (bit,out) β€” True on Feed- button down, false otherwise βž–
  • whb.button.spindle-plus (bit,out) β€” see halui.spindle.0.override.increase. True on Spindle+ button down, false otherwise. this button is meant to manipulate the spindle override. for increasing the spindle override use halui.spindle.0.override.increase πŸ“ˆ
  • whb.button.spindle-minus (bit,out) β€” see halui.spindle.0.override.decrease. True on Spindle- button down, false otherwise. this button is meant to manipulate the spindle override. for decreasing the spindle override use halui.spindle.0.override.decrease πŸ“‰
  • whb.button.m-home (bit,out) β€” connect to halui.home-all. True on M-Home button down, false otherwise. it requests MDI mode before the button pin is set. see also whb.halui.mode.mdi 🏠
  • whb.button.safe-z (bit,out) β€” connect to halui.mdi-command-<M>. True on Safe-Z button down, false otherwise. requests MDI mode before the button pin is set. see also whb.halui.mode.mdi πŸ›‘οΈ
  • whb.button.w-home (bit,out) β€” connect to halui.mdi-command-<M>. True on W-Home button down, false otherwise. requests MDI mode before the button pin is set. see also whb.halui.mode.mdi 🏑
  • whb.button.s-on-off (bit,out) β€” see whb.halui.spindle.{start, stop}. True on S-ON/OFF button down, false otherwise. for toggling spindle on-off use halui.spindle.0.start. for toggling spindle on-off use halui.spindle.0.stop πŸ”Œ
  • whb.button.fn (bit,out) β€” True on Fn button down, false otherwise ✨
  • whb.button.probe-z (bit,out) β€” connect to halui.mdi-command-<M>. True on Probe-Z button down, false otherwise. requests MDI mode before the button pin is set. see also whb.halui.mode.mdi πŸ”
  • whb.button.macro-1 (bit,out) β€” connect to halui.mdi-command-<M>. True on Macro-1 button (Fn + Feed+) down, false otherwise 1️⃣
  • whb.button.macro-2 (bit,out) β€” connect to halui.mdi-command-<M>. True on Macro-2 button (Fn + Feed-) down, false otherwise 2️⃣
  • whb.button.macro-3 (bit,out) β€” see whb.halui.spindle.increase. True on Macro-3 button (Fn + Spindle+) down, false otherwise. this button is meant to manipulate the spindle speed. for decreasing the spindle speed use whb.halui.spindle.increase 3️⃣
  • whb.button.macro-4 (bit,out) β€” see whb.halui.spindle.decrease. True on Macro-4 button down (Fn + Spindle-), false otherwise. this button is meant to manipulate the spindle speed. for decreasing the spindle speed use whb.halui.spindle.decrease 4️⃣
  • whb.button.macro-5 (bit,out) β€” connect to halui.mdi-command-<M>. True on Macro-5 button down (Fn + M-HOME), false otherwise 5️⃣
  • whb.button.macro-6 (bit,out) β€” connect to halui.mdi-command-<M>. True on Macro-6 button down (Fn + Safe-Z), false otherwise 6️⃣
  • whb.button.macro-7 (bit,out) β€” connect to halui.mdi-command-<M>. True on Macro-7 button down (Fn + W-HOME), false otherwise 7️⃣
  • whb.button.macro-8 (bit,out) β€” reserved for Spindle Direction. True on Macro-8 button down (Fn + S-ON/OFF), false otherwise 8️⃣
  • whb.button.macro-9 (bit,out) β€” connect to halui.mdi-command-<M>. True on Macro-9 button down (Fn + Probe-Z), false otherwise 9️⃣
  • whb.button.macro-10 (bit,out) β€” reserved for toggle DRO Abs/rel. True on Macro-10 button down, false otherwise. it switches the display coordinates to relative coordinates. on display the axis are denoted then as X1, Y1, Z1, A1, B1 and C1. see also whb.halui.axis.<N>.pos-relative πŸ”Ÿ
  • whb.button.macro-11 (bit,out) β€” connect to halui.mdi-command-<M>. True on Macro-11 button down (Fn + RESET), false otherwise 1️⃣1️⃣
  • whb.button.macro-12 (bit,out) β€” connect to halui.mdi-command-<M>. True on Macro-12 button (Fn + Stop) down, false otherwise 1️⃣2️⃣
  • whb.button.macro-13 (bit,out) β€” connect to halui.mdi-command-<M>. True on Macro-13 button (Fn + Start/Pause) down, false otherwise 1️⃣3️⃣
  • whb.button.macro-14 (bit,out) β€” connect to halui.mdi-command-<M>. True on Macro-14 button (Fn + Macro-10) down, false otherwise 1️⃣4️⃣
  • whb.button.macro-15 (bit,out) β€” connect to halui.mdi-command-<M>. True on Macro-15 button down (Fn + MPG), false otherwise 1️⃣5️⃣
  • whb.button.macro-16 (bit,out) β€” connect to halui.mdi-command-<M>. True on Macro-16 button (Fn + Step) down, false otherwise 1️⃣6️⃣
  • whb.button.mode-continuous (bit,out) β€” True on Continuous mode button down, false otherwise ♾️
  • whb.button.mode-step (bit,out) β€” True on Step mode button down, false otherwise πŸ‘£

Pendant 🫢

  • whb.pendant.is-sleeping (bit,out) β€” True as long as the pendant is in sleep mode (usually a few seconds after it's turned off), false otherwise 😴
  • whb.pendant.is-connected (bit,out) β€” True as long as the pendant is not in sleep mode (i.e. it's turned on), false otherwise 🌟

🚨 HAL CONFIGURATION EXAMPLE 🚨

⚠️ bestie, be careful ⚠️ if you're copy and pasting this example code from the online web docs. certain characters are incompatibly encoded by the web site (minus becomes em-dash 😭). it is safer to copy and paste from https://raw.githubusercontent.com/LinuxCNC/linuxcnc/2.9/src/hal/user_comps/xhc-whb04b-6/example-configuration.md. πŸ’–
#
### Hal File xhc_whb04b_6.hal Example
#
# ######################################################################
# load pendant components
# ######################################################################

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

okay so this is the part where it gets real β€” it's the actual net list, fr fr. Every line is one net tying three things together: the pendant's own name on the left, the whb component pin in the middle, and the HAL pin it talks to on the right. Copy it, don't retype it, bestie. Typos in signal names are a whole personality trait and not the cute kind. πŸ’…

Here's the program-control chunk β€” run, pause, resume, stop, and the "is it doing the thing?" readbacks:

# 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

heads up: see how pdnt.program-is-running uses a hyphen while the others use dots? That's not me being sloppy, that's the list as-written. Keep it. πŸ‘‘

Next up, machine modes. Auto, manual, MDI, joint, teleop β€” and the is- twins that report back what mode you're actually in. Note the is- ones swap the pin order around, so watch those columns:

# 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                      halui.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

Then the homing vibe check β€” this is the is-homed signal per axis, and it's what lets the pendant do its thing when the machine isn't homed yet:

# "is-homed" axis signal for allowing pendant when machine is not homed
net pdnt.axis.X.is-homed                  halui.joint.0.is-homed                whb.halui.joint.x.is-homed
net pdnt.axis.Y.is-homed                  halui.joint.1.is-homed                whb.halui.joint.y.is-homed
net pdnt.axis.Z.is-homed                  halui.joint.2.is-homed                whb.halui.joint.z.is-homed

the axis bits: selected, jogging, the whole thing πŸŽ€

Axis selection first. Again β€” X, then lowercase y, then Z on the left, and the pins go lowercase-x, lowercase-y, lowercase-z. That's just how it is:

# "selected axis" signals
net pdnt.axis.X.select                    whb.halui.axis.x.select               halui.axis.x.select
net pdnt.axis.y.select                    whb.halui.axis.y.select               halui.axis.y.select
net pdnt.axis.Z.select                    whb.halui.axis.z.select               halui.axis.z.select

Now the jog family β€” scale, counts, enable, and velocity mode, times three axes. This is your "spin the wheel, machine moves" pipeline right here:

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 β†’ MDI, and the hardcoded ones iykyk ✨

This is the fun one. Some macro buttons just fire an MDI command out of main.ini, and some are reserved because the pendant hardcodes them for a specific job. The trailing comments spell out exactly which is which β€” don't lose a single one:

# 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                                                     # Hardcoded for spindle+ whb.halui.spindle.increase
net pdnt.reserved.for.spindle-            whb.button.macro-4                                                     # Hardcoded 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                                                     # Hardcoded 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/Absolute
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                                                    # Hardcoded for halui.flood on/off
net pdnt.reserved.for.mist                whb.button.macro-16                                                    # Hardcoded 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

bestie note: macro-1 and friends use hyphens, then macro.11, macro.12, macro.13 switch to dots. Both. In the same list. And there's no macro-4 line β€” it's reserved.for.spindle-. It's giving chaotic but valid. πŸ¦‹


coolant: flood & mist πŸ’§

Three lines per coolant: the is-on readback, the off, and the on. The reserved comments point back at the macro buttons up there β€” macro-15 is flood's ride-or-die, macro-16 is mist's:

# 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

And here β€” the lube block is commented out. Not deleted, not "fixed", just sitting there chilling behind # marks. If you're copying this config, leave it exactly like this, bestie:

#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
no cap on this one: commented-out lines start with # and stay that way. The moment you uncomment one you've invented a config that isn't this config. πŸ‘€

the default function buttons 🌸</h3>

Four buttons, four jobs, all spelled out in the comments β€” homing, safe-Z, unpark, and probe-Z:

# default function button signals
net pdnt.button.m-home                    whb.button.m-home                     halui.home-all                   # Homeing 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

(yes, the original says "Homeing" β€” we keep it, we respect it, it's iconic) 🫢


the unused pile (mostly commented, don't @ me) πŸ’€

This whole chunk is either commented out or hanging there exposing pendant-internal status / acting as a plain basic button. It's the "left on read" section:

# unused, just exposes pendant internal status or as basic button
#net pdnt.mode-lead                        whb.halui.feed.selected-lead
#net pdnt.mode-mpg-feed                    whb.halui.feed.selected-mpg-feed
#net pdnt.mode-continuous                  whb.halui.feed.selected-continuous
#net pdnt.mode-step                        whb.halui.feed.selected-step

#net pdnt.button.mode-mpg                  whb.button.mode-continuous
#net pdnt.button.mode-step                 whb.button.mode-step
#net pdnt.button.fn                        whb.button.fn
#net pdnt.button.reset                     whb.button.reset
#net pdnt.button.stop                      whb.button.stop
#net pdnt.button.start-pause               whb.button.start-pause
#net pdnt.button.s-on-off                  whb.button.s-on-off
#net pdnt.button.spindle-plus              whb.button.spindle-plus
#net pdnt.button.spindle-minus             whb.button.spindle-minus
#net pdnt.button.feed-plus                 whb.button.feed-plus
#net pdnt.button.feed-minus                whb.button.feed-minus

vibe check: that whb.button.mode-continuous under a mode-mpg name? That's in the original. Not a typo I'm sneaking in β€” it's a typo I'm preserving, because the rule is the facts don't change. πŸŽ€


spindle time πŸ’– β€” start/stop, direction, speed, override

Spindle first. Watch the pins: is-on feeds spindle.0.on, and the speed command goes out to spindle.0.speed-out-abs. The increase/decrease lines are the ones the reserved macro-3 / macro-4 buttons from earlier hook into:

# 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 absolute

And the spindle override signals. Peak detail: the scale line is needed for both the spindle +/- buttons and the spindle-override +/- buttons, and the .value line is described as GUI feed-rate related signals:

# 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

and yes β€” real talk β€” in that whole spindle-override block, one line uses pdnt.spindle-override.* and the others use pdnt.spindle.override.*. One hyphen, three dots. That's the config. Periodt. πŸ‘‘

           # 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.y.pos-feedback              halui.axis.y.pos-feedback             whb.halui.axis.y.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.y.pos-relative              halui.axis.y.pos-relative             whb.halui.axis.y.pos-relative
           net pdnt.axis.z.pos-relative              halui.axis.z.pos-relative             whb.halui.axis.z.pos-relative

πŸ”— SEE ALSO πŸ’–

  • xhc-whb04b-6 developer documentation on GitHub πŸ‘€βœ¨

🫣 NOTES (the tea β˜•)

okay bestie, real talk πŸŽ€

  • The CRC code function is not disclosed by the manufacturer β€” like, they just didn't tell anyone 😭
  • So the CRC value that gets transmitted with each package is not checked yet πŸ‘€
  • Feel free to help us enhance the component πŸ«ΆπŸ’œ
no cap, if you're the kind of girl who reverse-engineers CRC algorithms for fun, this is your main character moment πŸ’…

πŸ‘‘ AUTHORS 🌈

This component was started by Raoul Rubien, based on the predecessor device component xhc-hb04.cc πŸ› οΈβœ¨


πŸ“œ HISTORY (lore drop 🧚)

The component was developed accidentally as a leisure project 😭 not me coding a whole CNC pendant driver by accident bestie

  • The development started with the xhc-whb04 (4-axis wireless pendant) implementation as reference πŸ“Ÿ
  • 73 & many thanks to the developers who delivered provided an excellent preparatory work! πŸ™ŒπŸ’œ
"73" is ham-radio-speak for best wishes, iykyk πŸ“»βœ¨

Copyright Β© 2018 Raoul Rubien (github.com/rubienr). Updated for Linuxcnc 2020 by alkabal_free.fr. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. πŸ’€

like literally no warranty, do not come for her if your machine does a little dance πŸ™ˆ

and that's the whole page bestie, you ate it all up πŸ’…βœ¨ go forth and wire up that pendant, the vibe check passed, periodt πŸ¦‹πŸŒΈ

this one's from the LinuxCNC collection, version/date stamp 03/17/2026, and yeah the page name itself is XHC-WHB04B-6(1) β€” iconic, no notes πŸ’–

πŸ“¦ where this page comes from