How Does Galil CNC Software Handle a G-Code Interface?

Patricia Callen5 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

The G-code file loads, yet the machine does not move, follows the wrong path, or produces motion that disagrees with the display. Galil Motion's CNC software places the G-code interface within its own control offering instead of depending on a third-party CNC layer. That changes who supplies the interface, but it does not remove the need to prove every stage from program parsing through position feedback.

Look at the trend first. Record commanded position, actual position, axis state, and drive-enable state before changing tuning or program data. Treat controller model, software build, licensed functions, and accepted G-code dialect as installation data; read them from the installed software, controller identification, and product documentation.

What signal path must be proven first?

A CNC move crosses several functional boundaries: the software reads the G-code, interprets modal state and coordinates, plans a trajectory, sends axis commands, and monitors feedback. The final element is the motor-and-drive system. A correct program can still fail when the selected coordinate system, enable chain, axis scaling, or feedback polarity is wrong.

Signal Source Wrong-value symptom
Programmed coordinates and feed request G-code program Preview and planned endpoint are wrong before motion starts
Interpreted target position CNC parser and modal state Unexpected absolute, incremental, offset, or unit behavior
Commanded axis position Trajectory planner No command change, discontinuous command, or an unexpected axis participates
Drive command and enable Motion controller output and machine permissives Position command changes while the motor remains disabled or stationary
Actual axis position Encoder or other position feedback Following error, wrong direction, unstable motion, or incorrect displayed position

Capture these values on the same time base. Comparing values from separate runs can hide sequencing faults and makes a transient inhibit look like a motion-planning error.

Does the G-code become the intended target?

Start with the program while motion is inhibited. Read the parsed endpoint or software preview, then compare it with the programmed endpoint. Check the active work offset, machine offset, tool compensation, coordinate mode, plane selection, and unit mode shown by the software. Their identifiers and supported forms depend on the installed G-code dialect, so use the interface's own status display rather than assuming another CNC's conventions apply.

If the parsed target is wrong, stop at the CNC layer. Reduce the program to one unambiguous move, remove optional compensation, establish a known coordinate origin, and recheck the target. If the reduced move parses correctly, restore modal operations one at a time until the target changes incorrectly. If the target is correct, proceed to the commanded-position check; editing motor tuning cannot correct a parser or coordinate-state error.

Does the trajectory planner issue an axis command?

Run the reduced move with the machine in a controlled commissioning state and trend commanded position. A changing command proves that parsing reached the trajectory stage. A stationary command means the move is still blocked inside the CNC or motion layer; inspect program state, hold state, axis readiness, limit state, and required machine permissives shown by the software.

When the command changes, compare its sign, endpoint, and participating axes with the intended move. A correct endpoint with an unexpected profile points toward feed interpretation, path blending, or trajectory configuration. An incorrect sign or axis association points toward coordinate mapping or axis assignment. Do not move to servo tuning until the command itself is correct.

Does the final element receive and execute the command?

Next, compare commanded position with actual position and observe the drive-enable state. If commanded position changes while actual position remains fixed, trace the enable chain through controller state, interlocks, drive readiness, and the physical command connection. The controller can plan motion correctly while the drive rejects the command or remains inhibited.

If actual position moves in the opposite direction, stop motion and correct the command/feedback direction relationship using the documented configuration for the installed hardware. Reversing wires or configuration values without identifying which signal is wrong can create positive feedback. Tuning does not fix wiring.

If actual position follows but the travel distance is wrong, measure physical displacement and compare it with commanded displacement. Inspect axis scaling, encoder interpretation, transmission ratio, and engineering-unit conversion. Change only the value tied to the measured ratio; compensation should not be used to conceal a basic scale error.

Does feedback explain the remaining symptom?

When commanded and actual positions initially agree but separate during acceleration, reversal, or load change, inspect following error alongside command velocity, actual velocity, drive status, and load conditions. A repeatable error at one mechanical position suggests friction, binding, load change, or feedback integrity. An error that grows with speed suggests a response, command-limit, or scaling problem.

Check feedback at rest before adjusting gains. A noisy or drifting actual-position value with no commanded motion identifies a feedback, grounding, shielding, or mechanical coupling problem. Correct that fault first. Tune only after direction, scaling, enable behavior, and feedback stability are proven.

How should the resolving branch be implemented and verified?

  1. Save the current program, controller configuration, CNC settings, and drive settings through the supported backup method.
  2. Inhibit production motion and create a reduced G-code test containing one controlled axis move with a known start and endpoint.
  3. Record the interpreted target, commanded position, actual position, axis state, enable state, and drive status on one trend.
  4. Correct the first stage where the value departs from expectation: program or modal state, trajectory state, enable chain, axis mapping, scaling, feedback, or final-element response.
  5. Repeat the same test without changing any other setting. Confirm correct direction, endpoint, displacement, and stable actual position at rest.
  6. Add the remaining axes and modal functions one at a time. Recheck coordinated path geometry before returning the full production program.
  7. Run the production path under controlled conditions and compare commanded and actual motion through starts, reversals, and load changes. Archive the corrected settings and verification trend.

A successful repair produces the correct parsed endpoint, a continuous command profile, an enabled final element, and actual position that tracks the command without unexplained direction or scale error. Repeatability across several identical runs distinguishes a resolved configuration fault from an intermittent connection or mechanical problem.

FAQ

What happens if Galil CNC software accepts G-code but no axis moves?

Trend commanded position and drive enable during a reduced move. A stationary command directs the check toward program state, holds, limits, or permissives; a changing command with no actual motion directs it toward the enable chain, drive readiness, wiring, or final element.

What happens if the displayed path is right but the machine path is wrong?

Compare commanded and actual position by axis. Correct axis assignment, direction, scaling, feedback, or mechanical transmission according to the first measured mismatch; do not compensate for those faults by editing the G-code path.

What happens if the software and feedback checks still disagree?

Stop commissioning when direction is unsafe, feedback becomes unstable, drive status cannot be cleared, or the installed software and controller functions cannot be identified. Capture the reduced G-code file, controller and software identification, configuration backup, status messages, and synchronized trend. Escalate to Galil Motion through its official support channel with that diagnostic package.

Back to blog