About the NCPlayer Service:
File Menu
Edit Menu
View Menu
Formatting Menu
Tools Menu
Machine Configuration Menu
Collaboration

Supported Codes and Parser Capabilities


The Supported Codes and Parser Capabilities section describes the full functionality of the G-code interpreter in NCPlayer, including supported command formats, modal groups, macro programming, arithmetic, conditions, loops, and advanced functions. The parser is designed to work with FANUC-style programs (specifically 0i-MB) but is also compatible with other controllers when properly configured.

1. Supported G/M Code Formats

  • G-codes:
    • Standard modal groups:
      • G0 — rapid positioning.
      • G1 — linear interpolation.
      • G2 / G3 — circular interpolation CW/CCW with support for:
        • R parameter (arc radius).
        • I, J, K parameters (arc center in ABS or INC mode).
        • G17, G18, G19 planes.
      • G17 / G18 / G19 — plane selection.
      • G20 / G21 — unit selection (inch/mm).
      • G40 / G41 / G42 — cutter radius compensation.
      • G43 / G44 — tool length compensation.
      • G49 — cancel tool length compensation.
      • G54 – G59 — work coordinate systems (including extended G54.1 Px).
      • G90 / G91 — absolute / incremental mode.
      • G98 / G99 — return in drilling cycles (initial point / R-plane).
    • Drilling cycles: G73, G74, G76, G80, G81, G82, G83 with support for X, Y, Z, R, Q, F parameters.
    • Special codes: G65 (custom macro simple call with arguments).
  • M-codes:
    • Spindle control: M3, M4, M5.
    • Coolant control: M7, M8, M9.
    • Program stops: M0, M1, M2, M30.
    • Subprogram handling: M98 (call), M99 (return).

2. Macro Programming Support

  • Local variables: #1 – #33 (reset on M99 if the parameter is enabled).
  • Common variables: #100 – #199.
  • Global variables: #500 – #531.
  • System variables: according to FANUC (e.g., #5001 for current X position).
  • Mathematical operations:
    • Addition, subtraction, multiplication, division, exponentiation.
    • Parentheses precedence and nested calculations.
  • FANUC functions:
    • SIN, COS, TAN, ASIN, ACOS, ATAN.
    • ABS, ROUND, FIX, FUP, MOD, SQRT.
    • Support for nested functions, e.g., SIN[FIX[#100+0.4]].
  • Address substitution in commands: X[#500], F[#101+10], etc.

3. Logical Constructs

  • IF [condition] GOTO Nxxx — jump to line number.
  • IF [condition] THEN ... — execute command if condition is true.
  • Logical operators: AND, OR, XOR (nested conditions up to 3 levels).
  • Comparisons: EQ, NE, GT, LT, GE, LE.
  • WHILE [condition] DOx ... ENDx — conditional loops.
  • Loop counters and infinite loop protection.

4. Subprograms

  • Subprogram definition: Oxxxx.
  • Call: M98 Pxxxx Lnn — with L argument support.
  • Return: M99 (with local variable reset if the parameter is enabled).
  • Support for G65 Pxxxx with argument passing (A, B, C... H, I, etc.) directly into local variables.
  • Recursive calls with stack depth control.

5. Other Features

  • Support for both absolute (G90) and incremental (G91) modes within the same program.
  • Automatic code normalization: spacing alignment, removal of extra EOBs, correct comment handling.
  • Direct arc format conversion:
    • R → IJK (ABS or INC mode).
    • IJK → R.
  • Parsing with pre-substitution of variables before simulation.
  • Inline expansion of subprograms for full toolpath simulation.
Note: The NCPlayer parser is continuously evolving. Future versions will expand support for controller-specific codes for Syntec, Siemens, and others.
NCPlayer - Supported Codes and Parser Features
CNCPassport © MEBLEOS © 2026 · Ver 1.0 · Terms & Conditions | Privacy Policy | Cookie Policy | Refund Policy Legal information | Privacy Policy