A debugging method
- Reproduce: find the smallest CAM operation that shows the problem.
- Locate: identify the exact NC block that alarms or moves wrongly.
- Compare: check the block against the controller manual.
- Trace: find the post logic that produced the block.
- Fix and retest: re-post the whole test set to avoid side effects.
Common problems and solutions
| Symptom | Likely cause | Solution |
|---|---|---|
| Arc end point alarm | Rounding, wrong IJK mode (absolute vs incremental), wrong plane | Match controller arc mode; increase precision; output G17/18/19 correctly |
| Tool plunges into part | Missing or wrong G43 H value | Tie H to tool number or length offset register reliably |
| Rotary axis spins 360° unexpectedly | Poor wrap-around or limit logic | Implement shortest-path and controlled rewind logic |
| Cycle alarm on drilling | Missing parameters, wrong R-plane or G98/G99 | Output cycle per controller format |
| Dimensions 1000× too small | Missing decimal points | Always output decimal point, or match controller setting |
| Coolant or clamps not activating | Wrong MTB M-codes | Use machine M-code list from the builder |
| Wrong position after tilted plane | Tilt / TCP mode mismatch or kinematic error | Verify pivot distances and TCP/tilt mode output |
Example: arc mode mismatch
(Post outputs absolute arc centres)
G02 X20. Y0. I10. J0.
(Controller expects incremental IJK: alarm or wrong arc)
(Fixed: incremental from start point)
G02 X20. Y0. I5. J0.
Useful debugging aids
- Post debug output (verbose comments showing values and events).
- File comparison tools between good and bad outputs.
- G-code machine simulation to see exactly where motion goes wrong.
- Controller alarm documentation and parameter manuals.
Never fix a post problem by editing the NC file only. Fix the post, or the problem returns next time.
Need a post debugged?
See our CNC post processor development service and common causes of incorrect G-code.