CNC Simulator Profesional
CNC Simulator Profesional
CNC Simulator Profesional
You can also pan and zoom using the keyboard. Page Up and Page Down keys let you
zoom in and out, and the arrow keys let you pan the 3D view.
Controlling the simulation
Use the Simulation control buttons to control your simulation.
From the left:
Play – Used to start the simulation. It is also used to resume the simulation after a
pause.
Pause – Used to pause the simulation.
Stop – Used to stop the simulation.
Fast forward – Used to simulate at high speed (limited only by your computer
hardware).
Step – Used to advance through the CNC program step by step.
These functions can also be reached from the Simulate menu. There you will also find
additional functions:
Simulate from cursor - Used to start the simulation from anywhere in the CNC
program.
Quick simulate - Used to simulate at maximum possible speed. The CNC code in the
editor will be hidden.
Quick Simulate to next tool - Executes a quick simulation to the next tool change.
Fast Backplotting - Only creates tool paths. Usefull when working with very large CNC
programs.
Ignore Axis Limit Check - Special function that makes the simulator ignore axis limits.
Please note the keyboard shortcut keys (F5, F6, etc.) can be used instead of clicking on
the buttons or in the menu.
On the virtual CNC controller, there are also buttons that can be used to control the
simulation.
2. Pause simulation
There are several ways you can pause the simulation.
The first and most obvious way is to click on the pause button during the simulation.
There is also something called Pause Points. They are small green dots, in the left
margin of the CNC editor, used to make the simulator pause. You create (or delete)
them by clicking on the margin in front of the line you want to pause at.
The simulation will pause at each green dot and you can continue by clicking Play, Step
or Fast Forward.
Another way, maybe less obvious, is to use M01 (Optional stop). It will only pause the
simulation if the “Op. Stop” switch is activated on the virtual CNC controller.
3. Controlling the Speed of the simulation
You can simulate in various speeds. The maximum simulation speed is decided by your
hardware. A modern dedicated graphics card will speed up your simulation a lot.
Please note that simulation speed has nothing to do with real machine time. A part that
may take an hour to make in the real machine can take 10 seconds in the simulator
depending on your speed setting and your hardware. So, what affects the simulation
speed?
First of all, you have simulation speed controllers in the view panel and in the virtual
CNC controller.
They are connected so if you change one, the other will follow. As you can see, we call
the round knob in the virtual CNC controller “Feed override %” but it is actually a
simulation speed controller. For fastest simulation speed, drag the slider to the top or
turn the knob to 100%.
Another thing that affects the simulation speed is the quality setting. If you suffer from
slow simulations, try to adjust the "Solid buffer resolution" setting in the program
settings.
A lower quality setting will give you faster simulations.
To simulate at maximum speed , use the Fast Forward button in combination with a low
quality setting. For maximum quality simulation at more realistic speed, use a higher
quality setting and adjust the simulation speed slider to your liking. We highly
recommend getting a good graphics card for best simulation performance. Even an
older and cheaper card will make a huge difference if your computer has slow built-in
graphics capabilities.
4. Virtual Machines
A virtual machine file has the extension .cmachine and contains all the graphics and
logic for the machine. There are several virtual machines to choose from in the different
machine folders. You open a new machine by selecting Load Machine from the File
menu or by clicking the open machine button .
Each machine has its own settings and limits. Some of them you can change under the
Machine tab in Settings. If the limits of the machines do not fit your needs, you can
always use the special none graphic machines called UnlimitedMill, UnlimitedLathe,
HeidenUnlimited, and UnlimitedCutter. They are not actually unlimited but each axis
goes from -50,000 to 50,000 (inches or millimeters).
5. File Browsers
When opening CNC files, machines, and SimCam files, a special kind of file browser will
be shown. The browser has file preview capabilities. For example, when you want to
open a CNC file, you can click on it to see a simplified preview of the tool paths.
The file browser has some buttons that can be helpful when dealing with files and
folders.
The star button in the top right corner lets you save the current folder as a favorite. This
makes it quick and easy to return to a folder you use often.
The button to the left of the favorites button lets you select the way files and folders are
presented in the dialog.
Under the preview panel, there is an information panel. When, for example, you are
browsing for machines and you are selecting one, you will see information before you
opening it.
We recommend that you spend a moment to familiarize yourself with the file browser as
it can be very helpful when you are looking for files in your storage.
6. View buttons
Using the view buttons below the 3D simulation screen, you can select what parts you
want to see as well as cut into workpieces. Note that you can turn on and off parts as
well as zoom, pan, rotate, and cut during the simulation.
To open the view panel, click on the button with the glasses.
On the left side of the panel, you can select what parts you want to see during and after
simulation. On the right side, you can select the workpiece style. The styles get their
look from the materials you have defined in the Inventory Browser. You will also find the
simulation speed controller on the right side of the panel. Use it to control the speed of
the simulation.
Note about machine limits: You can select to show the machine limits. They are
defined in each machine file. If your CNC program tries to go outside these limits the
simulator will alarm.
Using the button with the knife icon, you can open the workpiece cutting panel. Use the
sliders to cut the part from any side to see its interior.
Solid simulation has some limitations: First note that using non flat milling tools will
create a much more complex surface, hence using up more computing power. For
faster solid simulations, use flat tip tools. Also, note that cutting can only be done from
the tip of the tool all the way up in Z. That limitation will be obvious if you try to cut a slot
in the side of a workpiece with a disk mill. The disk will act as if it was a flat end mill with
the diameter of the disk. This is true as long as you have the 2.5 solid buffer selected in
settings. If you are using the more advanced (and hence slower) full 3D buffer, side cuts
will be correctly shown. For more information see: Settings
The buffer containing the solid part has a limited resolution. If you zoom in too much the
workpiece will look rough. This is a compromise we did to not slow down the simulation
too much.
Also, note that if you set up more than one workpiece on the table, only the first one can
be viewed as solid. Another compromise to not overload the computer.
7. Code coloring
The CNC Editor will automatically color things that it recognizes. For example, all
recognized G-codes will be colored blue and all M-codes will be colored dark red, etc.
Special CNCSimulator Pro $-commands are colored gray, comments are cyan and
strings show up as lime-green.
Please note that very large programs, such as those used for 3D Printing, will not be
colored as it would slow down the editor.
8. Programming help pop-ups
As the user writes CNC codes in the editor, pop-ups will be shown to assist coding. For
example, typing a G will show a list of available G-codes.
If you know what to write, you can just ignore the pop-up list and continue typing.
When you type a G-code that is on the list (recognized by the CNCSimulator Pro
interpreter), it will show a help tooltip window explaining the code.
You can also navigate up and down the list pressing the arrow keys on the keyboard.
Another way of selecting a code in the list is by clicking on it with the mouse to preview
its tooltip.
If you press Enter or Tab on the keyboard when a code is selected, it will be inserted in
the editor at the cursor location.
Besides G-codes, you can do the same with M-codes, $-codes and tools.
A list will also pop-up when you type the special CNCSimulator Pro-commands
$AddRegPart and $AddEmbeddedRegPart letting you select from a list of available
workpieces.
When you want to use a workpiece offset (G54-G59) the editor will help you by showing
the workpieces offset values after the code.
The whole idea behind the intelligent editor is to help the user be able to quickly find the
codes he/she wants to use.
Another way of assisting the programmer is by showing the tooltips while the mouse
hovers over a recognized code. Below, we have parked the mouse pointer over the M98
code.
For beginners, we strongly suggest opening our demonstration samples and then using
this function to figure out what codes are used and their function.
9. Code regions
The special editor codes #region and #endregion are used to create collapsible regions
in the text. For example, SimCam will always output these commands for the initial
simulator special commands so that they could be easily hidden during a simulation.
If you click the little minus (-) sign in front of the #region command, the region will
collapse and be hidden.
Clicking the plus (+) sign in front of the three dots will expand the region.
Also, you can hover the mouse cursor over the three dots to see a preview of the region
without expanding it.
10. Pause points
Pause points are small green dots in the editor margin that are used to make a pause
during the simulation. You add (or delete) a pause point by clicking on the margin in
front of the block where you want a pause.
To resume the simulation after it has reached a pause point, click on the play button,
the fast forward button, or the single-step button.
First of all, we need to set millimeters as units and load an appropriate machine for our project.
From the main menu, select Settings and click on Settings.
Ensure that you have millimeters selected as this tutorial is made in millimeters.
Click OK to close the settings dialog.
Click File – Load Machine from the main menu or click the open machine button .
Double-click on the Milling folder.
In the dialog that shows, please deselect Open demo. Then click on the Milling Center
machine. Click the Open button.
Fine, now let's get started by defining our workpiece. Press F2 on the keyboard to open the
Inventory Browser.
Click on the Mill Workpieces tab at the top of the dialog.
Click on the green plus button to add a new workpiece.
In the Workpiece Name field, enter a name for your new workpiece. Let's call it “Tutorial1”.
Enter X, Y and Z size as: 100, 100 and 20.
Take a mental note of the workpiece index number. Here we did not have any workpieces before
in the registry, hence the index number became 1. In your case, the number could be different.
See the red arrow.
Ignore the rest of the settings and click OK to close the Inventory Browser.
Now we need to call up our new workpiece from the program. We do that by using the command
$AddRegPart, followed by the workpiece index number (we use 1) and the table displacement
values.
You can also click the button to automatically insert the command at the
cursor in the editor.
We are going to put our new workpiece 30 millimeters from the machine zero in both X and Y.
The machine zero is placed near the lower left corner of the machine table and it is marked by a
cross symbol.
To call up our workpiece number one (or your index number if different) on X30 Y30 from the
machine zero, we write ($AddRegPart 1, 30, 30)
Now you can go ahead and click on the play button (simulation start) to see that your
workpiece shows up on the table.
In the lower toolbar, click this button to zoom in on the machine table.
At this moment, note that you can click on the simulation window with the left mouse button and
drag the mouse around to rotate the view. If you click with the right mouse button and drag, you
will pan the view. Also, please note that you can roll the mouse wheel to zoom in and out.
OK, let's get started with the actual CNC program!
As we moved the workpiece in on the machine table and away from the machine zero, our lower
left corner on the workpiece now is at X30 Y30. That is not very practical, so let's move the
programming zero point to X30 Y30 Z20. This will result in a zero point at the top of the (Z)
lower left corner (XY) of the workpiece.
We move the programming zero point by using the G-code G92. (This can also be done from a
zero point registry using G54 to G59, but that is out of the scope of this tutorial.)
Type G92 X30 Y30 Z20 in the editor.
Click on the play button again and note how the zero point moves to the corner of your
workpiece.
Now we need tools to mill the 10 mm wide slot and drill holes with the diameter of 10 mm.
Again, press F2 on the keyboard, to open the Inventory Browser (or select Settings – Inventory
Browser from the main menu).
In this tutorial we assume you have no previous custom made tools, if you do, please add these
two new tools at the end of your list and use the tool index you get.
Select My milling tools and click on the button with the green plus icon, the Add button.
First, we will add the tool to mill the slot. Select a flat tool tip, enter 10 as diameter and 50 as
length. Enter the name of the tool “Tutorial1 flat mill”. Ignore all other settings and click OK.
In our case, this new tool will get tool index number 1 (take note of yours).
Now we repeat the procedure adding the drilling tool. Click the Add button again.
This time, select a pointed tool tip and enter diameter 10, length 50 and tip angle 80 degrees.
Name it “Tutorial1 drill”. Click OK.
Click on the OK button to close the Tool Browser.
Congratulations! Now we have a workpiece and tools and can start programming the rest of our
part.
To call up our new milling tool, we use T1 (or your tool index number) followed by M06 to tell
the virtual machine to go to its tool change position and execute the tool change.
T1 M06
Next, let us move the tool to the start position. We have decided to use the lower left corner of
the slot as the start where we will drill down into the material.
We use G-code G00 to move with rapid speed to the position stopping 2 mm over the workpiece.
G00 X15 Y15 Z2
Now, press play to verify that the positioning works.
We now enter the G-code G01 for feed movement down to the cutting depth. We also need to
start the spindle (M03) and set the Feed rate (F) and spindle RPM (S).
G01 Z-5 F250 S2000 M03
Now we will move the mill to the start-point of the arc. There is no need to type G01 in this
block as the code is modal, meaning it will remember the G01 code from the previous block
(“block” = line).
Y70
From now on, feel free to click the play button at any time to check the simulation.
Next, let's program the clockwise arc movement. To do so, we use the G02 code, followed by the
X/Y coordinates of the endpoint and the I/J coordinates of the relative center point (I stands for
incremental distance from starting point to center in X, and J is the same in Y).
G02 X30 Y85 I15 J0
Great! Let's enter the rest of the blocks to finish the slot.
G01 X85
Y15
X15
How about that? We are back to where we started. Let's go up in Z to a safe position and then
change tool for the drilling operation.
G00 Z2
T2 M06
Make sure you use your tool index after T for the drilling tool we created.
Now we can come back from the tool change position and put the drill over the first hole.
G00 X30 Y30 Z2
Next, we will start a drill cycle. We only need to start it and then it will drill on each position we
program until we tell it to stop. For this, we use a common drilling canned cycle G-code called
G81. We tell the cycle to drill to a total depth of 15 mm and a start depth of 1 mm above the
workpiece. As we have changed tool, we need to start the spindle again (M03). This time, let us
also use coolant water (M08) to not overheat the tool.
G81 Z-15 R1 M03 M08
Now we can just position over each hole center and the drilling will start automatically.
Y70
X70
Y30
Next we need to end the drilling cycle using the G80 code.
G80
Finally, we go up in Z and write M30 to end the program.
Z50
M30
Congratulations! You have created your first CNC program in the famous CNCSimulator Pro
software!
The complete program:
$AddRegPart 1, 30, 30
G92 X30 Y30 Z20
T1 M06
G00 X15 Y15 Z2
G01 Z-5 F250 S2000 M03
Y70
G02 X30 Y85 I15 J0
G01 X85
Y15
X15
G00 Z2
T2 M06
G00 X30 Y30 Z2
G81 Z-15 R1 M03 M08
Y70
X70
Y30
G80
Z50
M30
12. Tutorial 2 Turning
The purpose of this tutorial is to teach the basic concepts of how to use CNCSimulator Pro
turning. We are going to make a very simple part, taking a few rough cuts, fine cuts, and drill a
hole.
This is the part we are going to make:
This tutorial is made in millimeters so the first thing we have to do is to ensure we have
millimeters set as units in the program settings. Click Settings – Settings from the main menu.
While we are at it, set all other settings like in the picture above. Click OK.
Now what we have to do is to load a machine for the project. Click on the Open Machine button
to show the Select Machine dialog. You can also click File – Load Machine from the main
menu.
Double-click the Turning folder.
Uncheck the Open demo checkbox and click on the Turning Center machine, then click the
Open button.
This is how your CNCSimulator Pro window should look like now.
OK, now we need to create a workpiece for your project. Press F2 to open the Inventory Browser
where we keep all our tools, workpieces, materials, and offsets.
Click the Lathe Workpieces tab.
If you have not previously created any workpieces, this is what you will see.
Click on the Add button to add a new workpiece.
Enter 50 for diameter, 100 for length, the name for the workpiece, and ignore all other settings.
As you can see on the blue bar below the workpiece picture, our index for this workpiece is one.
Yours might be another index if you already had workpieces stored.
OK, great! Now, let's start writing the CNC program!
We start with a special CNCSimulator Pro command to put the workpiece we just created in the
chuck. It is called $AddRegPart. You can either type in the command by hand, followed by the
index number for the workpiece, or take a shortcut by clicking the Insert at cursor button. This
button will automatically put the command in the editor.
Put the cursor at the end of the first line and press enter. This is to ensure that the next command
we insert will end up on a new line.
Type in $AddRegPart 1 or click "Insert at cursor".
The next step is to select a tool to use for our rough cuts.
Press F2 again to open the Inventory Browser. This time we are going to stay on the first page
(Tools). Click on the Embedded lathe tools option.
We are going to use one of the fixed embedded tools that come with the CNCSimulator Pro.
Actually, we are going to use the first one, so you could just go ahead and click the Insert at
cursor button again.
This is what you should have in the editor at the moment:
Normally, to select a tool, you use only the code letter T but as this is an embedded tool, we use
ET as in “Embedded Tool”. If you create your own tools later, you will use only T for tool
selections.
Note that ET is a simulator specific code and it is not used in real machines.
Besides selecting the tool, we need to execute the actual tool change by putting the code M06
after the tool selection. Note, when you press M (or G or any other recognized code), a list of
available codes will pop-up.
Either, type 6 or select M06 from the list by using the mouse or the arrow keys on the keyboard.
OK, by now we are all set to start cutting the workpiece.
Click the Reset View button to zoom in on the workpiece.
Zoom in a bit further by clicking on the 3D view and roll the mouse wheel away from you.
Click the Start Simulation button to execute the commands we have entered so far.
Now, this is what the 3D view should look like:
As you can see, the workpiece that we made and the tool we selected, are in place.
Let's move the tool in position for the first rough cut by using the G00 code.
Important! CNCSimulator Pro does automatically put the zero point at the right plane of the
jaws. The distance from the plane to the spindle is 23 millimeters. That means that the right end
of our 100 mm long workpiece is at (100-23) 77, in the Z-axis. This rule goes for all lathes in
CNCSimulator Pro. Always take the 23 millimeters into account!
We want to take away 10 millimeters from the diameter per cut (5 mm material), so we should
put the tool on X40 as our initial diameter is 50. Let us also put the tool on Z 80, so we have
some space (3 mm) between the tool and the workpiece end plane.
Type G00 X40 Z80 and press Enter.
Fine, now let's take the first actual cut.
Type G01 Z50 F250 S1000 M04 M08 and press Enter.
If you move the mouse over the codes in the block above, you will see tooltip windows
explaining what they do.
OK, now we back out the tool a bit before going with fast traverse back to Z80.
Type X44 Z52 and press Enter.
Note that we did not have to write G01 again as it is already activated. The code is modal.
To help us see clearly how the tool moves, we can turn on the toolpath display. Click on the
glasses button and check the Feeds and Fast Traverses checkboxes.
Now if you simulate, you will see feed movements (G01-G03) in green and fast traverses (G00)
in red.
We continue by going back to 80 in the Z-axis with fast traverse.
Type G00 Z80 and press Enter.
We then go down to diameter 30.
Type X30 and press Enter.
Type G01 Z60 and press Enter.
Again, we back off a little.
Type X34 Z62 and press Enter.
Now, we need another tool for the fine cut. Press F2 to open the inventory browser again, then
select Embedded lathe tools and click the blue right arrow to go to the second tool.
Click the Insert at cursor button.
Without pressing Enter, write M06 to execute the tool change, then press Enter.
After a tool change, the tool is at the tool change position of the machine and we need to go back
to the workpiece.
Type G00 X28 Z80 and press Enter.
Enter the following blocks to finish the fine cut:
G01 Z59
X38
Z49
X45
X50 Z45
This is how your program should look by now:
Back off again as we did earlier.
Type X54 Z47 and press Enter.
Time to select a drilling tool to drill the hole.
Press F2 on the keyboard, click Embedded lathe tools and browse to tool number 17 (drill
diameter 10 mm).
Click the Insert at cursor button.
Enter M06 and press Enter.
We will now take the tool back from the tool change position and place it in the center of the
workpiece.
Type G00 X0 Z80 and press Enter.
We are going to use a canned drilling cycle to make the hole.
Type G81 Z60 R78 and press Enter.
Type G00 X100 Z200 and press Enter.
Type M30 to end the program and press Enter.
Excellent! We are done. Simulate the program and then click the cutting (knife) button.
Check the Show inside checkbox.
The final program:
13. Find and Replace
To open the Find and Replace dialog, press CTRL – F on the keyboard or select Edit –
Find and Replace from the main menu.
To simply search and locate a text, type it in the "Find what" textbox and click the Find
Next button.
There are three Find options that you can select as well.
Mach case – if this option is checked, the search function will only find the text with the
exact same case. For example, if you write “G90” in the box, the text “g90” will not be
found.
Match whole word – if this option is checked, the search function will only find whole
words that match your search string. For example, if you enter “G9”, the code “G90” will
not be found.
Search hidden text – if this option is checked, the search will include collapsed
regions.
In addition to finding text in the CNC program, you can replace it too. Click on the
Replace tab at the top of the dialog to show the replace page.
Enter the text you want to search for and the replace text. To replace single instances of
the text, click on the Find Next button followed by the Replace button.
To replace all instances of the search word, click on the Replace All button.
14. Automatic block numbering
To open the block numbering dialog, press CTRL – B on the keyboard or select Edit –
Block Numbers from the main menu.
To add (or renumber) block numbers to your program, check the Block Numbers
option.
Enter Start Number, Increment and click OK.
If you delete or add blocks to your program, you may want to recreate the block
numbering. Just repeat the steps above to do so.
You can just as easily take away the block numbers by opening the Block Numbers
dialog and deselect the Block Numbers option and click OK.
Normally, there is no need to change the format option but if you want them in another
format than the default format, it could be done by entering formatting codes (See String
Formatting Codes).
15. Comments in code
There are two ways to make comments in the CNC programs. The most common one is
to put the comments inside parentheses.
CNC codes inside the parentheses will be ignored by the CNCSimulator Pro interpreter
but it is important to note that CNCSimulator Pro specific $-commands will not be
ignored.
Another type of comment is the semicolon comment. It is commonly used to comment
out whole sections of blocks.
To comment out several blocks, select them in the editor (on the keyboard, hold down
shift and press the up and down arrows to select or drag the mouse holding down the
left mouse button).
To uncomment blocks, select them as above and click Uncomment selection from the
Edit menu.
16. Create CNC Headers
You can insert a header in your CNC program by using the "Create CNC Header"
function. To open the Create CNC Header dialog, click Tools – Create CNC Header
from the main menu.
Fill out the fields with the information you want in the header and click OK.
The header will be automatically created for you.
17. G-codes
These are the default standard codes used by default by our virtual machines. Please
note that customized machines may have other codes and formats. The following tables
will give a brief overview of the various G, M, and other codes recognized by the
CNCSimulator Pro interpreter. In the Format column, you will see the format expected
by the program. If a code is written within brackets like this [X#], it means that the code
is optional and can be omitted if not needed. The # sign means that CNCSimulator Pro
expects a number and the $ sign means that it is expecting a text string within quotation
marks.
Let's show an example:
G12[X#][Y#]Z# R# Q# S# SA# AS# RA# H#
This means that the code G12 accepts X and Y coordinates but they are not obligatory
and can be omitted. On the other hand, you must specify the Z,R,Q,S,SA,AS,RA, and H
codes to avoid an alarm at runtime.
G-code Explanation Format Example Machine type
G00 Go rapidly (with G00 [X#][Y#][Z#] G00 Z100 All machines
maximum traverse rate)
to the X/Y/Z position.
This code is used for
positioning and not for
actual machining.
G01 Travel in a straight line G01 [X#][Y#][Z#] G01 X2.5 All machines
using the programmed [F#] Y4.1 F200
feed rate (F). This code
is used for machining.
G02 Circular/Helical G02[X#][Y#][Z#] G02 X10 All machines
XY-machines Interpolation clockwise. It [I#][J#][K#][R#][F#] Y10 I10 J0
causes a clockwise F200
circular movement at the
programmed feed rate
(F). The motion can be 2-
dimensional (flat) or 3-
dimensional (helical).
The default plane of the
Lathe circular movement is the
XY-plane (G17) but other
planes can be used as
well (see G17-G19). The
center of the arc or circle
is programmed using the
I, J and K letters (R can
also be used).
G03 Exactly like G02 but the G03[X#][Y#][Z#] G03 X10 All machines
XY-machines circular motion is going [I#][J#][K#][R#][F#] Y10 I10 J0
counterclockwise. F200
Lathe
G41 Activates left side cutter G41[D#][P#] G41 All machines
compensation (or nose More info except the 3D
radius compensation in a Printer
lathe).
G42 Activates right side cutter G42[D#][P#] G42 All machines
compensation (or nose More info except the 3D
radius compensation in a Printer
lathe).
18. M-codes
These are the default standard codes used by default by our virtual machines. Please
note that customized machines may have other codes and formats.
M-code Explanation Format Example Machine type
M97 and M98 Call subprogram. Use M98 P# L# M98 P1000 All machines
P for subprogram L1
number and L for the More info
number of repetitions.
M99 Return from a macro, M99 M99 All machines
subroutine or More info
subprogram.
19. G71 Rough Turning Cycle and G70 Finishing Cycle
Let's start with G71. This cycle is programmed using two blocks.
Example:
N10 G71 U2 R1
N20 G71 P8 Q9 U0.4 W0
The parameters of the first block are:
U: The depth of cut during the cycle.
R: The retraction height for each completed cut.
The parameters of the second block are:
P: Start block number for the contour.
Q: End block number for the contour.
U: Finishing allowance in the X-axis.
W: Finishing allowance in the Z-axis.
If you load the turning center machine and then open the demo files, there is an
example called: Sample3_G70_G71_units.CNC that you can try to see the cycle in
action.
The G70 block at the end of the example is the Finishing Cycle. It simply repeats the
blocks used in the G71 cycle but instead of doing rough cuts it does a contour cut
removing the material left from the finishing allowances. Only horizontal cutting
operations (internal and external) are supported.
Simulator CNC
$AddRegPart 1
ET1 M06
G00 X60. Z90.
G01 Z78. M03 M08 S1000 F200
G71 U1.0 R.10
G71 P100 Q200 U0.1 W0.02 F.2
N100 G00 X20.
G01 G42 X18. Z77. F0.2
X20. Z75.
Z57.
X40. Z47.
Z25.
G02 X50. Z20. R5.
G01 X60. Z10.
N200 G40 X70. Z90.
G70 P100 Q200
M05
M30
$AddRegPart 1
T1 M06
G00 X60. Z 90.
G01 X60. Z78. M03 S1000 F200
G71 U1.0 R1.0
G71 P100 Q200 U 0.1 W0.1 F200
N100 G00 X20.
G01 G42 X18. Z77. F200
X20.Z75.
X20.Z57.
X40. Z.47.
Z25.
G02 X50. Z20. R5.
G01 X60. Z10.
N200 G40 X70. Z90.
G70 P100 Q200
T15 M06
G01 X0. Z80. F200
G81 X0. Z40. F50
G01 X0. Z90. F200
M05
M30
20. G75 Grooving cycle
This cycle cuts internal or external grooves. The cycle is programmed using a two block
format.
The parameter for the first block is:
R: Retract amount. The distance to retract for each peck.
The parameters for the second block are:
X: End position for the groove in the X-axis.
Z: End position in the Z-axis.
P: Peck depth for each cut in the X-axis (thousands).
Q: Stepping in the Z-axis (thousands).
$AddRegPart 2
ET1 M06
G00X90. Z165.
G01 X80. Z163. M03 M08 S1000 F200
G71 U1.0 R.20
G71 P100 Q200 U0.1 W0.02 F.2
N100 G00 X80. Z163.
G01 x40. Z163.
G01 X44. Z161.
G01 X44. Z133.
G01 X38. Z130.
G01 X38. Z123.
G02 X44. Z120. R3.
G01 X70. Z93.
G01 X70. Z63.
G01 X80.Z33.
N200 G40 G00 X81.Z164.
G70 P100 Q200
G00 X81. Z166.
M05
M30
Threads can be done externally or internally with this two block threading canned cycle.
Here is a brief explanation of the cycle and its parameters.
$AddRegPart 2
ET1 M06
G00X90. Z165.
G01 X80. Z163. M03 M08 S1000 F200
G71 U1.0 R.20
G71 P100 Q200 U0.1 W0.02 F.2
N100 G00 X80. Z163.
G01 x40. Z163.
G01 X44. Z161.
G01 X44. Z133.
G01 X38. Z130.
G01 X38. Z123.
G02 X44. Z120. R3.
G01 X70. Z93.
G01 X70. Z63.
G01 X80.Z33.
N200 G40 G00 X81.Z164.
G70 P100 Q200
G00 X81. Z166.
M05
ET25 M06
G97 S600 M03
G00 X44. Z163.
N40 G76 P010060 Q100 R100
N50 G76 X41. Z131. P100 Q200 F1.5
G00 X81. Z165.
M30
I have posted about Fanuc G75 Grooving Cycle. The Fanuc G75 grooving cycle has
multiple parameters, which can be set according to your needs. In this post here is a
cnc program example for the G75 Fanuc grooving cycle. Although it is a simple cnc
program example for grooving, but this cnc program can be easily altered to your
needs.
The fanuc G75 grooving cycle is briefly described in this article Fanuc G75 Grooving
Cycle, so here is the cnc program example and some explanation of the cnc program.
CNC Programming Example of Fanuc G75 Grooving Cycle
Contents
Explanation of Parameters of Fanuc G75 Grooving Cycle
G75 Canned Cycle Grooving CNC Programming Example
Explanation of Parameters of Fanuc G75 Grooving Cycle
N10 G75 R
N20 G75 X Z P Q R
G75 First CNC Programming Block
R = Return amount
G75 Second CNC Programming Block
X = Groove Depth.
Z = Last groove position in z-axis.
P = Peck increment in x-axis
Q = Stepping in z-axis.
R = Relief amount at end of the cut.
G75 Blok Pemrograman CNC Pertama
R = Jumlah pengembalian
G75 Blok Pemrograman CNC Kedua
X = Kedalaman Alur.
Z = Posisi alur terakhir pada sumbu z.
P = Peck increment dalam sumbu x
Q = Menginjak sumbu z.
R = Jumlah bantuan di akhir pemotongan.
Q : Depth of normal cut ( these values are given in hundreds, so the depth of cut will be
0.1 ).
R : Depth of Last or Finish cut
Second block of the G76 Threading cycle
G76 : G code of the threading cycle.
X : The end value in x-axis.
Z : The end value in z-axis.
P : Thread depth ( as radius value ).
Q : Depth of first cut.
F : Thread Pitch
R : Thread Taper
$AddRegPart 2
ET1 M06
G00X90. Z165.
G01 X80. Z163. M03 M08 S1000 F200
G71 U1.0 R.20
G71 P100 Q200 U0.1 W0.05 F.5
N100 G41 G00 X80. Z163.
G01 x40. Z163.
G01 X42. Z162.
G01 X42. Z133.
G01 X39.5 Z130.
G01 X39.5 Z123.
G02 X45.5 Z120. R3.
G01 X70. Z93.
G01 X70. Z63.
G01 X80. Z33.
N200 G40 G00 X81. Z164.
G70 P100 Q200
G00 X81. Z166.
M05
T25 M06
G97 S1000 M03
G00 X42. Z164.
N40 G76 P010060 Q100 R100
N50 G76 X40.161 Z131. P0.75 Q200 F1.5
G00 X81. Z165.
M05
ET8 M06
G00 X71. Z80.
G97 S400 M03
G75 R2
G75 X60. Z60. P1000 Q1500 R0 F0.1
G00 X85. Z170.
ET15 M06
G97 S1500 M03
G00 X0.0 Z167
G81 X0.0 Z125. F100 R300
G01 X0.0 Z170. F200
T16 M06
G97 S1500 M03
G00 X0.0 Z167
N40 G74 R1
N50 G74 Z124. Q300 F0.1
G01 X0.0 Z170. F200
T19 M06
G97 S1500 M03
G00 X0.0 Z167
N40 G74 R1
N50 G74 Z120. Q300 F0.1
G01 X0.0 Z170. F200
T11 M06
G00 X18. Z165. S2000 M03
G01 X18. Z163. F100
G01 X18. Z163. F200
G01 X20. Z163. F200
G01 X19. Z160. F200
G01 X19. Z133. F100
G01 X20. Z130. F100
G01 X18. Z 132. F200
G00 X18. Z167.
T13 M06
G00 X18. Z168.
G01 X18. Z130.
G01 X22. Z130. S700 F50
G01 X18. Z130. S1000 F100
G01 X18. Z128.
G01 X22. Z128. S700 F50
G01 X18. Z128. F200
G01 X18. Z170. S100 F300
T26 M06
G97 S1000 M03
G00 X19. Z165.
N40 G76 P010060 Q100 R100
N50 G76 X20.839 Z130. P0.75 Q200 F1.5
G00 X81. Z165.
T9 M06
G00 X81. Z24.
G97 S400 M03
G75 R2
G75 X40. Z20.P1000 Q1500 R0 F0.1
G00 X85. Z170.
M30
These are the default standard codes used by default by our virtual machines. Please
note that customized machines may have other codes and formats.
The $-commands are special simulation commands for controlling the various aspects
of the simulation. They have nothing to do with CNC codes and should not be
transferred to a real CNC controller. $-commands can be put within parenthesis and
will still be read by the simulator. Blocks of $-commands can be hidden from the CNC
code by encapsulating them in a region making the block collapsible.
Do you notice the little - (minus) sign before the region command at the first line? If
you click it, the region will be collapsed hiding the block of $-commands.
A collapsed region will show three dots and a + (plus) sign. If you click the plus sign,
the region will expand.
You can see what a collapsed region hides without expanding it by hovering the
mouse pointer over it.
When you open a CNC program from the disk, it always loads with its regions
collapsed.
In the following table, we list and give a brief explanation of all built-in $-commands.
Please note that many of them are not for common use but rather made for special
use in examples or when creating portable programs. We have colored the
commands you will likely use in red. If you are not an advanced user that wants to
learn all aspects of CNCSimulator Pro, you can skip over the commands colored in
black. Not even all red commands are a must to know. As a minimum, you have to
know the $AddRegPart command as you will need it to place workpieces on the table
(or in the chuck). If you are a 3D Printer only user, you can ignore the $-commands.
$-command Explanation Format Example Machi
ne
type
$AddRegPart Puts a workpiece $AddRegPart # [#] $AddRegPart 1 30 All
from the user- [#][#] 30 machi
defined nes
workpiece except
registry in the the 3D
Inventory Printer
Browser (F2) on
the machine
table (or in the
chuck). The first
number is the
registry index for
the workpiece
you want to
place. The three
following
numbers are the
X, Y and Z
coordinate for
where you want
to place the
workpiece. If
omitted, it will be
placed at the
machine zero.
$AddEmbeddedRe Puts a workpiece $AddEmbeddedRe $AddEmbeddedRe All
gPart from the fixed gPart # [#][#][#] gPart 1 25 10 machi
embedded nes
workpiece except
registry on the the 3D
table. See Printer
$AddRegPart
above for further
explanation.
$AddDefinedPart Put a predefined $AddDefinedPart # $AddDefinedPart 1 Milling
workpiece on the [#][#][#] 10 10 and
table. Use Cuttin
$AddDefinedPart g
to define machi
workpieces in the nes
program.
$BlockSpindleRot Will block on- $BlockSpindleRot $BlockSpindleRot Lathe
screen spindle machi
rotation. This can nes
be useful in the
unlimited lathe if
the visual
rotation of the
workpiece is not
desired.
$Inches Enforce the use $Inches $Inches All
of Inch units. (To machi
set millimeters or nes
inches units,
open the
program settings
dialog).
$Millimeters Enforce the use $Millimeters $Millimeters All
of Millimeter machi
units. (To set nes
millimeters or
inches units,
open the
program settings
dialog).
$MillStock Creates a mill $MillStock # # # # $MillStock 100 100 Milling
stock material. ## 40 0 0 40 machi
nes
Length, Width,
Height, Origin X,
Origin Y, Origin Z
$MillTool Creates a milling $MillTool # # # $MillTool 10 0 50 Milling
tool. machi
nes
Diameter,
Radius, Length
If radius =
diameter /2 a ball
mill is created.
Otherwise, it will
be flat.
$MillToolDrill Creates a drill $MillToolDrill # # # $MillToolDrill 10 Milling
tool. 60 50 machi
nes
Diameter, Tip
angle, Length
$SetView $SetView is a $SetView # # # # # $SetView All
special # # # # # # # # # # 0.008132864,- machi
command to set # 0.001045043, nes
the 3D-view 0.002846713,
during the 0,0.002991813,
simulation. It 0.004094983,
should not be -0.007044114,0,
programmed -0.000494922,
manually as it 0.007581451,
contains too 0.00419715,
many 0,-0.1170392,
parameters but -0.01551898,
rather be created 0.1104939,1
using the menu
action Tools –
Misc - Insert
Command -
$SetView.