NCXchange – the neutral NC code intermediate format
NCXchange (NCX) is a domain-specific language serving as a neutral, vendor-independent intermediate format for NC code across different CNC controls.
NCXchange (NCX for short) is a domain-specific language that serves as a neutral intermediate format for NC code. Instead of translating NC programs directly from one control dialect into another, the code is first converted into the vendor-independent NCX format – and from there into the dialect of the target control.
As a universal exchange format, NCX enables conversion between the formats of different controls (e.g. Heidenhain, Fanuc, Siemens), the development of analysis functions, and integration into other software applications.
NCX is still under active development; the specification and scope of the language may change. Anyone who wants to contribute to the specification or join the discussion is welcome on the project page on GitHub.
The Definition describes the grammar of the language, the Specification documents all language elements, and the Examples show how Fanuc G-code maps to NCX.
Definition
The grammar of the NCX language in Backus-Naur form: how NC programs are built from blocks and cells consisting of function, address and value.
Specification
All elements of the NCX language at a glance: keywords, addresses, values, examples and G-code equivalents – from PROGRAM to FEEDRATE_TYPE and COMM.
Examples
Conversion examples from Fanuc G-code to NCX: arcs with G2 and G3, drilling cycles G81 to G85, and length and radius compensation with G43 and G41.