Press "Enter" to skip to content

Tag: Linux

Setting up a CNC Mill and Lathe Part 1

One of the key factors to getting my AUV project underway was converting my mill and lathe to CNC, something I’ve been meaning to do for a while. After much research, I settled on the Gecko¬†540 and some decent steppers and put in a parts order.

With those parts en-route, I talked getting LinuxCNC running on a machine from 2006 — An AMD 64 X2 3800+ based computer, with a Radeon X850 video card. Initially trying the latest and greatest LinuxCNC, I got atrocious latency results. I ended up trying out old releases, starting with 8.04 (Hardy Heron was a flash from the past!) up to 12.04 and settled on 10.04 as the best compromise in terms of latency performance vs new distro. After a lot of painstaking work, I finally got good latency results:

Final Latency Test Results
Final Latency Test Results

It ended up being a bit of a paint to tweak everything just right to minimize latency spikes and in the end, I think I’ve actually made my BIOS inaccessible with a USB Keyboard, so next time I want to get into it I’ll need to scrounge up an old PS2 keyboard… To get this relic of a computer running reliably, I ended up having to:

  • Install of the 10.04 ISO and then update the LinuxCNC install to 2.6
  • Turn off _everything_ in the BIOS, or at least set it to manual (e.g. overclocking, power savings)
  • Modify Grub to pass “acpi=disable isolcpu=1” plus the additional options in the next link
  • Applying the IRQ tweaks listed here¬†(This dropped the regular latency by an order of magnitude!)
  • Still using the stock open-source Radeon driver — Vesa improved the “resting” latency by a factor of 2, but when running glxgears it popped back to the same range.

The frustrating part is that I still experience large spikes when opening Firefox or other applications while 2x glxgears are running, I suspect due to some HDD access issue. Either way, I’m not planning on using this machine for anything else while machining, so hopefully I won’t run into problems with that. Without opening large programs and running 2x glxgears, I’m getting a latency of about 5000ns — Not too bad!

 

 

 

Leave a Comment