Sunday, 23 November 2025

LinuxCNC time again

Yes, call me a sadomasochist but the time has come for me to get involved in this again. The CNC Bantam sort of works but there are a few issues.

Why the Bantam? 
You might wonder why I'm bothered about the Bantam, given that I have a "proper" CNC lathe in the Tree UP-1000 but they are quite different machines. 

  • The Tree can only sensibly handle work up to perhaps 6" diameter or so and it lacks a conventional tailstock. 
  • The Tree's tailstock provided is only intended for supporting the work, not drills, taps etc.
  • The Tree would struggle to do any heavy duty tapping or threading, as it has a fixed pulley ratio between the motor and spindle. While it's rated at 4kW, operation at low speed and high torque isn't really its strong point.
  • The Bantam has a tailstock, a decent length (approaching 20") and a half decent swing (6.5"). It can also handle a faceplate and weird workpieces.
In short, there are some jobs that I need to Bantam for. However, last time I messed with the setup, there were some "unresolved issues":
  • Andy Pugh's macros required Python 3, yet the current version of LinuxCNC (back in early 2023) only included Python 2. I got the macros installed in the GUI but they wouldn't actually do anything.
  • I had grief with the RT default kernel and had to f*ck about a lot to get things running, eventually having to install a different kernel.
  • I'd almost lost the will to live when getting the closed loop axes set up (X and Z axes have glass scale encoders).
  • And the WMPG took some setting up, to say the least.
So, rather than leave this for another year, I hope to do a fresh installation of both Linux and LinuxCNC.

Fixing the intermittent errors:
Before getting caught up in updates, there's a problem with the cabinet. Sometimes the system works and sometimes it complains that the breakout boards aren't connected. That's classical "dodgy connector" stuff, requiring some investigation.

The lid will have to come off the PC. But that's got to happen anyway, as I need to swap the SSD so I can create a new installation while not losing the last known good (= working) installation.

Some photos for the record. 7i76 (top) and 7i85 (below). The 5i25 sits inside the PC on an ISA slot. It has an FPGA and talks to the external boards by means of ribbon cables via a couple of DB25 connectors:


7i76 closer up:


7i85 closer up:


The encoders for the X and Y axes and the spindle come in through the DB9 connectors at the bottom:


Here's the machine itself. Ground ballscrews, glass encoder scales, AC servos etc:


Installing LinuxCNC:
Currently, LinuxCNC is at v2.9.4 and it comes as an ISO image along with Debian 11 "Bookworm". Note that although Mint is built on Debian, this build uses XCFE, which is more "functional". Mint looks almost pleasant and almost Windows-like in appearance. In contrast, XCFE look like a clunky GUI from over a decade ago. Ho hum - I'm not going to make any further work for myself, so will have to swallow that.

I struggled with the install. I think this is because I used a 256GB UFD for the ISO file. Finally, having tried both Ventoy, Rufus and Etcher, I changed to a 16GB UFD and all was well. That was a couple more hours of my life I won't get back.

"New" (ie previously used) SSD:


Linux XCFE up and running finally:

Configuration challenges:
Having installed Linux (and LinuxCNC), the next challenge was to copy the various original config files over from the NAS (network drive), where I'd copied them. Naturally, the file manager that comes with XCFE is incomprehensively shite. Mapping a network drive in Mint was a piece of piss but XCFE's "Thunar" file manager boasts that it isn't really intended to be a network file manager. WTF? So you have to install the Gigolo app ("it just mounts what it is told to") and connect to the Samba (SMB) server in the NAS.

One suggestion on the LinuxCNC forum on how to do the update was to copy the Gmoccapy folder across into the new installation. Well that didn't work.

My approach is to try to create a functioning installation of Gmoccapy using the Pncconfig utility, then edit the resulting files by swapping out the relevant contents of the originals.

Naturally, the Pncconfig utility doesn't list my combination of Mesa boards (5125, 7i76 and 7i85). So although the 5i25 FPGA is flashed with the right bitfile, I can't select it from the Pncconfig utility. Consequently, I can't set up the HAL entries - or more precisely, I can't use the utility to configure them and generate the appropriate HAL file. Hopefully somebody on the forum will point me in the right direction.

Doubtless more to come....

No comments:

Post a Comment

LinuxCNC time again

Yes, call me a sadomasochist but the time has come for me to get involved in this again. The CNC Bantam sort of works but there are a few is...