CNCSimulator Pro

user guide

3.2. Tutorial 2 turning

The purpose of this tutorial is to learn the basic concepts of how to use the CNCSimulator Pro turning from scratch. 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 SettingsSettings 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 FileLoad Machine from the main menu.
Uncheck the Open demo checkbox and click on the Turning Center machine. 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 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.
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) and 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 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.
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 in the 3D view and rolling 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! The 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 millimeter. 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 the CNCSimulator Pro. Always take the 23 millimeters into account!
We want to take away 10 millimeter from the diameter per cut (5 mm material) so we should put the tool on 40 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 the tool moves we do, 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 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
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 make 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: