CNC Simulator Pro is FANUC‑inspired and aims to be compatible with the most common G‑code conventions. In the real world, controllers (Haas, FANUC, Siemens, Mazak, Heidenhain, Okuma, etc.) differ on details like canned cycles, arc formats, radius compensation, and macros. That’s why a program made for one control may look different or fail to parse in another—simulators included.
Important: We don’t guarantee 1:1 compatibility with any specific brand/model. Treat the simulator as a teaching and verification tool using common, FANUC‑like syntax.
Common reasons the simulation looks “off”
Units mismatch: Program in inch (
G20
) vs simulator in mm (G21
) or vice versa.Work offset differences: Using
G54–G59
,G92
shifts, or local shifts that weren’t set the same in the simulator.Arc format mismatch: Your program uses R for arcs while the simulator/project expects I J (K) centers (or the other way around). Also check arc plane (
G17/G18/G19
).Radius compensation (G41/G42/G40): Missing/too‑short lead‑in/lead‑out, wrong
D
register, or cutter bigger than the path allows.Canned cycles variants: Drilling/peck/tap cycles (
G81–G89
) differ across brands; parameters (P, Q, R) and semantics vary.Modal state assumptions:
G90/G91
,G94/G95
,G98/G99
,G40/41/42
not set explicitly at program start.Comment/numbering syntax: Parentheses vs semicolons; very long lines; unusual line numbers.
Unsupported features/macros: OEM macros, variables, probing cycles, or custom M‑codes may be ignored or error out.
Quick fixes (most issues)
Set a clean preamble/preset in your program (before tool motion):
O1000 G17 G21 (or G20) G40 G49 G80 G90 G54
Make arcs match the project setting: choose IJK or R consistently. Keep arc planes explicit.
Tidy radius comp: Add a clear lead‑in long enough for your tool and turn off with
G40
before retracts/rapids.Normalize canned cycles: If your control uses a special variant, convert the cycle to longhand moves as a quick test. If longhand simulates fine, the issue is the cycle syntax/semantics.
Verify units & offsets: Ensure the simulator’s units and the program’s
G20/G21
andG54–G59
usage match.Remove control‑specific extras: Temporarily strip macros, probing, and custom M‑codes to isolate geometry/toolpath problems.
If you get a parser/runtime error
Read the exact line in the message; it usually names the problematic block.
Check for mixed absolute/incremental modes, malformed decimals, or parameters missing from a canned cycle.
Convert the failing section to explicit linear moves and re‑try; if it runs, the original shorthand (cycle, arc style, comp) is the culprit.
Make your code more “FANUC‑like” (good baseline)
Use parentheses for comments:
(TOOL 1 Ø6 FINISH)
Prefer
I J (K)
arc centers with explicit plane (G17/G18/G19
).Start programs with a stable preamble and end with coolant/spindle off and
M30
.For drilling, stick to common patterns (e.g.,
G81 Z-... R... F...
), or expand to longhand.
Example — safe cutter comp pattern
(T1 D6 FINISH) T1 M06 G17 G21 G40 G49 G80 G90 G54 S3000 M03 G00 X0 Y-20 Z5 G43 H1 Z5 M08 G01 Z0 F200 G01 G41 D1 X0 Y0 F300 (lead-in, left-comp) ... contour ... G01 G40 X0 Y-20 (lead-out, cancel comp) G00 Z50 M09 M30
Safety reminder
Always verify tool lengths, work offsets, and units. A path that looks fine in any simulator can still be dangerous on a real machine if setup differs. Use single‑block, feed‑hold, and dry runs when proving new programs.
Send us a minimal example and we’ll help
Email support@cncsimulator.com with a small project that shows the problem:
Subject: Sim mismatch/error – minimal example
Controller brand/model: <e.g., Haas VF-2, FANUC 0i-MF>
Units and arc style: <G21 / G20 | IJK / R>
Exact error (if any): <copy/paste or screenshot>
Files: 1) The CNC program (trimmed to the smallest failing section) 2) A screenshot of what you expect (if available)
We’ll point out the specific line(s) to change, or show how to set up the project so it