G-code based program simulation

In G-code based simulation mode, two more stages are added to the calculation of the operation, in addition to the forming of the tool path:

  • generating of the NC-code along the generated tool path;

  • interpretation of the NC program into the secondary (restored from the NC-code) tool path.

Machining simulation uses a secondary (restored) tool path.


Generating the NC program along the primary tool path

NC-code is generated using the postprocessor selected for the machine. During post-processing, the postprocessor mode service variable <WorkingMode> takes the value 1.


Interpretation of the NC-code

By interpretation, we will understand the process of converting the text of a control program, its words and blocks, into technological CLDATA commands, that form the tool path. In the process of interpreting SprutCAM X, using the interpreter selected for the machine:

  • sequentially read the blocks of the NC;

  • using the register information received from the interpreter, selects words (or semantic constructions) from the NC-code's blocks or offers the interpreter to select words independently;

  • passes the words to the interpreter in the order they are in the block;

  • the interpreter, taking into account the features of the machine, converts the words of the NC program into CLDATA technological commands, which form the restored tool path.

The description of the interpreter is given in the section Interpreter structure.

The interaction of SprutCAM X with the interpreter to obtain a secondary (restored) tool path is described in detail in the section G-code based program interpretation.