CNC G-Code Sender Software: Kcam4, Mach3, Alternatives Compared

Tom Garrett10 min read
Motion ControlOther ManufacturerTechnical Reference
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

Overview: The G-Code Sender's Role in a Small CNC Shop

A G-code sender (often called a motion controller, CNC driver, or machine interface) is the application that converts a text-based G-code program into real-time step and direction pulses, spindle commands, coolant outputs, and limit-switch monitoring for a CNC mill, router, lathe, or plasma cutter. In a one-person basement shop, a job shop with a single knee mill, or a prototyping lab, the sender is the piece of software that determines whether a CAM-posted program actually runs on the machine.

Small operators routinely evaluate G-code senders against three constraints:

  • Strict compatibility with the G-code dialect produced by their CAM tool or hand-written offline.
  • Native support for tool-length compensation and cutter-diameter compensation (cutter comp).
  • Hardware support for the existing motion controller (parallel port breakout board, USB motion controller, or industrial CNC like Fanuc).

This reference compares the senders most often considered by small-shop operators—Kcam4, Mach3/Mach4, and commercial CAM/controller packages such as GibbsCAM—and frames a selection path for the case where free software is no longer adequate.

Common Failure Modes with Kcam4 and Legacy Senders

Kcam4 is a long-running Windows CNC controller that became popular for hobby and light-commercial routers and mills driven off the PC's parallel (printer) port. Operators who migrate from Kcam4 frequently report the following symptoms when consuming G-code generated on a modern CAM system:

  • Trailing whitespace, line numbers, or BOM characters that were tolerated by older senders cause Kcam4 to misinterpret or skip blocks.
  • Modal commands (G90/G91, G20/G21, G54–G59 work offsets) left in default state behave differently than the CAM post assumes.
  • Tool-change codes (M6, T1, T2) and coolant codes (M7/M8/M9) that the CAM post emits as a matter of course are ignored or trigger a controller stop.
  • File transfer through removable media can introduce CRLF/LF mismatches or rename the file to a short DOS 8.3 form that breaks manual re-loads.
When Kcam4 shows "nothing like what was put in," the first diagnostic is not the sender—it is the file on disk. Re-save the file from the CAM post in plain ASCII, no line numbers, no comments, and verify with a hex editor (Notepad++ Hex plugin or xxd) that the file contains only ASCII printable characters plus CRLF terminators.

Tool Compensation (Cutter Comp) Implementation

Tool compensation is the single most-requested feature when an operator moves from hand-tuned conversational programming to CAM-driven work. Two distinct features are commonly conflated:

Feature G-Code Mnemonics Purpose
Tool-length compensation G43 H## (positive), G49 (cancel) Offsets the Z axis by the measured length of the current tool so multiple tools share one programmed Z zero.
Cutter-diameter compensation (cutter comp) G41 D## (left), G42 D## (right), G40 (cancel) Shifts the toolpath perpendicular to the programmed contour by the tool radius, allowing the same part program to run with different end mills.
Tool-length offset table Non-volatile tool table indexed by tool number Stores measured lengths and diameters for each tool number so the program references them symbolically.

Both Kcam4 and Mach3 implement G41/G42/G40 and G43/G49 when configured with an active tool table. The difference is in workflow: Kcam4 exposes the tool table through a single dialog, while Mach3 separates tool-table entries (Tools → Tool Table) from fixture offsets (Config → Fixtures). GibbsCAM handles compensation internally during toolpath simulation rather than relying on the controller's G41/G42 implementation, which can mask controller bugs but limits post-processor portability.

Software Comparison Matrix

Cutter Comp
Software License Motion Interface Best-Fit Use Case
Kcam4 Freeware Parallel port (LPT1/LPT2) Limited / G41-G42 with caveats Hobby routers, legacy parallel-port mills, conversational-only programs.
Mach3 Freeware (legacy), USD ~175 license Parallel port, USB motion controllers (SmoothStepper, PoKeys, ESS) Full G41/G42/G43/G49 with persistent tool table Small-shop mills and routers; the largest user community for parallel-port retrofit machines.
Mach4 Commercial, USD ~200 plus plugin Plugin-based motion controllers only Full cutter comp; plugin-dependent New builds; multi-axis machines; shops wanting long-term support.
GibbsCAM Commercial, quote-based Post-processes for Fanuc, Siemens, Heidenhain, Mach, LinuxCNC Internal CAM compensation + post processor passes G41/G42/G43 Production job shops that want CAM + verified post in one package.
LinuxCNC Open source Parallel port, Mesa Ethernet cards, Pico Systems Full cutter comp with interpreter-level tool table Linux users, custom hardware, motion-control research.
Fanuc MANUAL GUIDE i / conversational OEM option on Fanuc controllers Direct on Fanuc 0i/30i/31i/32i Native cutter comp Operators already on a Fanuc-controlled machine who want a conversational front-end.

Mach3/Mach4 Setup Considerations

Mach3 is the most common destination for operators leaving Kcam4 because it accepts the same parallel-port breakout boards and shares the same step/direction signalling. The setup pain reported by users new to Mach3 is concentrated in five areas:

  1. Driver installation order. The Mach3 parallel-port driver must be installed before any Windows update overwrites the LPT1 resource. On 64-bit Windows, the legacy driver requires the "Mach3 Driver Signing" step documented on MachSupport.
  2. Kernel frequency. Mach3's pulse engine runs at a configurable kernel rate (typically 25 kHz, 45 kHz, or 100 kHz). A kernel rate that exceeds the stepper driver's maximum pulse rate produces missed steps. Start at 25 kHz and only increase after validating stepper performance with a dial indicator.
  3. Pins and ports mapping. Each output (Step Pin#, Dir Pin#, Active Low) must be entered for every axis and every input (limits, home, probe). Mis-wired enable pins are the single most common cause of "the motor just sits there" complaints.
  4. Motor tuning. Velocity (steps/sec) and acceleration (steps/sec²) are derived from the leadscrew pitch, microstepping, and desired rapids. A useful field formula: steps_per_mm = motor_steps_per_rev × microsteps / leadscrew_pitch_mm. Velocity in mm/min equals steps_per_mm × steps_per_sec × 60.
  5. Tool table population. Tool length must be measured with a probe or paper-shim method and entered into the tool table, not hard-coded as a G43 H## value in the program, otherwise every tool change requires a program edit.
The Mach3 Yahoo user group referenced by long-time operators is the historical knowledge base. As of the Mach4 transition, the active community moved to the MachSupport forum—use the forum index rather than a Yahoo archive for current issues.

Parallel Port Controller Hardware Notes

The parallel port (IEEE 1284) became the de-facto hobby CNC interface because it provides 8 data, 4 control, and 5 status lines driven directly from the PC, with sub-microsecond latency on legacy hardware. Modern UEFI-class desktops and laptops no longer expose parallel ports, so most parallel-port retrofits in 2025 use:

  • PCI or PCIe parallel-port add-in cards (recognized in Mach3 as LPT1–LPT4).
  • External USB-to-parallel adapters based on the MosChip MCS7715 chipset (recognized inconsistently).
  • External motion controllers that emulate the parallel-port protocol over USB or Ethernet (SmoothStepper, ESS, PoKeys57CNC).
Interface Typical Max Step Rate EMI Susceptibility Notes
Native LPT on PCI card 100 kHz at 25 kHz kernel Moderate (5 m cable limit) Lowest latency, deterministic.
USB motion controller (ESS) 1 MHz+ Low Offloads pulse generation from the PC.
Ethernet motion controller (Mesa 7i76E) 10 MHz field I/O Very low Industry-grade, no PC timing dependency.

If a parallel-port retrofit must be replaced because no LPT is available, a Mesa Ethernet card or an Ethernet SmoothStepper preserves the existing breakout board while moving pulse generation off the PC, eliminating the kernel-frequency jitter that limits Mach3 step rates.

Fanuc Controller Integration

Operators who own an industrial machine with a native Fanuc 0i-MF, 30i-B, or 31i-MB controller can skip the PC-sender problem entirely: the Fanuc controller reads ISO/RS-274 G-code natively with built-in cutter compensation. Three integration points matter when CAM-posted code is sent to a Fanuc:

  • Post processor. Fanuc controllers expect specific address formats: T01 M06 for tool call, G43 H01 Z0.1 for tool-length offset call, and M08/M09 for coolant. A post that emits T1 M6 (no leading zero) will trigger Fanuc alarm PS0011 on some controls.
  • Conversational front-ends. Fanuc MANUAL GUIDE i and MANUAL GUIDE 0i are OEM options that provide a conversational programming environment on the same HMI—useful for one-off parts without leaving the controller.
  • DNC mode. For programs exceeding Fanuc's memory (typically 1 MB on 0i-MF), DNC mode streams G-code from a connected PC over RS-232 or Ethernet (FOCAS). Buffer-handshake is Xon/Xoff or DC1–DC4 by default; configure the post and the controller to match.

Selection Criteria and Cost Analysis

For a single-operator small business, the decision typically reduces to four numbers: software license cost, machine downtime during migration, CAM-to-controller post processor availability, and whether tool-table data can be carried forward. A structured selection matrix:

Criterion Weight Kcam4 Mach3 Mach4 GibbsCAM
License cost High Free USD ~175 USD ~200+ USD 5,000–15,000+
Post processor library High None (manual) Broad (community) Broad (vendor) Vendor-maintained
Tool comp (G41/G42) High Limited Full Full CAM + controller
Community support Medium Stagnant Very large Growing Vendor direct
Multi-axis (4/5) Medium No Limited add-ons Yes (plugins) Yes (option)
Industrial controller support Low No No No Yes (Fanuc, Siemens, Heidenhain)

The cost inflection point for a basement shop moving from Kcam4 to commercial CAM is usually around USD 175 (Mach3 license) when CAM is already in place (Fusion 360 personal use, FreeCAD, EstlCAM, or similar). If the CAM side also needs upgrading—because the post processor cannot be configured to a specific controller without a paid post library—GibbsCAM's value comes from bundling CAM + post + simulation rather than from any single feature.

Migration Path from Kcam4

  1. Inventory programs. Catalog the Kcam4 program directory; flag any that use Kcam-specific extensions (proprietary subroutines, M-codes beyond M30, conversational-only operations).
  2. Identify the motion controller hardware. Record the breakout-board model (Xylotex, HobbyCNC, TB6560, Gecko G540, etc.) and verify it is supported by the target sender's plugin/driver list.
  3. Re-post the CAM programs. Export the CAD part to a modern CAM tool and post to the new sender's dialect (Mach3 .tap, LinuxCNC .ngc, Fanuc standard).
  4. Set up the new sender in dry-run mode. Disable spindle and coolant outputs and run each migrated program at 5 % rapid override while monitoring position with a DRO.
  5. Calibrate tool table. Touch off each tool, enter length and diameter offsets, and verify G43/G49 with a known reference part.
  6. Cut air and cut wax. Run the first three jobs in soft material before scheduling a production run.

Verification Checklist

  • G-code file passes an ASCII/CRLF audit in a hex editor.
  • Work offset (G54) is set and verified with an edge finder before running the first part.
  • Tool-length offset applied via G43 H##, not hard-coded Z values.
  • Cutter-diameter compensation engages and disengages outside the part on a lead-in/lead-out move (never inside a corner).
  • Coolant, spindle CW/CCW, and tool-change codes match the post processor documentation for the target controller.
  • Emergency-stop and limit-switch wiring verified before powering stepper drivers.
  • First cut dimensionally inspected with calipers or a CMM before releasing the program to production.

Frequently Asked Questions

Why does Kcam4 ignore lines from CAM-posted G-code?

The most common cause is non-ASCII characters (BOM, smart quotes, em dashes) or line numbers formatted with a leading character Kcam4 cannot parse. Re-save the file as plain ASCII with CRLF terminators and strip comments before re-loading. Verify with a hex editor.

Does Mach3 support cutter-diameter compensation (G41/G42)?

Yes. Mach3 implements G41 (left) and G42 (right) with a tool table that holds diameter in the D offset column. Enter each tool's measured diameter, then call G41 D## or G42 D## on a lead-in move longer than the tool radius to avoid compensation alarms.

Can a Fanuc controller read CAM-posted G-code directly?

Yes—Fanuc 0i/30i/31i controllers are native RS-274 interpreters with built-in cutter compensation. Use a Fanuc-compatible post processor that emits T## M06 with leading zeros and G43 H## for tool-length offset, and verify with a dry run before committing to production.

What is the minimum Mach3 kernel frequency for a typical hobby mill?

Start at 25 kHz. This produces reliable step pulses to most breakout boards and avoids missed-step issues seen at 45–100 kHz with marginal stepper drivers. Increase only after validating stepper performance with a dial indicator over a 100 mm move.

When is GibbsCAM worth the cost over Mach3?

GibbsCAM pays back when the shop needs production CAM features (2.5D pocketing, 3+2 axis positioning, lathe-mill combination) with a verified post for the controller, or when the cost of CAM post re-writes exceeds the license. For one-off prototype parts with a 3-axis mill, Mach3 plus a free CAM post is usually sufficient.

Back to blog