G-code based simulation

G-code based simulation allows to consider features of the implementation of the postprocessor in the simulation processing. In this mode, the system automatically generates NC code for each operation while calculating. Controlling simulation is performed as Controlling simulation process.

G-code based simulation function activation.

Activating of the function is carried out by pressing button on the toolbar, with the active <Simulation> tab.

Note: The button is getting available under the following conditions:

The interpreter is a CNC machine system settings file (* .snci), located in the directory $(PROGRAM_PERSONAL)\Interpreters.

During the selection process, a preview of the interpreter information is available (description, purpose, CNC system, authors, etc.):

Setting the postprocessor and interpreter "default" in the kinematic scheme of the machine

You can specify the "default" name of the postprocessor file and interpreter file in the kinematic scheme of the machine. To do this, add the SPPFile, SNCIFile tags with links to the corresponding files to the machine XML file, and restart SprutCAM.

Now, when selecting a machine in SprutCAM, the postprocessor and the interpreter will be already set, and their values are obtained from the kinematic scheme. If necessary, from the SprutCAM UI, you can override the postprocessor and interpreter values for the current project.


<SCType ID="Fanuc 30i" Caption=""Fanuc 30i" type=""Fanuc30i" Enabled="true">
<... other tags ... />
<SPPFile DefaultValue="$(PROGRAM_PERSONAL)\Postprocessors\Mill\Fanuc (30i)_Mill.sppx"/>
<SNCIFile DefaultValue="$(PROGRAM_PERSONAL)\Interpreters\Mill\Fanuc (30i)_Mill.snci"/> 
<... other tags ... />

Currently, interpreters of the following CNC systems are available for use:

Machine groupCNC system
Fanuc 30i
Haas VF-2
Heidenhain iTNC 530
Sinumerik 840D
Tormach PCNC Mach3
Turn-millingSinumerik 840D
RobotFanuc robot (R-30iB controller)

Note: All interpreters support command list generated by postprocessors in SprutCAM distribution kit only.

For APT is not supported matching line NC code - trajectory of tool movement.

When you select an interpreter, pay attention to its purpose (the Purpose field in the Preview pane)

The selected interpreter should be intended for simulation. Otherwise, the trajectory of the tool may be incorrect (shifted relative to the coordinate system of the workpiece, duplicated approaches/retracts, incorrect starting position, etc.).

NC simulation features.

If the mode is enabled, then after the calculation of the toolpath SprutCAM  automatically generates a control program for CNC machine with pre-selected postprocessor settings file, perform the conversion of the NC code program text into the toolpath. The generated path will take into account the peculiarities of the implementation of the postprocessor.

On the <Simulation> tab text of the NC code for the selected operation will be displayed.

and buttons move the selection in the NC-code between the errors.

Support for third-party interpreters.

Supported third-party interpreters for modeling the text of the NC code. The file of interpreter settings (* .snci) should contain a link to the program library, which is used to interpret the NC code. The page Creating your own interpreter describes the process of creating of your own interpreter: settings file and application programming interface (API).

G-code based simulation demo video

 Watch demo video

See also:

Controlling simulation process