XHC-HB04 Pendant Configuraton

A project log for Shoptask 1720 LinuxCNC

Finally automating my 1998 Lathe/Mill/Drill which was built for CNC

alastair-youngAlastair Young 07/06/2022 at 06:190 Comments

I picked up an open-box XHC-HB04 pendant as I saw that others have done the hard work of writing the LinuxCNC drivers for it. It took a while to figure out how to configure it. There are different versions of the instructions online. Finally I realized that the newer instructions are really simple, and the complicated stuff has been packed into a TCL file, and the instructions are in the TCL file itself

This gets the pendant working for basic functions, though I made some enhancements in my custom_postgui.hal.

The first handles switching from inch to metric. This uses Kurt Jacobson's component to return the G20/G21 state (inch/mm) which is used to toggle a mux2. The mux2 either outputs the raw feedback value or the value scaled by 25.4 i.e. metric value into the pendant display.

In lathe mode there is an additional scale component to double the X value and feed it into the Y display to generate the diameter value like on the gmoccapy DRO

I programmed the zero and half buttons, and I have the smallest MPG scales as 0.0002" i.e. approx 5 microns which is the glass scale resolution. 

I did have to rejigger my emstop and spindle start/stop logic quite a bit. I need to map that out and make sure I understand it. It seems to work as intended.

Homing buttons home, and the A axis home does a home all.

I have the go-to-zero set to go to machine zero. I set machine zero as my tool change position before each setup, so that is useful. I may change this if and when I install home switches.

Macro-1 sets the Z to 0.025 as that is the feeler gauge I use for tool height setting.

Lathe code update:

Mill code update:

Having the MPG available is really handy.