G-code based simulation

G-code based simulation allows considering 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 images/download/thumbnails/95438228/G-code_RecCLD_Btn.png button on the toolbar, with the active <Simulation> tab.

Note: The button becomes unavailable if the multitask machining is used;


G-code based simulation parameters

G-code based simulation is formed on the basis on the selected postprocessor file and interpreter file specified on the <Machine setup> panel of the machine.

images/download/attachments/95438228/SettingPPandIPPFiles_Eng.png

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.):

images/download/attachments/95438228/InterpreterPreviewPane_Eng.png

The ability to select an interpreter from the container is supported. To do this, get a container with an interpreter. Then open the interpreter's selection window and go to the container folder.

images/download/attachments/95438228/SelectionOfContainerWithInterpreter_Eng.png

Enter the resulting container as a folder, select a simulation interpreter inside the container.

images/download/attachments/95438228/SelectingAnInterpreterInContainer_Eng.png

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 X.

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

Example:

<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 … />
</SCType>

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

Machine group

CNC system

Comment

Note

Milling

APT

Import toolpath only


Apt_Simplify_3D

Import toolpath only


ISO

Import toolpath only


Global control

Import toolpath only

An additional license is required

Fanuc 30i

To simulate and import a toolpath


Haas VF-2

To simulate and import a toolpath


Heidenhain iTNC 530

To simulate and import a toolpath


Mazatrol SmoothG

To simulate and import a toolpath

An additional license is required

NC210

To simulate and import a toolpath

An additional license is required

Sinumerik 840D

To simulate and import a toolpath


Tormach PCNC Mach3

To simulate and import a toolpath


Tormach PCNC PathPilot

To simulate and import a toolpath


Turning

Mazatrol SmoothC

To simulate and import a toolpath

An additional license is required

Turn-milling

Fanuc 21i

To simulate and import a toolpath

An additional license is required

NC220

To simulate and import a toolpath

An additional license is required

Sinumerik 840D

To simulate and import a toolpath


Okuma OSP-P300

To simulate and import a toolpath

An additional license is required

Robot

Fanuc robot (R-30iB controller)

To simulate and import a toolpath


Kuka robot

To simulate and import a toolpath


Motoman robot

To simulate and import a toolpath


ABB robot

To simulate and import a toolpath


Nachi robot (AW Format)

To simulate and import a toolpath

An additional license is required

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

"Import toolpath only" interpreters are 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)

images/download/attachments/95438921/G-code_Purpose_Eng.png

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.).

G-code based simulation features.

If the mode is enabled, then after the calculation of the toolpath SprutCAM X 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. NC program text for the selected operation is displayed at the bottom of the <Simulation> mode page, immediately after the list of operations of the technological process.

After a slight delay of the mouse pointer over the line with the NC program text, a popup hint shows a description of the associated nodes of the trajectory tree (cldata commands).

Note: The hint can be hidden by moving the mouse pointer slightly or pressing any key, such as [Esc] or one of the navigation keys for the text of the control program: [↓] or [↑].


To the left of the NC program text, there is a gutter for displaying auxiliary information. In addition to the number, the status of all the nodes of the trajectory tree associated with it is displayed for each line. The meanings of the displayed icons are similar to those used for CLData technology commands. Thus, it is possible to unambiguously identify the block of the NC program in which there are erroneous nodes of the tree of the trajectory. images/download/thumbnails/95438228/G-code_SimNextError_Btn.png and images/download/thumbnails/95438228/G-code_SimPrevError_Btn.png buttons move the selection in the NC-code between the errors.

images/download/attachments/95438228/G-code_Sample_Eng.png


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


See also:

Controlling simulation process

Selection of a machine and its parameters definition

Container manager

Creating your own interpreter