ElectronIxAUTOMATION
Machine stopped on a PLC fault? Send the alarm or a photo — the first diagnosis is free. Free PLC support →
LINUXCNC RETROFIT

LinuxCNC retrofit to replace an obsolete CNC control on a sound machine

A LinuxCNC retrofit puts a PC running real-time Linux, a Mesa card or EtherCAT I/O, and a new panel in place of a dead or unsupported control. Your castings, slideways, ball screws and spindle stay. We do the wiring, the HAL configuration, the tool changer logic and the operator screen, and hand over the files.

When a LinuxCNC retrofit is the right choice

It is the right choice when the iron is sound and the control is the problem: a dead or obsolete controller, no spares, nobody left who can repair it. It also suits machines that no catalogue control fits — converted manual machines, routers, odd axis layouts — and jobs that need custom cycles, probing or extra I/O. The software is open source, licensed under the GPL, so a CNC controller retrofit is mostly hardware and engineering. As a LinuxCNC integrator in India, we choose the hardware, wire it, configure it and commission it.

When a Fanuc or Siemens control, or a new machine, is better

  • Your people and programs are Fanuc. If operators are trained on it and programs lean on custom macros, a Fanuc control keeps all of that. On LinuxCNC they must be rewritten and re-learned.
  • You feed every machine from one DNC PC. ElectronIx DNC sends programs to Fanuc controls, so a Fanuc retrofit joins that setup directly.
  • You want a vendor to phone. LinuxCNC has none. Support is us, or any integrator who can read the files we hand over.
  • The mechanics are worn out. No control fixes worn ball screws or a loose spindle. That is a repair or a new machine, and we say so after the inspection.

For Fanuc, Siemens 828D or Fagor 8055i controls, see CNC retrofit. It is the same inspection first, whichever control you end up with.

What LinuxCNC is

LinuxCNC is open source control software for milling machines, lathes and other machine tools. It runs on Linux with real-time extensions, reads standard RS-274 G-code, and includes a software PLC that is programmed in ladder.

A LinuxCNC controller has two parts. The PC does the thinking: G-code, motion planning and the screen. A Mesa card does the fast work — step and direction generators, encoder counters and I/O, running in an FPGA — and talks to LinuxCNC through the hostmot2 driver, over PCI, Ethernet, SPI or EPP. If the PC stops updating the card, its watchdog disconnects the card's I/O pins.

Where the drives are EtherCAT, the drives and I/O can go over EtherCAT instead. That driver is a separate project, not part of core LinuxCNC, so we use it only where the drives call for it. The LinuxCNC documentation warns that on some PCs the real-time setup may not give good enough latency, and provides a latency test. We run that test on the PC we propose.

What we reuse and what we replace

Usually keptCastings, slideways, ball screws, spindle and bearings, if they inspect sound. Servo motors and drives that take step/direction or an analog command, and encoders the new card can read.
ReplacedThe old controller; the PC, Mesa card and breakout boards; the I/O; the operator panel and pendant; and the wiring, with a new panel designed and drawn. The old wiring is removed, not reused.
Decided at inspectionDrives that can only talk to their old control, which are usually replaced, and the spindle drive, whose speed command can be 0–10 V, PWM or Modbus.

How the machine is set up

A LinuxCNC machine is an INI file plus HAL files. HAL joins software components through pins and signals. A wizard such as PnCconf gives a starting point for a Mesa machine; the machine's own logic goes in HAL files of its own, because the wizard overwrites what it generated.

  • Axes. Speed, acceleration and following-error limits are set per joint. The servo loop is tuned with Halscope, the software oscilloscope, and backlash or a compensation file is added.
  • Homing. Search and latch speeds, index pulse, home offset and the homing order are per-joint settings, chosen so the axes home in a safe order.
  • Spindle. LinuxCNC has pins for speed command, forward and reverse, and at-speed. Spindle encoder feedback gives rigid tapping, and spindle orient (M19) needs a quadrature encoder.
  • Tool changer. LinuxCNC leaves the changer to the integrator: M6 makes the request, and HAL logic — ClassicLadder if needed — moves the changer and reports it done. The sequence and its interlocks are tested slowly before a real tool goes in.
  • Operator screen. AXIS has a live preview and backplot. Gmoccapy is designed for touch screens. QtDragon is a Qt screen meant mainly for 3/4-axis mills and routers. We choose by who runs the machine, and wire the pendant, buttons and lamps through HAL.
  • Safety. Emergency stop and guard interlocks are hard-wired in the panel and do not depend on the PC. LinuxCNC takes them in on its e-stop pins.

G-code: what stays and what the operator notices

LinuxCNC runs standard RS-274 G-code: drilling, peck, tapping and boring cycles (G73, G81 to G86, G89), rigid tapping and, on lathes, threading and roughing cycles. It accepts a % line at the start and end of a program, and supports Fanuc-style O-numbered programs with M98 and M99 for compatibility. It is still not a Fanuc, and some things will differ:

  • A Fanuc-style subprogram must come after its M98 call, in the same file. It returns no values, and parameters #1 to #30 are global.
  • Custom macro calls (G65) are not in LinuxCNC's G-code list. Macros become o-word subroutines with named parameters.
  • There are nine work offsets, G54 to G59.3. Fanuc's extra G54.1 Pn offsets are not there.
  • Lathe roughing cycles G71 and G72 take the profile from a numbered subroutine, so a program that carries its profile inline needs editing.
  • The G87 and G88 boring cycles are listed but not implemented.

Before handover we run your own typical programs on the machine and list the lines that need editing.

How a LinuxCNC retrofit runs

  1. STEP 01
    Inspect
    You send the make, model, current control and photos. We check the mechanics first, and say whether LinuxCNC or a Fanuc or Siemens control suits.
  2. STEP 02
    Scope and quote
    A written scope: axes, drives kept, spindle, tool changer, screen, downtime and budget range. We reply within one working day.
  3. STEP 03
    Prepare off the machine
    The HAL and INI files are built and tested on a bench PC, and the panel is built, before the old control comes out.
  4. STEP 04
    Install
    Old control and wiring out, new panel in, every I/O point checked one by one before a drive is powered.
  5. STEP 05
    Commission
    Axes tuned and compensated; homing, spindle and tool changer proven; your programs run as an air cut; then acceptance cutting.
  6. STEP 06
    Hand over
    Operator training, the HAL and INI files, a backup of the working configuration, the wiring drawings and the I/O list.

What we need from you, and what you get

You send

  • Make, model and year of the machine, and its current control.
  • Photos of the machine, its nameplate and its electrical panel.
  • Make and model of the servo drives, motors and spindle drive, from their nameplates.
  • What is failing, and what you want after: axes, spindle, tool changer, probe.
  • A few typical programs, including any that use macros.

You get

  • A machine running on LinuxCNC, with homing, spindle and tool changer proven.
  • The HAL and INI files, the wiring drawings and the I/O list, handed over as standard, like every machine we build. The files are plain text, so another integrator can read and change them.
  • A free first concept for the change: what it involves, how long the machine will be down, and a budget range. Your drawings are used only for that, and we sign an NDA first if you send one.
Have a machine with a dead control?

Send the make, model, current control and a few photos of the machine and its panel. We will tell you whether it is worth retrofitting, and whether LinuxCNC is the right control for it.

LinuxCNC retrofit questions

Is LinuxCNC reliable enough for a production machine?

It can be, when the PC is chosen and tested for the job. LinuxCNC needs a real-time kernel, and its documentation warns that some hardware does not give good enough latency, so it provides a latency test. We run that test on the PC we propose, leave the step and encoder work to a Mesa card, and keep a backup of the working configuration.

What does a LinuxCNC retrofit cost?

The software is open source, so the cost is the PC and Mesa card, any new drives, the panel and the engineering. It depends mostly on the number of axes and on the spindle and tool changer. Send the make, model and photos; the quotation follows the inspection.

Will our Fanuc programs run on LinuxCNC?

Plain G-code — moves, arcs, drilling and tapping cycles — is standard RS-274 and runs. Programs that use custom macros (G65), extra work offsets, subprogram calls to other programs or Fanuc lathe cycles need editing, and we list every line that does before handover.

Can the existing servo motors and drives be kept?

Often, if the drives take step/direction or an analog command and the encoders suit the new card. Drives that only talk to their original control over a proprietary link usually cannot be driven by LinuxCNC and are replaced. We decide at the inspection, from the nameplates.

Who supports the machine afterwards?

LinuxCNC has no single vendor to phone. You have us, and because the configuration is handed over as plain text files, you can also use any other LinuxCNC integrator. That is the trade against a Fanuc or Siemens service contract, and it matters more to some shops than to others.

Does a LinuxCNC machine work with ElectronIx DNC?

No. ElectronIx DNC sends programs to Fanuc controls; it does not drive a LinuxCNC machine. If one DNC PC feeding every machine in the shop matters to you, that favours a Fanuc retrofit.

Ask about a LinuxCNC retrofit
Machine make and model, the current control, and what is going wrong with it.
Your details are used only to reply to this enquiry. Drawings you send stay with us.

Have a job that a machine should be doing?

Send the part and the target output. You get a concept, a sequence and a budget range back — free, and with no obligation to build it with us.