Sunteți pe pagina 1din 277

GUIA DE USO FRESADORA DE ESCRITORIO POCKETNC

COMPILACIN DE RECURSOS SITIO WEB POCKETNC

http://www.pocketnc.com/resources/

http://www.pocketnc.com/pocketnc-resources

Recopilado por Ulises Rodrguez cnc@avancort.com Julio/2017


GUIA DE USO FRESADORA DE ESCRITORIO POCKETNC

GETTING STARTED WITH YOUR POCKET NC

1. Software Tutorial

2. Sending and Deleting Files

3. AXIS Overview Tutorial

4. Home Position Tutorial

5. Tool Length Offset Tutorial

6. Feeds and Speeds Tutorial

7. Set up a Part in Fusion 360 tutorial

8. Pocket NC Vise Tutorial (Vise CAD model in Fusion 360: http://a360.co/21mUm81)

9. Impeller training (three part video training series)

10. Wax ring tutorial (Ring model STL file: http://www.pocketnc.com/s/wax-ring.stl )

11. Pocket NC Clean Up tutorial

12. Additional Pocket NC Support from our Google Groups Forum / support@pocketnc.com

Additional Fusion 360 to write Gcode, you can find resources to help :

1. http://help.autodesk.com/view/fusion360/ENU/

2. http://help.autodesk.com/view/fusion360/ENU/?guid=GUID-18445C60-F9AD-4217-8066-CA48FA11E514

Recopilado por Ulises Rodrguez cnc@avancort.com Julio/2017


POCKET NC
Pocket NC 5 Axis Desktop CNC Mill included:
Pocket NC Mill
One extended reach tool holder
1/8th Inch ER11 Collet and Nut
Single Flute Wood, Wax, and Plastic Endmill
One year subscription of Autodesk Fusion 360
Pocket NC vise and hardware
USB cable
Power cord
Pocket NC Limited Warranty
X Axis
Max Speed: 40 ipm (inches per minute)
Resolution: 0.000125in
Backlash: 0.0005 in at tool base
Deflection at 5 pound load : 0.001 in at tool base
Max Travel: 4.3 in
Homing Repeatability: +/-0.0005 in
Repeatability: +/-0.002 in at 0% load
Y Axis
Max Speed: 40 ipm (inches per minute)
Resolution: 0.000125 in
Backlash : 0.0005 in at tool base
Deflection at 8 pound load : 0.001 in at tool base
Max Travel: 5.0 in
Homing Repeatability: +/-0.0005 in
Repeatability: +/-0.002 in at 0% load
Z Axis
Max Speed: 40 ipm (inches per minute)
Resolution: 0.000125in
Backlash at 18 pound load : 0.0005 in
Deflection at 18 pound load : 0.001 in
Max Travel: 3.55 in
Homing Repeatability: +/-0.0005 in
Repeatability: +/-0.002 in at 0% load
A Axis
Max Speed: 20 degrees/second
Resolution: 0.025 degrees
Backlash: 0.05 degrees
Deflection at 2 pound load : 0.001 in at table center
Max Travel: 100 degrees (90 degrees +/- 5 degrees)
Homing Repeatability: +/-0.05 degrees
Repeatability: +/-0.125 degrees at 0% load
Runout: less than 0.006"
B Axis
Max Speed: 40 degrees/second
Resolution: 0.025 degrees
Backlash: 0.05 degrees
Deflection at 2 pound load : 0.001 in at table center
Max Travel: continuous rotation
Homing Repeatability: +/-0.05 degrees
Repeatability: +/-0.125 degrees at 0% load
Runout: less than 0.006"
Spindle
Spindle Speed: 65-10,000 rpm
Power Output: 104 Watts
Spindle Motor: BLDC 3 Phase with Hall Feedback
Spindle Runout: ~0.0005in
Tool Change: 3mm Allen
Tooling: ships with 1/8th inch collet, option to use 16 other sizes
Machine Control
BeagleBone Black running Machinekit/
Features
o Spindle Override
o Feed Override
o Stop, Start, Pause
o Jog while pause
o 5 axis simultaneous movement
Ethernet, USB, mini USB, and HDMI ports
Accepts Standard Gcode
Power Source: 90-264 VAC, 127-370 VDC, 47-63Hz
Components
7 NEMA 17 Motors
o 3 linear lead screws with preloaded nuts
o 4 rotary 8/1 belt drives
Linear Bearings, 9 & 42mm, 10% preload
Angular contact rotary bearings
6061 Aluminum Frame, +/-0.002in squareness
Machine Dimensions:
o Fully extended: 17.5 in wide(444.5 mm) x 12.5 in (317.5 mm) tall x 12.5 in (279.4 mm) deep
o Fully compressed: 13 in wide (330.2 mm) x 9.5 in (214.3 mm) tall x 9 in (228.6 mm) deep
Software
Autodesk Fusion360, post processor included
Software Setup for PC
Tutorial
Download and install the following:

Xming*

PuTTY SSH client

Beagle Bone driver (64 bit) or

*For those using Windows 10, some users have found they needed to upgrade to the newest of

version of Xming which can be purchased here. We recommend first attempting to use the free

version. This page in the forums describes what this issue looks like when attempting to

connect.

To use the machine:

Turn on your machine and connect via USB to your computer.

Run Xming, you shoud see a small "X" icon appear in your system tray(see image

below). No window will pop up.

Run PuTTY and navigate the left-side menu to Connection>SSH>X11. Click on Enable

X11 forwarding.
In the left menu click on Session, from there you should see a text entry box titled

Host Name (or IP address) just below it enter pocketnc@192.168.7.2 on port 22. Set

connection type to SSH.

Below in the Saved Sessions box, settings can be stored for later reuse by typing in a

descriptive name and clicking on the Save button.

Click the Open button.


Launch machine controller:

A new console window should appear as shown below.

Enter the password pocketnc. Note that asterisks will not appear as you type the

password.
Once logged in, you will have direct linux terminal access to the BBBs operating
system just as you would on a computer running linux.
Now that we have tested that the SSH connection works, we can test that Xming is

working by entering the command PocketNC (it is case sensitive).

After several seconds you should see LinuxCNCs AXIS window appear, PocketNC

uses this program as its CNC control interface.


Push the red button in the upper left hand corner to turn the E-stop off and the orange

button next to it to power the machine on,

Home the machine by clicking on Home All. Note that the BeagleBone can be

powered by the USB without the rest of the machine being powered, so if it seems

like you are connected to the machine but none of the motors are working, double

check that the machine is turned on and if you are using a switched outlet that it is

switched on. For the next steps to get going machining, see the Uploading and

Deleting Files tutorial and theAXIS Overview tutorial. This is a great time to get

familiar with the machine by jogging the axes around manually.

Finally, when its time to close up shop for the day you can power down the Pocket

NC machine by closing the AXIS window, and from the console window enter sudo

halt & exit this will we initiate the shutdown process and close the SSH connection

on the way out.


Software Setup for Mac OS
Tutorial
Note: There are USB communication bugs in Mac OSX 10.11.1 and 10.11.2. If you haven't yet

upgraded, we suggest you wait until later releases to avoid these issues. If you have upgraded, use this

guide as a work around for now.

Download and install the following:

XQuartz 2.7.7

BeagleBone HoRDNDIS

BeagleBone FTDI

*Note: In newer versions of OSX you may have to override settings to allow the install of the

drivers. You can learn how to do that here.

To use the machine:

Turn on your machine and connect via USB to your computer.

Open X Quartz. See the icon below. If it isn't shown in the applications window, look for it

in the "Utilities" folder which is nested under the "Applications." See the screenshots below.
This will also open X Term which you will use to connect to the machine.

Login into your Pocket NC using the command "ssh -Y pocketnc@192.168.7.2".

The password for the machine is "pocketnc". Note that when you type the password, you will not see

characters appear.
Now that we have tested that the SSH connection works, we can test that Xming is

working by entering the command PocketNC (it is case sensitive).


After several seconds you should see LinuxCNCs AXIS window appear,

PocketNC uses this program as its CNC control interface.

Test out your machine by turning E-stop off, Machine Power on, and clicking on

Home All. For the next steps to get going machining, see the Uploading and

Deleting Files tutorial and the AXIS Overview tutorial.


Finally, when its time to close up shop for the day you can power down the

Pocket NC machine by closing the AXIS window, and from the console window

enter sudo halt & exit this will we initiate the shutdown process and close the

SSH connection on the way out.


Sending and Deleting Files
Tutorial
Table of Contents
FILE MANAGEMENT
USB MEMORY
BEAGLEBONE DRIVE
DELETING FILES

FILE MANAGEMENT
Once you have created your Gcode toolpath in Fusion 360 or other CAM software, you will need to

transfer it to the machine in order to be able to run it. Note that Gcode files must be 2.5MB or less to

transfer. This is also the maximum file size that the processor can handle when it comes time to check the

Gcode for errors before running it.

USB MEMORY

You can also transfer files using a USB memory stick directly connected to the machine. This is especially

useful if you are using the machine stand -alone with an HDMI screen. The USB port is the lowest port on

the machine(see photo below).


Once you have plugged in your USB port, you can navigate to your Gcode in AXIS using the File - Open

command and navigating to /media/USB_DISK as shown in the photos below. Once you are in the

folder, you will want to view all files to make the Gcode files visible.
BEAGLEBONE DRIVE
Using the drive on the BeagleBone while you are connected via USB to the machine is the most simple

way to store files. To do this, drop your nc file directly into the "BeagleBone Getting Started" drive.

Once you are logged into your machine, click File - Open, and then navigate to /media/beaglebone as

shown below to find your files.


DELETING FILES
To see what the Beaglebone sees in this directory open up a "terminal" window and then type in (ls

/media/BEAGLEBONE) this command will end up creating a list of what the machine sees in that

directory.

If you see files in that list that you tried to remove and couldn't get them off of the machine you can then

use this command to remove them. (rm /media/BEAGLEBONE/filename.ngc) This will then delete that

file. If you are seeing them on your primary computer you may try shutting off the machine and
unplugging the USB cable from the machine for a minute and then reboot the machine. This should then

get the primary computer to look at the files again and then you should see that the files have actually

been removed.
AXIS Overview
Tutorial

TableofContents
AXIS OVERVIEW
RUNNING A GCODE FILE
BUTTONS IN THE AXIS INTERFACE
MDI INTERFACE
PREVIEW MODE VS DRO MODE

AXISOVERVIEW
AXIS is the LinuxCNC GUI used to control the Pocket NC. This tutorial will go over the basic use of AXIS

with a Pocket NC.

For general information on AXIS, click here.

RUNNINGAGCODEFILE
Once you have launched AXIS using the instructions in the Software Setup Tutorial, the first step is to

turn the machine on. You will do this using the orange "Toggle Machine Power" button shown below.

When the machine is turned on, you will hear the motors engage but nothing will move yet.

The next step is to home all 5 axes using the "Home All" button shown below. After pressing the button,

the axes will move into their home positions. This will take around 40 seconds to complete.
At this point in time, you will want to set your tool length offsets. If you don't know how to do that, check

out our Tool Length Offsets tutorial.

Once your offsets are set, load your Gcode file using File>Open as shown below. The mouse will turn to a

watch icon for a few seconds as the Gcode loads. Then press the play button to begin executing the

current file.

At this point in time, your Gcode may pause if it has run into an "M1" command which tells the machine

to pause and wait for the user to load the next tool. If you already have the correct tool loaded, you can

click that button to resume the execution. Otherwise, load the correct tool and proceed. This will also be

the process for other tool changes throughout a Gcode file. You can also use this button to pause the

machine at any point during your program. It will pause all 5 axes, but leave the spindle running. The

yellow button on the machine has the same functionality. If you are running a program for the first time

or unsure of your toolpath, we recommend keeping a finger ready to press the pause button as that will

help to avoid plunging into the material or crashing the machine if you notice something is not right.
BUTTONSINTHEAXISINTERFACE
Another feature that should also be pointed out is the "Toggle Optional Pause" button shown below.

When it is engaged, this tells the machine to stop and wait for manual tool changes as explained above.

For the Pocket NC, this button is active by default, and should remain engaged, otherwise the machine

will not wait for the manual tool change and will continue machining with the current tool.

The Toggle Skip Lines with "/" will skip all the lines in your Gcode that begin with "/". This can be useful

for leaving comments in your file for later reference or to remove lines of Gcode that you don't want to be

used.
The Execute Next Line button will execute the next line of Gcode and then wait for user input before

continuing. This can be helpful if you have a stretch of Gcode that you aren't sure about and need to proof

out, but you probably won't want to run your whole part this way.

MDIINTERFACE
AXIS includes a program called mdi which allows text-mode entry of MDI commands to a running

LinuxCNC session.

When a blank line is entered, the machines current position is shown. When a command is entered, it is

sent to LinuxCNC to be executed.

This is a sample session of MDI.


PREVIEWMODEVSDROMODE
AXIS defaults to the preview mode to preview a tool path. This mode can slow down the BeagleBone and

its connection to your machine (especially when using an HDMI screen. If this is happening, switch to

DRO mode to improve processing speed.


Home Position & Travel
Tutorial

Table of Contents
HOME POSITION AND TRAVEL
X AXIS HOME POSITION AND TRAVEL
Y AXIS HOME POSITION AND TRAVEL
Z AXIS HOME POSITION AND TRAVEL
A AXIS HOME POSITION AND TRAVEL
B AXIS HOME POSITION AND TRAVEL

HOME POSITION AND TRAVEL


The following pictures provide details about the home position of each axis of the machine. The home

position is the position from where the machine starts each program and returns to at the end of the

program. The machine also returns to the home position when a tool change is necessary. The home

position represents the Cartesian coordinates position of (0,0,0,0,0) in terms of (X,Y,Z,A,B).

X AXIS HOME POSITION AND TRAVEL


Travel: (-1.75, 2.55)
Y AXIS HOME POSITION AND TRAVEL
Travel: (-2.05, 2.95)

Z AXIS HOME POSITION AND TRAVEL


Travel: (-3.45, 0.10)
A AXIS HOME POSITION AND TRAVEL
Travel: (-5, 95)
B AXIS HOME POSITION AND TRAVEL
Travel: (-9999,9999)
Tool Length Offsets: New Spindle
Tutorial

TableofContents
TOOL LENGTH OFFSETS - NEW SPINDLE
TOOL OFFSET SETUP PROCEDURE
TOOL HOLDER CHANGE
TOOL CHANGE
SET TOOL LENGTH METHOD 1(PREFERRED METHOD)
SET TOOL LENGTH METHOD 2(IF METHOD 1 DID NOT WORK)

TOOLLENGTHOFFSETS-NEWSPINDLE
The single flute end mill shipped with your machine, has been set up and programed into the tool

table as tool 10. (Part Number 528508 - Carbide, Plastic Cutting End Mill - Square Upcut Single Flute).

Do not use for plunging or cutting metals.

B-table offset: 0.88XXin. This value changes


Distance from B-Table to Center of A axis rotation

for each machine and is included on a paper with each machine. If you have misplaced yours, please

email us at info@pocketnc.com and we can find it for you!

TOOLOFFSETSETUPPROCEDURE




1. Home machine

2. Clear any offsets using The Zero Coordinate system button located under the Machine dropdown

menu. The Z values seen in the DRO readout should read 0.00000.

3. Move A table to 90 degrees using the command g90 g0 A90 within the MDI command window.

4. Clean off any debris on the B-table.

5. Jog Z in the negative direction until the base of the tool is close enough to the B axis table that the 1-2-3

block will not fit between the two.

6. In increments of 0.01 or less, jog the Z axis positive until the 1-2-3 block slides between the tool and

the table

7. Repeat this step with smaller increments until the tool position is measured past 3 decimal places

8. Use the current Z position on the Machine interface to calculate the tool offset using the equation

below:

-(1-2-3 block height) + (B-table distance above) + (Z value readout) = (Tool Offset)

Example -(3.000)+(0.8861)+(-0.9131)=(Tool Offset) = (-3.027)

9. Input the calculated Tool Offset within the Tool Offset table found under => File => Edit Tool Table ...

TOOLHOLDERCHANGE
1. Turn off spindle and loosen the (3) spindle screws using the 3mm wrench.

2. Tap spindle holder with the back end of the 3mm wrench and take out the tool holder.

3. Reverse process for installing a new tool holder, being sure to tighten the (3) spindle screws evenly.

TOOLCHANGE
1. Use the Pocket NC spindle wrench and the 3mm driver (Both found in the tool kit).

2. Turn off spindle and place the 3mm driver into one of the 3 spindle screws.

3. Using the Pocket NC spindle wrench loosen the collet nut while holding the spindle in place using the

3mm wrench.

4. Change out or move tool and then reverse the process to tighten the tool holder.

5. Remember to adjust the tool offset after changing or adjusting a tool.

SETTOOLLENGTHMETHOD1(PREFERREDMETHOD)

1. This is done in AXIS by clicking File>Edit tool table as shown in the image below. If the window pops

up for you, go on to step 4. If it doesn't, go to step 2 for a Mac or step 3 for a PC

2. The Mac my be having issues with the SSH connection. Two situations likely have occurred at this

point.
2a. You have had your Machine interface open for more than about 10 minutes and you need to

restart the machine by powering it down and then restarting it to get this edit tool table option to

work this way. You can also try option 2b directly below or go to the second method found below

after the Windows explanation.

2b. You may have opened the tool table properly and due to where it is on the Linux screen you

need to open it by going down to the Dock and right click on the Xming Icon and select Show All

Windows This will likely bring up the tool table and you can select it from there. If this does not

work go to the second method found below after the Windows explanation.
3. With a PC you are likely having an issue where the Tool Table is off the screen and you need to bring

the window up onto the screen. This can be done by hovering over the Xming icon until the two window

comes up. Then right click on the tool table window and select Maximize.

4. To set the tool table to reflect our earlier example, we will change the value of Z to -3.027 and the tool

diameter to 0.125". It is important to remember that this value is the diameter of the tool, not the

diameter of the shank. After updating the values for your tools, press "Save File" and then "ReRead".

Once you are done with your updates, quit to the main AXIS window. Once in the main AXIS window,

click File>Reload Tool Table to update the offsets.

After you have reloaded the tool table, you can check that the offset took by typing G43 H1 and pressing enter

(that is if you changed tool 1, type H2 if you changed tool 2). Once you have entered G43 H#, you will see TLO

Z changes to the number you input in the tool offset page. Most tools will fall between -2" and -3".
If you are consistently using the same tooling throughout your programs, you can bypass having to change

the tool offsets by making sure you use the same tool numbers when generating toolpaths in you CAM

software.

SETTOOLLENGTHMETHOD2(IFMETHOD1DIDNOTWORK)
1. If you have a Mac Open up a secondary Terminal window by right clicking on terminal and selecting

New Window. If you have a PC right click on Putty and select your desired boot option to open a

second window.
2. In the second terminal window, sign into your Pocket NC. Then type in the command scite

(Command sensitive) to open the text editor.

3. Once Scite opens, go to File>Open.

4. Select pocketnc (red arrow) linuxcnc configs ARM.BeagleBone.PocketNC Change to

All File (Blue arrow) tool.tbl


5. With tool.tbl open, edit the tool table as needed. In this format you must use the notation defined

below.

Example - T10 P10 Z-3.21 D0.123; Tool Ten

Description - Tool# _ Program# _ Zoffset _ Diameter of tool _ ; Tool notes

When in doubt follow the notation of the other tools.


6. If the asterix (*) is by the file name (see blue arrow above) the file is not saved. To save the File go to

File Save.

7. Once the Tool table file has been edited go back to the Machine interface window. Two windows can be

open at the same time if you follow step 1 of this method.

8. In the machine interface window go to file reload tool table.

Important - Without doing this step you will not be able to use the new tool offset values in

machine kit, unless you restart the machine.


Feeds And Speeds
Tutorial

FEEDSANDSPEEDS
The Pocket NC mill removes material using a tool with a series of small rotating cutting edges. A

tool with 2 cutting edges will make two cuts for each revolution. The material that is removed is

referred to as a chip. The thickness of a chip that the Pocket NC is capable of producing will vary

depending on what material is being removed. The thickness of a chip(also called the chip load)

is adjusted using two variables, feed and speed. Feed refers to the linear rate in inches/minute

or millimeters/minute that the cutting tool moves through a material. Speed refers to the

rotational speed in RPM (revolutions per minute) of the cutting tool. To increase chip load,

speed can be decreased or feed can be increased.

The ideal chip load for some materials is 0.001. This means, with a spindle speed of 10,000

RPM and a linear progression of 0.002 per revolution (2 cutting edges X 0.001) gives a feed of

20 inches per minute. It is important to keep in mind that the calculated chip load is only a

guideline or starting point, the user should adjust the speed and feed to what sounds good and

feels good. Feed and speed can be adjusted on the fly using the Pocket NC user interface.
Machining also has two more variables, side load and depth of cut. These two variables will

change the width and length of the chip being removed from the material. Dimension A in the

image below represents the amount of material removed with the cutting tool in the X/Y

direction or side load. Dimension B in the image below represents the amount of material

removed with the cutting tool in the Z direction, also known as the depth of cut.

Above, the image on the left shows a tool path with a side load of 0.08 and the image on the

right shows a toolpath with a side load of 0.04. If the material being removed was soft like wax

or wood, the tool path on the left would be much more appropriate as the machine will be able to

handle that amount of side load. If the tool path from the image on the right was used with the

same material, the user would have spent twice as much time and worked the spindle half as

hard.

To adjust side load and depth of cut in Fusion 360 see the images below.
Feed and speed and be adjusted from the Tool tab for each tool path. Below, spindle speed is

marked with a blue arrow and feed is marked with a red arrow.
With that said, we have posted a general guideline for the 4 variables below in a number of

materials. Note that side load and depth of cut will be expressed as a percentage of tool

diameter and feed will be represented as feed/tooth. For example, the end mill pictured above

has 4 cutting teeth. To calculate feed, use the following equation.

Use this as a starting point for your feed and speed and make adjustments as you go.
Fusion 360 Part Setup
Tutorial

TableofContents

MODEL SETUP

CAM SETUP

TOOL PATHS

MODELSETUP

The purpose of this tutorial is to demonstrate start to finish, importing a machineable part to generating

toolpaths in the Fusion 360 CAM environment to cutting the part on your Pocket NC.

When setting up any part on the Pocket NC mill, it is recommended that users include the Pocket NC B Axis

table and vise models (or other work holding) in the CAM environment. This will help users visualize

orientation of the part and table to avoid collisions.

To use the B axis table and vise model, download them here. Also be sure to download the 6 sided cube used in

this tutorial here. Because Fusion 360 is cloud based software, users will need to upload both models to Fusion.

To do this, first open the data panel.

Then select upload and migrate to the file location.


Files uploaded to Fusion will stay within the Data Panel and can be accessed any time in the future from that

location. With the files uploaded, open the Pocket NC table and vise model by right clicking the file and

selecting open.

Next import the Pocket NC Test CUBE into the current setup by selecting Insert into Current

Design
After all the models are in Fusion 360, users will set the orientation of the part relative to the vise or

table so it matches that of the setup on the Pocket NC mill. A transparent square located atop the

Test CUBE represents the size of the material the Test CUBE will be machined from.

To move the an object within Fusion 360, right click the part in the design tree and select move.

All 4 gripper setscrews on the vise will need to be moved. Start by moving the gripper setscrews on the long

side of the vise by selecting both components in the design tree and selecting move. The hole spacing for the

grippers is 5mm, so the they will have to move a total of 20mm to match the picture below.
Next, locate the Test CUBE so the transparent square overlaps the gripper setscrews on the right by about 0.01.

Note, when material is placed in the vise between the grippers, some of the stock material will be crushed. By

overlapping material with the grippers, users will get a better representation of what is actually happening on

the machine.
The grippers on the left will also need to be moved. They are mounted to the movable jaw of the vise, this

means they can move in any increment. To move the left grippers, first select all components in this assembly

by opening the joints dropdown within the design tree, right click Movable Jawand left click Select

Components. Move the components so that the set screws on the left have a similar overlap with the stock

material to the set screws on the right.

The Assembly is almost complete, the last step to locating the Test CUBE, is setting the height from the vise.

The Test CUBE will be made from a 1.5 x 1.5 x 1.5 stock material, this means the top of the Test CUBE must

be 1.5 from the vise or less. The bottom of the Test CUBE must also be above the grippers to avoid collisions

when machining. To move the Cube in Z select the part within the design and select move. As you can see in

the picture, the top of the cube is 1.285 from the top of the vise.
CAMSETUP

To begin making toolpaths for the Test Cube users must first migrate from the MODEL or SCULPT

environment to the CAM environment. To do this select the Change Workspace drop down tab at

the top of the screen, then select CAM.


Before toolpaths can be created, a Setup must be created that includes origin location, stock
material and a coordinate system. To create a Setup select the setup dropdown and New Setup.

The Setup is a tool for Fusion 360 to understand excess material, objects to avoid and the
machine's initial position. The first part of a setup is selecting the work origin and orienting the
Work Coordinate System (WCS). To set up the WCS within the Fusion CAM environment, select
the WCS dropdown and Select Z axis/plane & Y axis next to orientation.
Two pieces of geometry will need to be selected to complete the Orientation field, one for the Z Axis

and one for the Y Axis. To do this, select the box next to the Z Axis labeled Nothing, then select

geometry (a straight line) on the vise perpendicular to the moveable axis of the jaw and parallel to the

work table. Repeat the operation for the Y Axis, selecting a feature perpendicular to the work table.

When finished users should have a WCS that looks similar to the image below. If you need to change

the directions of the axes, use the check boxes to flip them.
The orientation of the B axis is flat or (perpendicular) to the spindle of the Pocket NC when homed.

This needs to be reflected by the WCS. On the Pocket NC, the Y Axis moves the table up and down

this must be reflected in the setup for the output code to work with the machine.

Next, you will select the origin of the machine within the model. The origin of the machine is

represented by a point in space .885 off the surface of the table at the center of rotation. This point

varies slightly from machine to machine and can be changed from the downloaded model to match a

specific machine. Before it can be selected any geometry covering the origin must be temporarily

hidden. To hide the cube, select the cube model within the device tree, then select the lightbulb to the

left of the name.


With the origin visible, select Selected point from the Origin drop down menu. Then select the box labeled

Nothing to the right of WCS Origin. Now select the machine origin.

Make your CUBE visible again and if it wasn't already selected, select it as your model.

Last under the setup tab uncheck the fixture box.


The test cube will be made from a 1.5 x 1.5 x 1.5 block of material so this should be input for

width Depth and Height. Because the top of the cube was set 1.285 from the top of the vise the

stock offset will need to be about .285 offset from (-Y). When finished with the setup, select ok to

save and close the setup box.

TOOLPATHS

The Pocket NC uses a set of instructions known as a tool path written in a language called Gcode, to

direct the cutting bit and other parts of the machine. This set of instructions is used in the world of

machining to remove material rather than add it like 3D printing. This tutorial will help users create

three types of tool paths; facing, roughing and finishing, to turn a 1.5 cube into a 1 cube with a few

extra features. Roughing toolpaths are used to remove the bulk of excess material from a part, while

finishing toolpaths only remove as much as a human hair, sometimes less. Facing tool paths can be

used at the beginning or end of a program, sometimes even both, a facing toolpath removes material

from the top of a part.


The block can be cut using the tool packaged with the Pocket NC. The order of the toolpaths will

be; rough top, rough 4 sides, finish top and finish 4 sides. Before users can generate toolpaths they

will need to download the Pocket NC Tool library. To install the new tool library, select MANAGE

then Tool Library

Next, under Libraries select Local then Library. Now use the Import tab to select the Pocket

NC Tool Library from your downloads location.

To create the first toolpath select 3D, then 3D Adaptive Clearing.


First, select a single flute cutting tool from the imported Pocket NC Tool list. Use the settings in

the picture below to get the correct feeds and speeds for making the cube in pine.
In the geometry tab, set up the tool orientation so that the coordinate system matches that of the

image below. Next select the top outline of the 1.5 inch cube for the stock contour. This geometry will

let Fusion know what it needs to machine.

The Heights tab is where users will select the depths for machining. For the first operation, select

the cube top as the bottom height. This will be the maximum depth the tool will cut at. Top

Height should be the cubes material top, this will not need adjusting if the stock is setup properly.
The Passes tab controls how much material is removed at any given time. Three values need to be

adjusted to get a proper cut; "Optimal Load", "Maximum Roughing Stepdown" and "Stock to Leave".

Adjust them to the settings below or fine tune them as you see fit.
The last tab, "Linking" is mostly for fine tuning of a tool path. For example, "No Engagement Feedrate" can be

altered from 20 in/min to 40 in/min to save time when the tool is in a retract and not cutting. A "Ramping

Angle" of 2 deg is good for Aluminum because the cube is made from pine, A ramping angle of 10-15 deg may be

more appropriate.

When finished making changes select "OK" to save changes.


The tool path should looks something like the image below removing all material within the boundary. This

toolpath can be processed into gcode and sent to the machine.


To cut the remaining sides of the cube, repeat the process by creating a new 3D adaptive toolpath and changing

the orientation of XY&Z for each tool path.


Set "Machining Boundary" to Bounding box and "Tool Containment" to Tool outside boundary with an offset of

~.1" (be sure to check tool paths for visual collisions before running). From the side, select all three surfaces

for the "Stock Contour field".

Set the Bottom height on the side to the lowest desired machinable height.
The toolpath should look like the image below. Before Posting a tool path, users should check for collisions

with the Pocket NC vise using the Simulate feature within the ACTIONS dropdown.

In the image below, the toolpath intersects the gripper jaws inside the pink box. This will most likely break a

tool. Be sure to check for such collisions.


By switching the Tool Containment to "Tool center on boundary" from "Tool outside boundary" the user can

limit how far off the edge the tool will travel. The next image show the results of this change.
In the picture bellow, the tool does not travel off the material more than half its diameter resulting in a toolpath

that does not hit the grippers. It is always good practice to keep excess room in a area of low clearance for a

first run.

To create Gcode from the adaptive toolpath, select the "ACTIONS" dropdown then select "Post Process".
Select the pocket nc.cps post from the Post Processor list, then select ok. Fusion will prompt for a file location

and name. Save the file to a flash drive with any name. Be sure to end the file with ".ngc" this is the file

extension that the Pocket NC mill uses.


GUIA DE USO FRESADORA DE ESCRITORIO POCKETNC

IMPELLER TRAINING SERIES

Recopilado por Ulises Rodrguez cnc@avancort.com Julio/2017


GUIA DE USO FRESADORA DE ESCRITORIO POCKETNC

We ship each machine with two pieces of pine so that users can follow this tutorial from start to finish to make a first part (
https://youtu.be/7YAIbQoNW48 ).

The first video shows how to get your geometry setup in Fusion 360. Before you get started, you can download the model of
the Pocket NC table and vise :
https://myhub.autodesk360.com/ue29ca485/g/shares/SH7f1edQT22b515c761e4481d4088fa5f1b7?viewState=NoIgbgDAdAjCA0IDeA
dEAXAngBwKZoC40BhAQQFk140BDAZzt3ULQgCYYaaAOGtgWhgBjYfwAsAMwkBmfjVzSAnOIAmnGgHYAbGICsUmlTQB7AEYArX
EPQBJFYTYBfEAF0gA ) .

and the model of the impeller:

https://myhub.autodesk360.com/ue29e2a8e/g/shares/SH7f1edQT22b515c761e64bad2a4877dfbf0?viewState=NoIgbgDA
dAjCA0IDeAdEAXAngBwKZoC40ARXAZwEsBzAOzXjQEMyzd1C0ATAMwGNcAzBBgwAtNwBMuCaIAs0gEajGADl5KYf
CQE4IvGJwW4IaAL4gAukA

In the second video, ( https://youtu.be/Dklll7Ud2vs ), we go over how to create the toolpaths in Fusion 360. For this part
you will want to download the tooling library that's available on our Post Processor Page.

Recopilado por Ulises Rodrguez cnc@avancort.com Julio/2017


GUIA DE USO FRESADORA DE ESCRITORIO POCKETNC

The final part shows ( https://youtu.be/UHfcfuDEYGs ) how to actually machine it on your Pocket NC. Note that at the end,

you have a roughed-out version of the impeller because you are still using a relatively large tool. If you want to run the

finishing toolpaths, feel free to use a smaller tool and play around with the toolpaths in Fusion 360! Thanks for watching!

Recopilado por Ulises Rodrguez cnc@avancort.com Julio/2017


Pocket NC Vise
Tutorial
HOW TO USE THE POCKET NC VISE
The Pocket NC vise was designed to be super adjustable and have excellent grip. While it does

not look like a traditional vise the function is the same. Dowel pins and/or set screws are used

in place of jaws and are completely interchangeable. M4 set screws work like gripper jaws for

roughing material and will work for a hardness of aluminum and anything softer. Dowel pins

can be used for light finishing work. The pins can be adjusted in increments of 5 mm. The

movable jaw has a travel of 6mm with 6+ mm of thread engagement.

Mounting the vise to the PocketNC mill is simple and precise. In combination with two

dowel pins, the vise is mounted with a M4x10 fastener. The user can choose 1 of 4 positions in

90 degree increments.
The vise sits on the table with the moving jaw towards the center. Before placing the vise be sure

both the table and vise are clean and clear of chips. Tighten the M4x10 fastener using a 3mm

hex wrench only to the point that the wrench starts to flex. Tightening past this point will

destroy the threads machined in the table.


The Pocket NC vise uses 3 different types of off the shelf components, socket head cap screw, set

screws and dowel pins. You will notice that the fasteners and setscrews are metric and the dowel

pins are english. We have two reasons for the mix and match. The most common part that will

get lost is the dowel pins, they tend to roll off desks and slip out of hands but because they

are english units, a replacement or even longer versions can be purchased at a local ACE

Hardware. The second reason for this mix, M4 fasteners have a minor diameter that is so close

to that a M4 internal thread can be machined to also accommodate a dowel pin. This

helps the user easily switch between roughing parts and finishing parts.
Here you can see the PocketNC vise mounted on the B axis table within Fusion 360.
The origin of the machine (G54 X0 Y0 Z0 A0) is represented as a pink dot centered on the table

.885 above the surface. Material can be placed within Fusion 360 using the this table and vise

setup to accurately represent the setup on the machine. You can find the Fusion file for the vise

and table here.

Here is a representation of the Autodesk A logo being set up for machining. A lighter area

represents the stock material that will need to be removed. The part should be adjusted in XY

and Z to represent the desired end result. In the photo, centerline of the B axis is parallel with

the centerline of the spindle, this is A 90 degrees. The movement of the rotational axis may be

different than the user may imagine, users should take the time needed to understand how the

axes move in relation to each other.


In the picture below, the A was machined from a scrap piece of Delrin. The material was placed

in the vice according to the picture in Fusion 360.


GUIA DE USO FRESADORA DE ESCRITORIO POCKETNC

Recopilado por Ulises Rodrguez cnc@avancort.com Julio/2017


Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

Wax Ring Tutorial

1
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

Change Log 3

About 3

Notes 3

Getting Started 4

1.1 Converting .stl Files 5


1.2 Part Setup and Fixturing 9
1.2.1 Create Stock and Supports: 9
1.2.2 Construct Reference Geometry: 13
1.2.3 Fixturing the Part 15
Set B-Table Offset 15
Orient the Part in the Vise 18

2 CAM SETUP 24

3 Tool Paths: Generating machinable files 30


Operation 1: Adaptive Clear Top 32
Operation 2: Adaptive Clear Side 1 40
Operation 3: Adaptive Clear Side 2 44
Operation 4: Adaptive Clear Setting 50
Operation 5: Parallel Clear Top 55
Operation 6: Scallop Side 1 61
Operation 7: Scallop Side 2 65
Operation 8: Radial Clear Setting 71

4 Generating G-code from toolpaths: Post processing 76

Quick Reference 81

2
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

Change Log

About
The purpose of this tutorial is to familiarize Pocket NC users with the process of
machining intricate wax parts such as a wax ring. This tutorial will cover importing mesh
files into the Fusion 360 modeling environment, reducing the mesh count of the mesh
files, converting mesh files to solid geometry, importing solid models into the Fusion 360
CAM environment, programing toolpaths, and outputting machine code(G-code).

Notes
This document is for reference only! Readers and operators take on all liability in
the use of this document.

All measurements are in inches.

This document assumes the user knows basic functions of the machine. These
functions include setting up the Pocket NC vise, transferring files to and from the
machine, loading/running programs, setting up tooling and measuring tool length offsets.

All files mentioned in this document can be found within the zip folder containing this
document.

The CNC program included with this document, Wax Ring.ngc, is to be used at the risk
of the operator or machine owner. Pocket NC does not take responsibility for any
damage or injury caused by the use of this or any other shared program.

For proper function of the Wax Ring.ngc program, users will need required tooling set
up with offsets under the correct tool numbers. See tooling section. Users can also use
this tutorial to write programs that incorporates different tooling.

Note that each machine has a slightly different center of rotation and as a result the
Fusion part must have its center of rotation changed before using the program. The
documentation shipped with each machine includes the offset. If the machine was
shipped prior to 2017 see the B-axis offset Tutorial for how to check the offset on your
machine. Pocket NC changed the alignment process at this point in time which makes
checking your value important.

3
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

1 Getting Started
The following section will start at the beginning, importing .stl files. To start with posting
tool paths, look at Section 2 of this document.

Machining a part from an .stl file requires several steps. First, the file must be converted
to a format usable by Fusion 360 CAM. Once the file has been converted users can
create a machining setup within the CAM environment that matches that of the real
world. Once the setup has been created, tool paths can be created within Fusion 360 to
simulate the removal of material. Finally, users can export the file to be used with the
Pocket NC mill.

Fusion 360 requires solid files rather than mesh files for its CAM environment. In many
cases, mesh files that have been converted to a solid, must also be reduced in mesh
count, as a large number of surfaces will cause slower function of the CAM environment.

The reduction of mesh surfaces may be of concern as surfaces in a mesh format, quickly
become rough. Users should note that a smoothing function exists within the CAM
environment to round sharp edges at the intersection of faces. This function can be
seen in Section 2 of this document.

4
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

1.1 Converting .stl Files

Start by downloading the Sample Ring.stl file from the Pocket NC website.

Create a new design, then import the file Sample Ring.stl. To do this, select File,
then New Design. Once the new design has been opened, right click in the model area
and select Insert, then Insert Mesh. Finally, migrate to the Sample Ring.stl file
location, select the sample ring file and click Open .

.stl files exist in two formats, English and Metric format. If the geometry is imported
using the wrong format, the sizing will be much larger or smaller than expected. Import
the Sample Ring using Metric units. Using the Inspect icon, users can measure the
distance between prongs and check for a correct import.

Before the Sample Ring can be used by Fusion 360 in the CAM environment, the file
must be converted from a mesh format to a solid format. To convert the file users must
first migrate to the Mesh workspace. To do this, open the settings icon located at the
bottom right corner of the Fusion 360 screen, then select Do not capture Design
History. Select Continue when prompted.

5
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

Next, migrate to the Mesh work space using the change Workspaces tab. Located to
the upper left corner of the Fusion 360 screen.

Once in the Mesh environment, reduce the Sample Ring mesh surfaces count by 75%.
To do this, select Modify, then Reduce. Select MeshBody1 from the browser as the
Mesh Face/Body to be reduced. Last, select a density of 0.25 then select ok. Once
complete, the .stl Sample ring will be reduced to a mesh with fewer surfaces. This mesh
will retain its original dimensions but the facets composing it will be 4 time larger.

At this point, all work has been completed within the Mesh environment. Migrate back to
the Model environment.

6
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

Once in the Model environment, users will need to convert the reduced .stl mesh
into boundary surfaces for use in the CAM environment. To do this, select MeshBody1
within the design tree, right click and select Mesh to BRep.

Fusion may produce a warning like the one below saying that the mesh count is high
and that proceeding may lead to slow performance. Select ok to ignore the warning a
proceed with the conversion. The Fusion conversion software has a limit of about 10,000
faces for converting a mesh to a BRep. In this case it is ok to proceed, but the
performance may be impacted to some degree.

The converted sample ring should look like the image below. At this time, save the
converted part, and turn back on the design history. It is now a solid and ready to be set
up and fixtured for programming toolpaths.

7
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

To turn on design history right click on the Browser root and select Capture Design
History.

8
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

1.2 Part Setup and Fixturing

1.2.1 Create Stock and Supports

This section will focus on locating the sample ring within Fusion 360 CAM environment
for use with the Pocket NC mill. Users should note that the setup used in this tutorial
might not be the setup recommended by the jewelry industry. It is only an example,
users are free to explore different setups and fixturing.

The first step in the setup is creating the geometry that defines the stock material.
Secondly the supports that will be left connected to the work by the machining
operations will be defined. Finally, reference geometry used to help define the machining
steps will be created.

Start by creating the sketch used to define the stock material. The ring will be machined
from a cylindrical piece of machinable wax. The diameter of the stock will be 1.5 inches
and the height is 1 inch. In the modeling environment, create a new sketch. Select the xz
plane, sketch a center-midpoint circle concentric with the ring. Dimension the diameter of
the circle to be equal to the diameter of the stock from which the ring is being machined,
here 1.5 inches.

Next, select the circle just created and extrude it both directions. Extrude one side 0.3
inches and the other side 0.7 inches. Change the opacity of the body created by the
extrude to30% so that the ring is still visible inside of it. The goal of this step is to locate
9
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

the ring within a block of stock. Because the vise has to grip the base of the
material, the ring is located closer to the top of the stock than the bottom.

The ring has to be supported while it is being machined so that is maintains its position
in space and can be reliably located. In order to avoid cutting away all of the support
structure, geometry that will be avoided by the machining process is created.

10
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

These supports will have to be removed after the machining is complete in order to
separate the workpiece from the waste material. It is desireable to make these supports
as small as possible, for ease of removal, while still holding the work rigidly to resist the
machining forces so the piece doesnt break while it is being machined.

Create an offset plane 0.4 inches below the plane on which the stock circle was
sketched.

Sketch three center-diameter circles on that new offset plane by selecting points around
the perimeter of the ring that are spaced fairly evenly as shown below. Do not place any
supports close to the front of the ring. These will be supports left in place during the
machining and would interfere with the machining of the prongs if they were placed in
the front.

11
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

Extrude the circles up to the bottom of the ring to form the supports. Make sure that the
operation chosen is New Body.

12
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

After all of the supports are extruded, the sample ring looks likes this.

1.2.2 Construct Reference Geometry:

The final pieces of geometry that need to be added are the references needed for the
machining operations. In order for the tool to reach all of the geometry on the ring the
machining will be done from four basic positions, the top, two sides and the front.

The general machining sequence for any part is to first remove the bulk of the material,
then rough out the shape of the part, finally the part is cleaned up with finishing passes.
By getting rid of as much bulk as possible at the start, the amount of cutting time with
small cutters is reduced. However, care must be taken to leave enough material to
support the tool forces of the subsequent steps.

The ring will be machined by removing the excess material from around the perimeter
and the middle of the ring. The ring will then be undercut and trimmed to its basic shape
on the sides. The front of the ring will then be roughed to shape. The cleanup will be
completed by repeating them same positions and doing the final material removal from
the top, sides, and front.

13
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

In order to avoid wasting time by machining a larger area than needed, as well as to
help avoid collisions, some reference sketches will be created.

Select the YZ plane and create a rectangular sketch as shown below.

Create a reference plane 0.35 inches in front of the XY plane.

14
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

Create a sketch on that new reference plane of a 0.3 inch x 0.3 inch square
centered about the middle of the gem setting.

1.2.3 Fixturing the Part

The setup of the ring is now complete. The part now needs to be fixtured in the way in
which it will be held when it is cut on the Pocket NC mill. The sample ring will be held in
the Pocket NC vise. Users will need to import the Pocket NC backing plate and vise
and upload the parts to Fusion 360.

Set B-Table Offset

Open the Pocket NC backing plate and vise and check if the B table offset is correct for
the machine being used. This is the distance from the origin to the B table in the model.
The default value is 0.885. This may be measured using the Inspect tool.

15
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

The B-Table Offset, is the point in space about which both the A and B tables rotate.
This point in the model must match the point in reality in order for the part to be oriented
correctly relative to the machine when the rotary axes are moved.

If the location of the offset needs to be changed, start by right-clicking on the origin and
selecting Move.

When the dialog box opens, change the selection filter to Bodies. Select the origin as
the body to be moved. Calculate the distance that the origin needs to be moved. In this
16
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

case the default origin is 0.885 and the machine B Table Offset is 0.8685. This
means that the origin needs to be moved .885 - .8685 = 0.0165 closer to the table.

Enter the amount by which the B-table offset in the model needs to be adjusted in order
to match the machines offset. Click ok to apply the change. It is good practice to verify
the new location has updated properly before saving the file. Note that the offset will only
need to be adjusted in Z direction. It should never be moved in the X or Y axes. Make
sure to save the file before proceeding.

17
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

Orient the Part in the Vise

Next the ring model will be inserted into the vise and B table assembly. Open the Data
Panel then right click on the ring file that was created earlier and select Insert into
Current Design.

The part will not usually import in the desired position. The first step in the setup is to
used the the move commands locate the part in approximately the desired location and
orientation.

18
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

Next the adjustable jaw on the vise(the one with the screw used to tighten the jaws) is
opened. Right click on any piece of the adjustable jaw. All of the adjustable jaw pieces
are constrained to move together so only one needs to be selected. Click move, and
then change the drop down in the options dropdown from body to component. The
arrow pointing in the desired direction of motion may be clicked and dragged or a
direction may be selected and the magnitude of the movement may be entered. The jaw
is moved 20mm to the left to open it wide enough to hold the stock.

19
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

20
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

The workpiece is then moved about 20 mm to the left as well so that the grippers on the
fixed jaw can be more easily accessed.

21
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

The grippers on the fixed jaw(the one with two rows of 9 holes drilled in it) are moved
20mm to the left. The holes are 5mm apart so the grippers are moved 4 holes to the left.
Since the grippers must fit in the holes the adjustment of the fixed jaw is in 5mm
increments.

Next, the stock is moved back to the right so that it just barely overlaps the grippers on
the fixed jaw. This overlap is to account for the crushing/biting into of the stock material
that occurs when the vise is closed. The overlap should be about 0.01in. This overlap

22
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

will give the user a better representation of what will happen to the material when
the vise is closed than setting the grippers and stock tangent.

Finally, the moveable jaw is adjusted back to the right so that the grippers on the
moveable jaw overlap the stock in the same way at the grippers on the fixed jaw.

23
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

2 CAM SETUP
To begin making toolpaths for the Test Cube users must first migrate from the MODEL
or SCULPT environment to the CAM environment. To do this select the Change
Workspace drop down tab at the top of the screen, then select CAM.

Before any toolpaths can be created a setup has to be created that defines the location
of the origin, the stock, the fixtures, and the coordinate system. These features must be
chosen in a way that makes it possible to make the physical setup on the machine match
the one used to write the toolpaths in the model. To create a Setup select the setup
dropdown and New Setup.

24
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

The new setup brings up a dialog box where settings can be changed and model
elements can be used to define the origin and coordinate system. The dialog box has
three tabs, only the two on the left need to be addressed before writing the toolpaths for
the part. First the operation type, coordinate system, and model items need to be
identified. Then the stock needs to be defined.

Since the ring is being milled, the operation type is milling. Next the work origin is
selected and the Work Coordinate System (WCS) is orientated. To begin the setup of
the WCS select the WCS dropdown and choose the Select Z axis/plane & X axis option
for the orientation.

The two pieces of geometry needed to define this orientation are the Z axis or plane and
the Y axis. To define these first select the box next to the Z Axis labeled Nothing, then
select a straight line on the vise perpendicular to the axis of motion of the moveable jaw
and parallel to the work table (B table). Repeat this selection process for the Y Axis, this
time selecting a line perpendicular to the work table (B table). When finished, the WCS
orientation should look similar to the one shown below. If needed the direction of the
axes may be changed by using the checkboxes to flip them.

25
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

This orientation corresponds to the way the axes are aligned when the machine is the its
home position. The B table is flat or parallel to the spindle of the Pocket NC mill in the
home position. The Y axis moves the table up and down. The Z axis is parallel to the
spindle and the X axis is perpendicular to both Y and Z and moves the A and B tables
forward and back. The home position of the machine is shown below for reference. The
spindle is to the top of the image.

26
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

Next the origin of the machine is changed within the model. The machine origin is
represented by a point in space 0.885in off the surface of the B table. It is the point in
space where the axis of rotation for the A table and the axis of rotation of the B table
intersect. This point varies slightly from machine to machine and the distance must be
changed to match a specific machine. This distance is called the B table offset and can
be found in the documentation provided with each machine.

In order to change the machine origin first choose Selected Point from the Origin drop
down menu. Then select the box labeled Nothing to the right of WCS Origin. Now
select the machine origin.

The Model tab is left with no selection. The model will be defined for each machining
step instead.

Next, check the fixture box. The fixture is the parts of the machining system that are
used to hold the workpiece. When a model item is labeled as a fixture the software used
to create toolpaths automatically avoids running into it by placing restraints on the space
the tool is allowed to cut or cross. This helps prevent breaking tools and damaging the
vise. The B table, vise, grippers and screws are all marked as fixture pieces as shown
below.

27
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

Next the stock size and shape is defined. Click the Mode drop down and select the
From Solid option. Click the box next to Stock Solid labeled Nothing Then click the
cylinder that was modeled earlier as the stock from which the ring is machined.

For this tutorial, nothing needs to be changed under the Post Process Tab. This is
where you could name the program as well as naming the WCS offset if desired.

When finished with the setup, select Ok to save and close the setup.

28
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

3 Tool Paths: Generating machinable files

The Pocket NC mill is operated by giving it a set of directions, called a toolpath, that is
encoded in a machine control language called G-code. These instructions include
spindle speed, coordinate positions, and speed of movement between those positions.
Since it is difficult to write complex machine codes by hand, the toolpaths are created in
the Computer Aided Machining (CAM) environment of Fusion 360 then converted to
machine code that the Pocket NC mill is designed to execute using a processor. This is
similar to the process of writing and compiling programs in other computer languages.

Programs are written in a sequential series of steps, called operations. Each operation
contains one toolpath. Each toolpath uses a specific tool and accomplishes a different
machining process such as roughing, facing, or drilling. Each operation has a unique set
of conditions including spindle speed, surface speed, and feed rate. These parameters
are changed depending on the machining operation being performed, the tool being
used, the material being cut, and the surface finish that is desired.

When a program is run on the Pocket NC mill, tools may have to be changed or the
work may have to be repositioned in between operations.

The wax ring shown in the following tutorial will use the following parameters:

Material:
Machinable Wax
Diameter 1.5 Height 1
The wax ring test part is designed to be cut from wax using the Pocket NC mill. Without
changing the parameters, harder materials may cause damage to the Pocket NC mill as
feeds and speeds have been selected specific to wax.

Runtime:
~1 hour

Tooling:
The ring will be cut using the shank tools made by Harvey Tool and available from
Pocket NC. The specific tools required are a inch 2 flute end mill and a 1/32 inch ball
nose end mill.

Tool Number 6
inch 2 flute flat 45 deg helix (Harvey Tool # 24208)

29
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

http://www.pocketnc.com/45-degree-square-helix/18th-inch-45-degree-square-helix-2-flu
te

Tool number 12
.031 inch 2 flute 2 deg ball nose (Harvey Tool #29831)
http://www.pocketnc.com/tapered-rib-cutters/10-degree-164th-tapered-rib-cutter

Fixture:
The wax should be held in the Pocket NC vise using threaded set screws to grip the
sides of the wax blank.

Before the toolpaths can be generated, the Pocket NC Tool Library needs to be
downloaded. To install the new tool library, select Manage then Tool Library.

Next, under Libraries select Local then Library. Now use the Import tab to select
the Pocket NC Tool Library from your downloads location. Close the window to save
changes and exit the library manager.

The first step in machining the ring is removing the bulk of the excess material. Adaptive
toolpaths are efficient for removing excess material because they keep the cutting tool in
contact with the work as much as possible and minimize the number of amount of time needed
to hog out rough shapes. To create the first toolpath, select 3D then Adaptive Clearing.

30
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

Operation 1: Adaptive Clear Top

The first operation uses adaptive clearing to remove as much of the material as possible
in an efficient manner. Start by selecting 3D tab in and then click on Adaptive Clearing.

A dialog box will open where the parameters for the toolpath are entered. The first
parameter to be set is the tool. Click on the Select button under the tool tab. This
allows a tool to be chosen from the tool library. Scroll all the way to the bottom of the list
of tools and select tool 6, inch flat 45 deg. end mill, out of the Local Library which is
the Pocket NC tool library.

31
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

Adjust the setting under the tool tab so that they match the ones in the image below. The
spindle speed and feed rates are selected based upon the size and type of cutter being
used as well as the type of material being cut. See this tutorial on the Pocketnc website
for more information about the selecting the right feed and speed for your material and
cutter. These feeds and speeds are for machining wax using the inch flat end mill.
Milling different materials or using a different cutter would require changing these
parameters.

32
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

Click the geometry tab and update it to match the settings shown below. The Stock
Contour check box is selected. This lets the program use the geometry of the round
block, which was defined as stock earlier to define the toolpaths. Because the cylinder
was selected as the stock in the setup, it does not need to be selected again here.

Make sure that the Rest Machining check box is selected. The settings below should
be the default options once it is selected.

Select Tool Orientation. Change the orientation type to Z axis/plane & X axis. Select
Geometry on the vise so that the orientation of the tool matches what is shown. It is
critical that this orientation be correct since the post processor uses the work coordinate
system and the tool orientation to drive the A and B rotary axis movements.

Click Model then select the ring and the three supports as the model surfaces. A simple
way to do this is to click the Model Surfaces button then select the appropriate bodies
from the browser. The selected surfaces highlight in blue once they are chosen.

33
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

Next, select the Heights tab to set the top, bottom, retract and clearance heights.
These heights define the space in which the tool is allowed to operate. The retract plane
defines the height to which the tool is retracted during drilling or pocketing operations.
The clearance plane is the height to which the tool must be retracted before rapid
movements or rotation of the tables is allowed. These planes must be selected
appropriately so that collisions are avoided.

The top plane is used to define the top surface of the material being milled. The bottom
plane is used to define how far below the bottom plane of the part the tool will be allowed
34
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

to cut. The bottom plane of the part is used as a reference for the bottom plane
offset. The bottom plane is defined so that the tool stays above screws on the vise. This
avoids collisions as well as makes sure that enough stock remains for the the vise to grip
securely.

The planes are shown below, top to bottom in the figure: clearance, retract, top, and
bottom planes in orange, green, light blue, and dark blue respectively.

Next, the tool pass settings are defined. These settings control how closely to the model
the geometry will be cut, how deep of cuts to make, and how much material to engage in
each pass. In this example, the optimal load is increased from the default setting, the
maximum stepdown and final stepdown, amount of stock left, and smoothing tolerance
are all reduced from the default values.

When the adaptive toolpath is used, Fusion calculates a toolpath that keeps load on the
cutter constant. This increases efficiency and reduces tool wear. The maximum
stepdown is the depth of each pass. This program will take steps of 0.17 inches and
then finish with a pass 0.02 inches deep.

For a roughing operation the optimal load on the cutter is about 60% of its diameter. This
helps lengthen the tool life by allowing the tip of the cutter to engage the work at an
angle that increases its cutting efficiency and reduces wear.

The amount of stock left controls how much material is left for cleanup operations. It is
not desirable to remove all of the material with an adaptive clearing operation because

35
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

the surface finish will be poor. In general, to get a better surface finish the last
passes must be very light (low amounts of material removal) and the cutting direction
must be controlled more closely (different methods leave different marks on the finished
part). Adaptive clearing is good for removing lots of material efficiently, but it leaves a
poor surface finish that has to be cleaned up.

The model of the ring has lots of facets, but a smooth part is desired. Smoothing tells the
toolpath software to ignore sharp edges and corners below a specified radius and allows
the cutter path to not follow the contour of the part exactly. Smoothing is talked about in
more detail in the finishing operations.

Finally, under the linking tab, the angle of the helical ramp is increased to 10 degrees
and the radius of the helical ramp is decreased to be one half of the radius of the cutter
being used. Once the settings are correct, click ok to save and apply the settings.

36
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

Once the settings dialog is closed, Fusion will automatically generate a toolpath based
upon them. The bottom of the tree in the browser should now look like this (setup and
toolpath numbers may be different). The last item in the tree is the new toolpath.

37
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

Right click on the toolpath and select Simulate, when the new dialog box opens
select the Stock check box to show the stock. Use the controls at the bottom of the
window to control playback or to change the playback speed. The Info and Statistics
tabs on the Simulate dialog box can be used to view other information about the
program such as machining time and collision detection.

38
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

Operation 2: Adaptive Clear Side 1

The second and third operations use adaptive clearing to remove bulk material from the
sides and below the ring. As with Operation 1, start by selecting 3D tab and then click on
Adaptive Clearing.

Tool number 6 may already be selected. If it is not, hit the Select button and choose it
from the library as described in Operation 1. The settings may have auto populated from
the previous operation. Confirm that they match the ones shown below.

The geometry settings and the orientation of the WCS for this operation are shown
below. The machining boundary is the perimeter of the space in which the tool is allowed
to operate. Change the boundary type to Selection then choose the 1.6 x 0.5 inch
rectangle that was sketched earlier. Set tool containment to Tool Center on Boundary
and additional offset (the amount by which the tool is allowed to violate the perimeter) to
0 inches.

Click on the Rest Machining checkbox and choose From Previous Operations.

Orient the tool coordinate system as shown by selecting appropriate edges of the vise.

Select the ring, and the supports on the back and side that is being machined as the
model bodies.

39
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

Set up the heights as shown. The bottom is coplanar with the midline of the ring. It is
referenced from the world coordinate system origin.

40
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

The tool pass settings are shown below. The optimal load is set to about 25% of the
cutter diameter for this operation. This will cause the toolpaths to be less efficient at
material removal but it will keep the load on the tool low so that the finish is better and
prevent damage to the ring that is being machined. Since there will be cleanup passes
later, 0.02 inches of stock will be left.

The max stepdown is set to the 0.5 inches (the length of the flutes on the cutter)
because it allows the toolpaths to be more efficient. When the stock is repositioned the
Fusion software is not able to calculate correctly where the stock has already been
removed. Since the previous operation removed most of the material from the outside of
the ring there is nothing to machine near the outside of the stock. In order to avoid
wasteful toolpaths that only cut air, the large stepdown is used to skip over most of the
previously machined area as quickly as possible.

41
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

The settings for the linking are shown below. Most of these should be the default
settings. The Ramp type may have to be changed from helical to plunge. The No
Engagement Feed Rate will also need to be updated. These settings control how the
cutter is allowed to move when it is not engaged.

The toolpath is shown below. It clears the material from around the sides and
underneath the ring on one side. The next toolpath will do the same thing on the
opposite side of the ring.

42
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

The simulated toolpath is shown below. Note that this simulation is only of this
toolpath it does not include the previous operations. This will cause the Fusion to create
collision alerts. These collisions are with stock that has already been removed. This can
be confirmed by running the simulation on both operations. This will be done later. Take
note of the collision reports but as long as they are in places where the stock is removed
by the first operation they may be ignored for now.

Operation 3: Adaptive Clear Side 2

Operation 3 removes the material from the other side of the ring. It is the same as
Operation 2, just 180 opposite.

The tool settings for the Operation 3 are shown in the image below. The same tool,
number 6, (1\8 inch flat 45 helix) is used.

43
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

The geometry is setup as shown below. The rectangular sketch on the midplane of the
ring is selected as the machining boundary. The Tool Containment is set to Tool
center on boundary. The check box for Rest Machining is selected and the previous
operations are used to calculated the stock left to remove. Set the Tool Orientation so
that it matches what is shown by selecting appropriate edges on the vise as the X and Z
axes. The Model Surfaces are the ring, the support in the middle, and the support on
the side being machined. The model bodies are shown in the second image.

44
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

The heights are set as shown below. The bottom height is constrained to the model
origin, the retract and top heights are constrained to the stock top surface, and the
clearance height references the retract height.

45
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

The toolpath settings are adjusted as shown below. The optimal load is set to about
25% of the cutter diameter for this operation. This will cause the toolpaths to be less
efficient at material removal but it will keep the load on the tool low so that the finish is
better and prevent damage to the ring that is being machined. Since there will be
cleanup passes later, 0.02 inches of stock will be left.

The max stepdown is set to 0.5 inches (the length of the flutes on the cutter) because it
allows the toolpaths to be more efficient. When the stock is repositioned the Fusion
software is not able to calculate correctly where the stock has already been removed.
Since the previous operation removed most of the material from the outside of the ring
there is nothing to machine near the outside of the stock. In order to avoid wasteful
toolpaths that only cut air, the large stepdown is used to skip over most of the
previously machined area as quickly as possible.

The settings for the linking are shown below. Most of these should be the default
settings. The Ramp type may have to be changed from helical to plunge. The No

46
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

Engagement Feed Rate will also need to be updated. These settings control how
the cutter is allowed to move when it is not engaged.

The toolpath is shown below. It clears the material from around the sides and
underneath the ring on one side. This is the same thing Operation 2 did on the other side
of the ring.

47
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

The simulated toolpath is shown below. This is accessed by right clicking on the
toolpath in the browser, and selecting Simulate. Note that this simulation is only of this
toolpath it does not include the previous operations. This will cause the Fusion to create
collision alerts. These collisions are with stock that has already been removed. This can
be confirmed by running the simulation on both operations. This will be done later. Take
note of the collision reports but as long as they are in places where the stock is removed
by the first operation they may be ignored for now.

48
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

Operation 4: Adaptive Clear Setting

Operation 4 clears the bulk of the material away from the gem setting and prongs on the
ring. This is done with an adaptive toolpath that keeps a constant tool load in order to
remove the material efficiently. The tool is changed from the ones used in the previous
operations to Pocket NC tool number 12 (1/32 inch 2 taper). This will allow access to
smaller areas that that need to be milled.

The settings for the tool are shown below.

The toolpath geometry is set up as shown. The square that was sketched behind the
gemstone setting is selected as the machining boundary. The Tool Containment is set
as Tool center on boundary. The tool orientation is established as shown by selecting
appropriate edges on the vise as the X and Z axes. The model surface selection is the
ring. Select this by clicking the model surface selection tab and then selecting the
body of the ring out of the browser.

49
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

The heights are set up as shown below. The bottom plane is coincident with the back of
the gem setting and top plane is 0.1 inches inside the stock surface. In most cases the
top plane must lie outside of the stock surface, but since the material has been removed
already it is more efficient to let the tool rapid feed closer to the cutting depth.

50
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

The tool-pass settings are adjusted to the values shown. The optimal load is set to
about 60% of the tool diameter. The maximum and final step downs are smaller than the
ones used in previous operations. The amount of stock left is only 0.005 inches instead
of 0.02 inches as it has been with the previous several operations.

The linking settings are shown below. Most of these values should be the default
settings.

51
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

The toolpath and simulated toolpath are shown below. As with the previous two
operations, some collisions may be predicted. Verify that the collisions are only in areas
where the stock has already been removed by previous operations. If that is the case,
the collisions may be ignored.

52
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

The first four operations may now be simulated if desired. Simulating the toolpaths
is a good way to confirm that they are removing the material in the way that is expected
and desired. In order to simulate all four of the tool paths right click on the setup, then
select Simulate. When the simulation opens choose to display stock. There are several
options for toolpath display. In the image below the toolpaths are hidden so that the
workpiece can be seen.

53
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

Operation 5: Parallel Clear Top

Operation 5 will be used to clear the stock that was left behind by the adaptive clearing
on the top of the ring. The type of toolpath that will be used is parallel. This will cut using
straight lines that are parallel to the Y axis of the machine and perpendicular to the X
axis. The contour of the part will be followed in the Z axis.

This toolpath is chosen in order to minimize the force being placed onto the prongs of
the setting as well as to create a good surface finish on the top of the part.

The same tool used in the previous operation, 1/32 inch 2 taper (Tool number 12) is
used for this operation. The tool settings are shown in the image below.

The geometry settings are the next thing to be adjusted. The Machining Boundary is
set as a Bounding Box. This allows Fusion to auto-generate a box that bounds the
model geometry being machined. The Tool Containment method is selected as Tool
outside box. The Contact Only check box is selected in order to allow the toolpaths to

54
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

skip over the hole in the center of the ring. The tool orientation is established by
selecting edges of the vise as the X and Z axes. The ring is chosen from the browser as
the model surface to be machined.

The heights are set as shown below. The bottom height is set so that it is just below the
bottom of the ring as shown in the second image below. Due to the limited length of the
tool being used (0.75 overall) the the toolholder will collide with the part if the bottom
plane is more than the tool stickout below the highest point on the part.

55
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

The tool pass settings are shown below. Note that the tolerance is tighter than it has
been for previous operations. The pass direction controls the way which the ring is cut.
The settings shown will start at the tips of the prongs and work back toward the ring. This
is desirable because it means there is more material on the prongs to support the cutting
forces when the tips are being milled. Cutting the opposite direction runs a greater risk of
breaking the the prongs off.

56
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

The stepover is very small in order to produce a good surface finish and the level of
detail desired. If the finished product is rougher than desired this value may be further
reduced at the expense of a larger file size and longer machining time.

The smoothing tolerance is used to allow Fusion to ignore some of the irregularities on
the surface of the ring due to it being a multi-surface body. Because the ring is made up
of about 11,000 triangular facets, its surface is far from smooth. The smoothing tolerance
allows the tool to follow a path with a specified minimum radius instead of having to
follow every contour on the surface.

The linking settings are the final settings to adjust before generating and simulating the
toolpath. All of the settings below should be the defaults.

57
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

The parallel toolpath is shown below. The simulation of just the parallel toolpath is shown
in the second image. The third image is the simulation of the first five toolpaths.

58
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

59
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

Operation 6: Scallop Side 1

Operation 6 is a scalloping path that removes the material left on the sides of the ring
which was roughed by the adaptive clearing. The scalloping method creates toolpaths
that are a constant distance apart. This allows the a good surface finish to be created on
on complex curves and in areas that cannot be easily reached by other types of
toolpaths like contour or parallel. Once again, tool number 12 is used. The tool settings
are shown below.

The geometry settings are shown below. The Machining Boundary chosen is
Silhouette. This allows Fusion to calculate the boundary based on the silhouette of the
part. The contact only and machine areas using boundaries buttons are selected.
This will keep the toolpaths that are generated in contact with the part.

Set the tool orientation so that it matches the image below. Select appropriate edges on
the vise as the X and Z axes in order to orientate it. Choose the ring out of the browser
as the model surface to be machined.

60
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

The heights are set as shown. Both the top height and the retract height are set to be
within the stock envelope because the material in that area has been removed so
collisions will not take place.

The tool pass settings are shown below. Note that the tolerance is the same as the one
on previous operation and the tighter than the ones used for the clearing operations.

61
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

The stepover is very small in order to produce a good surface finish and the level of
detail desired. If the finished product is rougher than desired this value may be further
reduced at the expense of a larger file size and longer machining time.

The smoothing tolerance is used to allow Fusion to ignore some of the irregularities on
the surface of the ring due to it being a multi-surface body. Because the ring is made up
of about 11,000 triangular facets, its surface is far from smooth. The smoothing tolerance
allows the tool to follow a path with a specified minimum radius instead of having to
follow every contour on the surface.

The linking settings are the final settings to adjust before generating and simulating the
toolpath. All of the settings below should be the defaults except for changing the
retraction policy to Minimum retraction instead of Full Retraction.

62
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

The toolpath and simulation are shown in the two images below.

63
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

Operation 7: Scallop Side 2

Operation 7 is a mirror of Operation 6to clean up the other side of the ring. Again it uses
a scalloping toolpath to remove the last 0.02 inches of material. The goal is to clean up
the surface and leave a good finish.

The tool settings are shown below. Pocket NC tool number 12 is used for this toolpath.

64
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

The geometry settings are shown in the figure below. The Machining Boundary chosen
is Silhouette. This allows Fusion to calculate the boundary based on the silhouette of
the part. The contact only and machine areas using boundaries buttons are selected.
This will keep the toolpaths that are generated in contact with the part.

Set the tool orientation so that it matches the image below. Select appropriate edges on
the vise as the X and Z axes in order to orientate it. Choose the ring out of the browser
as the model surface to be machined.

65
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

The heights are set as shown below. Both the top height and the retract height are set to
be within the stock envelope because the material in that area has been removed so
collisions will not take place.

The tool pass settings are shown below. Note that the tolerance is the same as the one
on previous two operations and the tighter than the ones used for the clearing

66
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

operations. The stepover is very small in order to produce a good surface finish and
the level of detail desired. If the finished product is rougher than desired this value may
be further reduced at the expense of a larger file size and longer machining time.

The smoothing tolerance is used to allow Fusion to ignore some of the irregularities on
the surface of the ring due to it being a multi-surface body. Because the ring is made up
of about 11,000 triangular facets, its surface is far from smooth. The smoothing tolerance
allows the tool to follow a path with a specified minimum radius instead of having to
follow every contour on the surface.

The linking settings are the final settings to adjust before generating and simulating the
toolpath. All of the settings below should be the defaults except for changing the
retraction policy to Minimum retraction instead of Full Retraction.

67
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

The toolpath and simulation are shown in the two images below.

68
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

69
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

Operation 8: Radial Clear Setting

The second to last operation is to clean out the stone setting and remove the last bit of material
(about 0.05 inches) from the prongs and setting. The type of toolpath used is radial. All the cuts
will start from a center point and proceed outward. These angular distance between each cut is
constant. Tool #12 will be used for this operation. The tools settings are shown below.

The geometry settings are adjusted next. The centerpoint of the circular hole at the back
of the setting is used as the point from which all the cuts start. The Contact Only button
is selected which allows the toolpaths to skip over the areas that have already been
machined.

Set the tool orientation so that it matches what is shown below by selecting appropriated
edges on the vise as the X and Z reference plane. Select the ring as the body to be
machined.

70
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

Next, the heights are set as shown below. Both the top height and the retract height are
set to be within the stock envelope because the material in that area has been removed
so collisions will not take place.

71
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

The tool pass settings are shown below. Note that the tolerance is the same as the one
on the previous three operations and tighter than the ones used for the clearing
operations. The stepover is very small in order to produce a good surface finish and the
level of detail desired. If the finished product is rougher than desired this value may be
further reduced at the expense of a larger file size and longer machining time.

The smoothing tolerance is used to allow Fusion to ignore some of the irregularities on
the surface of the ring due to it being a multi-surface body. Because the ring is made up
of about 11,000 triangular facets, its surface is far from smooth. The smoothing tolerance
allows the tool to follow a path with a specified minimum radius instead of having to
follow every contour on the surface.

72
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

The linking settings are the final settings to adjust before generating and simulating the toolpath.
All of the settings below should be the defaults.

The toolpath and simulation are shown below.

73
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

74
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

4 Generating G-code from toolpaths: Post processing

The Pocket NC mill cant run directly off the toolpaths produced by Fusion 360. In order
to make them useable they have to be converted into code that the mill can read, called
G-code. The conversion between the toolpaths generated by CAM software and G-code
is called Post Processing.

Most CNC machines have slight differences in the format of the code as well as how
certain commands are encoded. This requires each type of CNC machine to have its
own post processor that creates G-code that can be read by that particular machine.

The Pocket NC post processor in Fusion 360 automatically creates the code to orientate
the A and B rotary axes based upon the tool orientation defined for each operation and
the work coordinate system that defines the machine orientation. The post processor
also automatically places a pause at the start of each program as well as between
operations if the tool is changed. For example if this part was processed into one code
file, there would be a pause at the start of the program as well as a pause between
operations 3 and 4 when the tool changes from the inch end mill to the 1/32 inch end
mill.

This part could be written in one file by clicking on the Actions tab in the CAM toolbar
and selecting Post Process. Select the pocket nc.cps - Generic Pocket NC post
processor out of the list. It can be located quickly from the long list of post processors
supported by Fusion 360 by beginning to type the name into the processor selection
window. Fusion then will prompt for a filename and location to which the file will be
saved. Any file name may be used, but it must end with .ngc because that is the only
file extension that the Pocket NC software can use.

75
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

While the ring may be saved as one program file, it is recommended to use as separate
program for each tool. For the ring, this will mean two programs; one for the first three
operations with the inch end mill and another program for the last 5 operations done
with the 1/32 inch end mill.

Right click on the set up in the browser tree. Select Post Process.

76
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

Choose the pocket nc.cps - Generic Pocket NC post processor. The name of the
program may be changed if desired. Comments may be added if desired. Click OK.

Choose where to save the NC file, and what name to use then click Save. The filename
must end in .ngc because that is the file extension that the Pocket NC mill uses.

77
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

The NC file can be viewed and edited with Brackets if you are using a Mac, or Notepad
on PC.

The NC code is now ready to be used in your Pocket NC mill. It is recommended that
you save the file to a flashdrive (USB memory stick) and plug the flashdrive directly into
the mill. The file can be loaded and run from there using Machine Kit.

78
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

Set the tool length offsets, load the stock, and home all axes on the mill. Plug the
flashdrive with the ring-code on it into the Pocket NC mill if you have not already done
so. In Machine Kit, click File => Open then navigate to the media folder on the
beaglebone. Use the back arrow button in the upper right hand corner of the window to
navigate back through the directory. Open the flash drive, select the ring file, and click
open.

Push the play button in Machine Kit to start the program. The first line in the code is a
pause so you will need to immediately push the yellow pause button on the mill or the
pause button in Machine Kit in order to start the program.

This concludes the tutorial on how to program the wax ring for machining on the Pocket
NC mill. Thanks for reading.

Happy milling!

79
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

Quick Reference
Material:
Wax Cylinder:
Diameter: 1.5 inches Height: 1 inch

The wax ring test part is designed to be cut from wax using the Pocket NC mill. Harder
materials may cause damage to the Pocket NC mill as feeds and speeds have been selected
specific to wax.

Runtime:
~1 hour

Tooling:
Tool number 6
inch 2 flute flat 45 deg helix (Harvey Tool # 24208)
http://www.pocketnc.com/45-degree-square-helix/18th-inch-45-degree-square-helix-2-flu
te

Tool number 12
.031 inch 2 flute 2 deg ball nose (Harvey Tool #29831)
http://www.pocketnc.com/tapered-rib-cutters/10-degree-164th-tapered-rib-cutter
Fixture:
Wax should be held in the Pocket NC vise using threaded set screws to grip the sides of
the wax blank.

80
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

81
Test Ring
Wax ring test part
Rev A 1/15/17
http://www.pocketnc.com

Notes:
Starting the Program
Set the tool length offsets, load the stock, and home all axes on the mill. Plug the
flashdrive with the ring-code on it into the Pocket NC mill if you have not already done
so. In Machine Kit, click File => Open then navigate to the media folder on the
beaglebone. Use the back arrow button in the upper right hand corner of the window to
navigate back through the directory. Open the flash drive, select the ring file, and click
open.

Push the play button in Machine Kit to start the program. The first line in the code is a
pause so you will need to immediately push the yellow pause button on the mill or the
pause button in Machine Kit in order to start the program.

Tool changes

The wax ring uses only two tools. The first tool (number 6) should be loaded before
starting the program. The second tool (number 12) is loaded after tool number 6 has
completed its operations and has come to stop in the tool change position. Tools are
installed and uninstalled using the green handled 3mm hex tool. NOTE, a sufficient
whack may be required at the base of the tool holder to remove tooling. Use the back of
the green 3mm hex tool for this.

Workholding

The material should be held tight using the Pocket NC vise with M4 set screws. Use the
provided 5mm wrench to tighten the vise jaw.

82
GUIA DE USO FRESADORA DE ESCRITORIO POCKETNC

Recopilado por Ulises Rodrguez cnc@avancort.com Julio/2017


GUIA DE USO FRESADORA DE ESCRITORIO POCKETNC

https://groups.google.com/forum/#!forum/pocket-nc

Recopilado por Ulises Rodrguez cnc@avancort.com Julio/2017


GUIA DE USO FRESADORA DE ESCRITORIO POCKETNC

http://www.pocketnc.com/s/SoftwareSetupPC.pdf

http://www.pocketnc.com/s/SoftwareSetupforMac.pdf

Recopilado por Ulises Rodrguez cnc@avancort.com Julio/2017


GUIA DE USO FRESADORA DE ESCRITORIO POCKETNC

Recopilado por Ulises Rodrguez cnc@avancort.com Julio/2017


Alignement test PocketNC N260 G2 X-0.6924 Y-1.8308 I0.0359 J0.0869
% N265 X-0.7019 Y-1.304 I5.4383 J0.3611
(1) N270 G1 Y1.785
N10 G20 N275 G2 X-0.5769 Y1.8456 I0.1152 J-0.0785
N15 G90 G94 G40 G17 G91.1 N280 X-0.1358 Y1.8519 I0.3125 J-6.4356
N20 G53 G0 Z0. N285 G1 X0.6304
(2D ADAPTIVE2) N290 G2 X0.6944 Y1.7371 I-0.0534 J-0.105
N25 M9 N295 X0.7019 Y1.2838 I-5.7032 J-0.3207
N30 G49 N300 G1 Y-1.7807
N35 M5 N305 G2 X0.5867 Y-1.8444 I-0.1056 J0.0549
N40 G53 G0 X2.5 Y2.5 N310 X0.1334 Y-1.8519 I-0.3207 J5.7318
N45 M0 N315 G1 X-0.5653
N50 T10 M6 N320 G2 X-0.6257 Y-1.727 I0.0779 J0.1147
(SINGLE FLUTE) N325 X-0.6319 Y-1.2858 I6.5384 J0.3123
N55 S8500 M3 N330 G1 Y1.7113
N60 G54 G0 N335 G2 X-0.5217 Y1.7734 I0.1076 J-0.062
N65 A90. B0. N340 X-0.0562 Y1.7819 I0.3298 J-5.3366
N70 M9 N345 G1 X0.5567
N80 G0 X-0.8581 Y-2.1134 N350 G2 X0.6236 Y1.6699 I-0.0448 J-0.1027
N85 G43 Z1.55 H10 N355 X0.6319 Y1.2289 I-5.0241 J-0.3146
N90 G0 Z0.775 N360 G1 Y0.8856
N95 G1 Z0.7625 F30. N365 Y-1.7131
N100 X-0.858 Y-2.1131 Z0.7597 N370 G2 X0.5078 Y-1.7751 I-0.1151 J0.0753
N105 X-0.8578 Y-2.1122 Z0.7571 N375 X0.0789 Y-1.7819 I-0.3064 J5.8084
N110 X-0.8574 Y-2.1108 Z0.7547 N380 G1 X-0.4911
N115 X-0.8569 Y-2.1088 Z0.7527 N385 G2 X-0.5542 Y-1.6656 I0.0601 J0.1079
N120 X-0.8563 Y-2.1065 Z0.7512 N390 X-0.5619 Y-1.2122 I5.6055 J0.3213
N125 X-0.8557 Y-2.104 Z0.7503 N395 G1 Y-0.377
N130 X-0.855 Y-2.1013 Z0.75 N400 G2 X-0.5725 Y-0.2962 I0.4965 J0.1064
N135 G3 X-0.8494 Y-2.0624 I-0.1766 J0.0452 N405 G1 Y0.2962
N140 X-0.8419 Y-1.5585 I-6.2546 J0.3451 N410 G3 X-0.5619 Y0.8509 I-5.5057 J0.3829
N145 G1 Y1.9412 N415 G1 Y1.6354
N150 G2 X-0.7153 Y1.9881 I0.112 J-0.1079 N420 G2 X-0.4629 Y1.7015 I0.0968 J-0.0379
N155 X-0.2373 Y1.9919 I0.3109 J-9.0948 N425 X0.0147 Y1.7119 I0.3384 J-4.5676
N160 G1 X0.7924 N430 G1 X0.4928
N165 G2 X0.8382 Y1.8646 I-0.1136 J-0.1127 N435 G2 X0.5549 Y1.5877 I-0.0761 J-0.1157
N170 X0.8419 Y1.3743 I-9.5546 J-0.3169 N440 X0.5619 Y1.1343 I-6.1883 J-0.3219
N175 G1 Y-1.9415 N445 G1 Y0.3866
N180 G2 X0.7151 Y-1.9881 I-0.1122 J0.1094 N450 X0.5725 Y0.2962
N185 X0.2371 Y-1.9919 I-0.3109 J9.1529 N455 Y-0.2962
N190 G1 X-0.7252 N460 G3 X0.5619 Y-0.8509 I5.5057 J-0.3829
N195 G2 X-0.7669 Y-1.8509 I0.1262 J0.1141 N465 G1 Y-1.6354
N200 X-0.7719 Y-1.5563 I3.3694 J0.2038 N470 G2 X0.4629 Y-1.7015 I-0.0969 J0.0381
N205 G1 Y-1.3357 N475 X-0.0147 Y-1.7119 I-0.3384 J4.5662
N210 Y1.8576 N480 G1 X-0.4193
N215 G2 X-0.6522 Y1.9158 I0.1089 J-0.0717 N485 G2 X-0.4838 Y-1.5967 I0.0562 J0.1071
N220 X-0.1621 Y1.9219 I0.338 J-7.4806 N490 X-0.4919 Y-1.1557 I5.1589 J0.3149
N225 G1 X0.7083 N495 G1 Y-0.5247
N230 G2 X0.7659 Y1.8016 I-0.0744 J-0.1095 N500 Y-0.4997 F7.5
N235 X0.7719 Y1.3728 I-6.3189 J-0.3028 N505 G2 X-0.5629 Y-0.3726 I0.3273 J0.2664 F30.
N240 G1 Y-1.8573 N510 G1 X-0.564 Y-0.3702
N245 G2 X0.6525 Y-1.9158 I-0.1085 J0.0703 N515 X-0.5655 Y-0.3681
N250 X0.1624 Y-1.9219 I-0.3379 J7.4486 N520 X-0.5675 Y-0.3664
N255 G1 X-0.6344 N525 X-0.5698 Y-0.3651
N530 X-0.5723 Y-0.3644 N800 X0.5705 Y-0.4175 Z0.7571
N535 X-0.5749 Y-0.3642 N805 X0.5691 Y-0.4181 Z0.7547
N540 X-0.5775 Y-0.3645 N810 X0.5673 Y-0.4189 Z0.7527
N545 X-0.58 Y-0.3654 N815 X0.5651 Y-0.4199 Z0.7512
N550 X-0.5823 Y-0.3669 N820 X0.5627 Y-0.4209 Z0.7503
N555 X-0.5842 Y-0.3687 N825 X0.5601 Y-0.422 Z0.75
N560 X-0.5851 Y-0.3707 Z0.7502 N830 G3 X0.5291 Y-0.4461 I0.0315 J-0.0726
N565 X-0.5859 Y-0.3726 Z0.7508 N835 X0.4534 Y-0.538 I3.7017 J-3.1291
N570 X-0.5867 Y-0.3743 Z0.7517 N840 X0.4378 Y-0.5575 I3.7774 J-3.0372 F7.5
N575 X-0.5869 Y-0.3765 Z0.7532 N845 X0.4219 Y-1.0615 I3.4255 J-0.3604 F30.
N580 X-0.5867 Y-0.3779 Z0.7547 N850 G1 Y-1.5028
N585 X-0.5865 Y-0.379 Z0.7564 N855 G2 X0.2973 Y-1.5648 I-0.1166 J0.0781
N590 X-0.5864 Y-0.3798 Z0.7583 N860 X-0.2961 Y-1.5686 I-0.3406 J6.7573
N595 X-0.5863 Y-0.3804 Z0.7604 N865 X-0.3458 Y-1.3477 I0.2281 J0.1674
N600 X-0.5862 Y-0.3805 Z0.7625 N870 X-0.3519 Y-1.0036 I3.0588 J0.2259
N605 G0 Z1.15 N875 G1 Y-0.6236
N610 X0.5936 Y-0.2783 N880 G3 X-0.3495 Y-0.5879 I-0.052 J0.0214
N615 Z0.775 N885 X-0.361 Y-0.5659 I-0.0543 J-0.0143 F7.5
N620 G1 Z0.7625 F30. N890 G2 X-0.4311 Y-0.5384 I0.1319 J0.4402 F30.
N625 X0.5934 Y-0.2786 Z0.7597 N895 G1 X-0.4338 Y-0.5378
N630 X0.5928 Y-0.2793 Z0.7571 N900 X-0.4365 Y-0.5376
N635 X0.5919 Y-0.2805 Z0.7547 N905 X-0.4391 Y-0.5381
N640 X0.5907 Y-0.282 Z0.7527 N910 X-0.4416 Y-0.5391
N645 X0.5892 Y-0.2839 Z0.7512 N915 X-0.4439 Y-0.5406
N650 X0.5876 Y-0.286 Z0.7503 N920 X-0.4457 Y-0.5426
N655 X0.5858 Y-0.2881 Z0.75 N925 X-0.4471 Y-0.5449
N660 G3 X0.57 Y-0.3241 I0.0622 J-0.049 N930 X-0.448 Y-0.5474
N665 G2 X0.5198 Y-0.468 I-0.4344 J0.0708 N935 X-0.4483 Y-0.5501
N670 X0.5069 Y-0.4894 I-0.3842 J0.2147 F7.5 N940 X-0.448 Y-0.5528
N675 G3 X0.4919 Y-1.0529 I3.8529 J-0.3849 F30. N945 X-0.4471 Y-0.5547 Z0.7502
N680 G1 Y-1.5677 N950 X-0.4462 Y-0.5565 Z0.7508
N685 G2 X0.3779 Y-1.6335 I-0.1059 J0.0518 N955 X-0.4453 Y-0.5583 Z0.7517
N690 X-0.0876 Y-1.6419 I-0.3304 J5.4248 N960 X-0.4439 Y-0.5594 Z0.7529
N695 G1 X-0.3328 N965 X-0.4427 Y-0.5603 Z0.7545
N700 G2 X-0.4091 Y-1.555 I0.0091 J0.085 N970 X-0.4417 Y-0.5611 Z0.7563
N705 X-0.4219 Y-1.0776 I3.7699 J0.3399 N975 X-0.441 Y-0.5616 Z0.7583
N710 G1 Y-0.5778 N980 X-0.4405 Y-0.5619 Z0.7604
N715 Y-0.5528 F7.5 N985 X-0.4403 Z0.7625
N720 G3 X-0.4859 Y-0.4986 I-0.1827 J-0.1509 F30. N990 G0 Z1.15
N725 X-0.5058 Y-0.5079 I-0.0074 J-0.0101 N995 X0.5253 Y-0.4905
N730 G1 Y-0.5087 N1000 Z0.775
N735 X-0.5053 Y-0.5108 Z0.7504 N1005 G1 Z0.7625 F30.
N740 X-0.5048 Y-0.5128 Z0.7511 N1010 X0.5249 Z0.7597
N745 X-0.5043 Y-0.5147 Z0.7522 N1015 X0.524 Y-0.4906 Z0.7571
N750 X-0.503 Y-0.5162 Z0.7538 N1020 X0.5225 Y-0.4908 Z0.7547
N755 X-0.502 Y-0.5174 Z0.7559 N1025 X0.5206 Y-0.491 Z0.7527
N760 X-0.5013 Y-0.5183 Z0.7583 N1030 X0.5182 Y-0.4913 Z0.7512
N765 X-0.5009 Y-0.5187 Z0.7604 N1035 X0.5156 Y-0.4916 Z0.7503
N770 X-0.5007 Y-0.5188 Z0.7625 N1040 X0.5128 Y-0.4919 Z0.75
N775 G0 Z1.15 N1045 G3 X0.4762 Y-0.5061 I0.0093 J-0.0786
N780 X0.5716 Y-0.4171 N1050 X0.3647 Y-0.6252 I0.1041 J-0.2093
N785 Z0.775 N1055 X0.3519 Y-1.116 I4.2777 J-0.3569
N790 G1 Z0.7625 F30. N1060 G1 Y-1.4286
N795 X0.5713 Y-0.4172 Z0.7597 N1065 G2 X0.2369 Y-1.4935 I-0.1074 J0.0559
N1070 X-0.2222 Y-1.4996 I-0.2874 J4.3783 N1340 X0.4179 Y-0.5667 Z0.7527
N1075 X-0.2784 Y-1.3305 I0.1748 J0.152 N1345 X0.4157 Y-0.566 Z0.7512
N1080 X-0.2865 Y-0.6101 I36.0117 J0.7633 N1350 X0.4131 Y-0.5652 Z0.7503
N1085 Y-0.5851 I36.0198 J0.0429 F7.5 N1355 X0.4105 Y-0.5644 Z0.75
N1090 G3 X-0.315 Y-0.5712 I-0.0244 J-0.0138 F30. N1360 G3 X0.3712 Y-0.5629 I-0.0226 J-0.0758
N1095 G1 X-0.3562 Y-0.5657 N1365 X0.2302 Y-0.7067 I-0.0078 J-0.1334
N1100 G3 X-0.3685 Y-0.5839 I-0.0012 J-0.0124 N1370 X0.2169 Y-1.1718 I2.089 J-0.2926
N1105 G1 X-0.3671 Y-0.5855 Z0.7502 N1375 G1 X0.2119 Y-1.2887
N1110 X-0.3657 Y-0.587 Z0.7508 N1380 G2 X0.1153 Y-1.3508 I-0.0967 J0.0444
N1115 X-0.3645 Y-0.5885 Z0.7517 N1385 X-0.0858 Y-1.3585 I-0.1371 J0.9419
N1120 X-0.3628 Y-0.5892 Z0.7529 N1390 X-0.1358 Y-1.1376 I0.2278 J0.1677
N1125 X-0.3614 Y-0.5897 Z0.7545 N1395 X-0.148 Y-0.6099 I28.6515 J0.9276
N1130 X-0.3602 Y-0.5902 Z0.7563 N1400 G3 X-0.1701 Y-0.5725 I-0.0328 J0.0058
N1135 X-0.3594 Y-0.5905 Z0.7583 N1405 G1 X-0.2367
N1140 X-0.3588 Y-0.5906 Z0.7604 N1410 G3 X-0.2465 Y-0.5921 I0.0004 J-0.0125
N1145 X-0.3586 Z0.7625 N1415 G1 X-0.2449 Y-0.5935 Z0.7502
N1150 G0 Z1.15 N1420 X-0.2434 Y-0.5949 Z0.7508
N1155 X0.4789 Y-0.5373 N1425 X-0.2419 Y-0.5962 Z0.7517
N1160 Z0.775 N1430 X-0.24 Y-0.5966 Z0.7531
N1165 G1 Z0.7625 F30. N1435 X-0.2384 Y-0.597 Z0.7549
N1170 X0.4785 Z0.7597 N1440 X-0.2371 Y-0.5973 Z0.7569
N1175 X0.4776 Y-0.5371 Z0.7571 N1445 X-0.2363 Y-0.5975 Z0.7592
N1180 X0.4762 Y-0.5369 Z0.7547 N1450 X-0.2359 Z0.7608
N1185 X0.4742 Y-0.5367 Z0.7527 N1455 X-0.2358 Z0.7625
N1190 X0.4718 Y-0.5364 Z0.7512 N1460 G0 Z1.15
N1195 X0.4692 Y-0.536 Z0.7503 N1465 X0.369 Y-0.5816
N1200 X0.4665 Y-0.5356 Z0.75 N1470 Z0.775
N1205 G3 X0.4275 Y-0.5402 I-0.0105 J-0.0784 N1475 G1 Z0.7625 F30.
N1210 X0.3096 Y-0.6248 I0.029 J-0.1648 N1480 X0.3687 Y-0.5815 Z0.7597
N1215 X0.2835 Y-1.0025 I1.4079 J-0.2873 N1485 X0.3679 Y-0.5812 Z0.7571
N1220 G2 X0.2763 Y-1.3756 I-9.9741 J0.0057 N1490 X0.3665 Y-0.5806 Z0.7547
N1225 X0.1062 Y-1.4286 I-0.1528 J0.1909 N1495 X0.3647 Y-0.5798 Z0.7527
N1230 X-0.1616 Y-1.4276 I-0.1248 J2.429 N1500 X0.3625 Y-0.5789 Z0.7512
N1235 X-0.2066 Y-1.1769 I0.3256 J0.1877 N1505 X0.3601 Y-0.5778 Z0.7503
N1240 X-0.217 Y-0.6003 I30.7986 J0.8471 N1510 X0.3575 Y-0.5767 Z0.75
N1245 G3 X-0.2367 Y-0.5725 I-0.0229 J0.0047 N1515 G3 X0.3187 Y-0.5707 I-0.0312 J-0.0727
N1250 G1 X-0.2962 N1520 G1 X0.3097 Y-0.5695
N1255 X-0.3017 Y-0.5724 N1525 X0.3006 Y-0.5689
N1260 G3 X-0.3119 Y-0.5918 I0.0002 J-0.0125 N1530 X0.2915 Y-0.569
N1265 G1 X-0.3103 Y-0.5933 Z0.7502 N1535 X0.2825 Y-0.5697
N1270 X-0.3088 Y-0.5947 Z0.7508 N1540 X0.2735 Y-0.571
N1275 X-0.3073 Y-0.596 Z0.7517 N1545 X0.2646 Y-0.5729
N1280 X-0.3052 Y-0.5965 Z0.7533 N1550 X0.2558 Y-0.5754
N1285 X-0.3035 Y-0.5969 Z0.7553 N1555 X0.2473 Y-0.5785
N1290 X-0.3022 Y-0.5972 Z0.7577 N1560 X0.239 Y-0.5822
N1295 X-0.3015 Y-0.5974 Z0.7603 N1565 X0.231 Y-0.5865
N1300 X-0.3013 Z0.7625 N1570 X0.2232 Y-0.5913
N1305 G0 Z1.15 N1575 X0.2159 Y-0.5966
N1310 X0.4224 Y-0.568 N1580 X0.2089 Y-0.6024
N1315 Z0.775 N1585 X0.2023 Y-0.6087
N1320 G1 Z0.7625 F30. N1590 X0.1962 Y-0.6154
N1325 X0.4221 Y-0.5679 Z0.7597 N1595 X0.1905 Y-0.6225
N1330 X0.4213 Y-0.5677 Z0.7571 N1600 X0.1854 Y-0.63
N1335 X0.4198 Y-0.5672 Z0.7547 N1605 X0.1807 Y-0.6379
N1610 X0.1767 Y-0.646 N1880 G3 X-0.0177 Y-0.5964 I-0.6027 J-0.0456
N1615 X0.1732 Y-0.6544 N1885 X-0.0247 Y-0.5724 I-0.5838 J-0.1566 F7.5
N1620 X0.1702 Y-0.663 N1890 G1 X-0.035 Y-0.5725 F30.
N1625 X0.1679 Y-0.6718 N1895 X-0.1027
N1630 X0.1662 Y-0.6807 N1900 G3 X-0.1125 Y-0.5921 I0.0004 J-0.0125
N1635 X0.1651 Y-0.6897 N1905 G1 X-0.1109 Y-0.5935 Z0.7502
N1640 X0.1646 Y-0.6988 N1910 X-0.1094 Y-0.5949 Z0.7508
N1645 X0.1647 Y-0.7079 N1915 X-0.1079 Y-0.5962 Z0.7517
N1650 G3 X0.1433 Y-1.0748 I1.6161 J-0.2785 N1920 X-0.106 Y-0.5966 Z0.7531
N1655 G1 X0.1446 Y-1.0937 N1925 X-0.1044 Y-0.597 Z0.7549
N1660 X0.1453 Y-1.1126 N1930 X-0.1031 Y-0.5973 Z0.7569
N1665 X0.1455 Y-1.1315 N1935 X-0.1023 Y-0.5975 Z0.7592
N1670 X0.145 Y-1.1504 N1940 X-0.1019 Z0.7608
N1675 X0.1441 Y-1.1693 N1945 X-0.1018 Z0.7625
N1680 X0.1426 Y-1.1881 N1950 G0 Z1.15
N1685 X0.1405 Y-1.2069 N1955 X0.2547 Y-0.59
N1690 X0.1378 Y-1.2256 N1960 Z0.775
N1695 X0.1346 Y-1.2443 N1965 G1 Z0.7625 F30.
N1700 G2 X-0.018 Y-1.2829 I-0.1256 J0.1753 N1970 X0.2544 Y-0.5898 Z0.7597
N1705 X-0.066 Y-1.0611 I0.2404 J0.1682 N1975 X0.2536 Y-0.5893 Z0.7571
N1710 G1 X-0.0693 Y-0.9098 N1980 X0.2523 Y-0.5886 Z0.7547
N1715 X-0.073 Y-0.7584 N1985 X0.2506 Y-0.5875 Z0.7527
N1720 X-0.0771 Y-0.6071 N1990 X0.2486 Y-0.5863 Z0.7512
N1725 G3 X-0.0842 Y-0.5884 I-0.0498 J-0.0081 N1995 X0.2463 Y-0.585 Z0.7503
N1730 X-0.102 Y-0.5713 I-0.0427 J-0.0268 F7.5 N2000 X0.2439 Y-0.5836 Z0.75
N1735 G1 X-0.1701 Y-0.5725 F30. N2005 G3 X0.2062 Y-0.5725 I-0.0404 J-0.068
N1740 G3 X-0.1799 Y-0.5921 I0.0004 J-0.0125 N2010 G1 X0.1945 Y-0.5715
N1745 G1 X-0.1783 Y-0.5935 Z0.7502 N2015 X0.1826 Y-0.5711
N1750 X-0.1767 Y-0.5949 Z0.7508 N2020 X0.1708 Y-0.5713
N1755 X-0.1753 Y-0.5962 Z0.7517 N2025 X0.159 Y-0.572
N1760 X-0.1734 Y-0.5966 Z0.7531 N2030 X0.1473 Y-0.5733
N1765 X-0.1717 Y-0.597 Z0.7549 N2035 X0.1356 Y-0.5751
N1770 X-0.1705 Y-0.5973 Z0.7569 N2040 X0.124 Y-0.5774
N1775 X-0.1696 Y-0.5975 Z0.7592 N2045 X0.1126 Y-0.5803
N1780 X-0.1693 Z0.7608 N2050 X0.1012 Y-0.5837
N1785 X-0.1692 Z0.7625 N2055 X0.0901 Y-0.5877
N1790 G0 Z1.15 N2060 X0.0792 Y-0.5921
N1795 X0.3147 Y-0.59 N2065 G3 X0.0566 Y-0.5725 I-0.0258 J-0.0068
N1800 Z0.775 N2070 X0.057 Y-0.5975 I0.0004 J-0.0125
N1805 G1 Z0.7625 F30. N2075 G1 X0.0574
N1810 X0.3144 Y-0.5898 Z0.7597 N2080 X0.1416 F40.
N1815 X0.3136 Y-0.5893 Z0.7571 N2085 X0.1421 F30.
N1820 X0.3123 Y-0.5886 Z0.7547 N2090 G3 X0.1425 Y-0.5725 I0. J0.0125
N1825 X0.3106 Y-0.5875 Z0.7527 N2095 G1 X-0.035
N1830 X0.3086 Y-0.5863 Z0.7512 N2100 G3 X-0.0448 Y-0.5921 I0.0004 J-0.0125
N1835 X0.3063 Y-0.585 Z0.7503 N2105 G1 X-0.0432 Y-0.5935 Z0.7502
N1840 X0.3039 Y-0.5836 Z0.75 N2110 X-0.0417 Y-0.5949 Z0.7508
N1845 G3 X0.2662 Y-0.5725 I-0.0404 J-0.068 N2115 X-0.0402 Y-0.5962 Z0.7517
N1850 X0.1666 Y-0.5847 I-0.0345 J-0.1315 N2120 X-0.0383 Y-0.5966 Z0.7531
N1855 X0.0812 Y-0.8052 I0.207 J-0.2069 N2125 X-0.0366 Y-0.597 Z0.7549
N1860 X0.0728 Y-1.1543 I3.2916 J-0.2541 N2130 X-0.0354 Y-0.5973 Z0.7569
N1865 G2 X0.0422 Y-1.1789 I-0.0269 J0.0021 N2135 X-0.0346 Y-0.5975 Z0.7592
N1870 X0.0194 Y-1.147 I0.0036 J0.0267 N2140 X-0.0342 Z0.7608
N1875 X0.0012 Y-0.7074 I1.7736 J0.2936 N2145 X-0.0341 Z0.7625
N2150 G0 Z1.15 N2420 G3 X-0.5291 Y0.4461 I-0.0315 J0.0726
N2155 X-0.5936 Y0.2783 N2425 X-0.4534 Y0.538 I-3.7017 J3.129
N2160 Z0.775 N2430 X-0.4378 Y0.5575 I-3.7774 J3.0372 F7.5
N2165 G1 Z0.7625 F30. N2435 X-0.4219 Y1.0615 I-3.4255 J0.3604 F30.
N2170 X-0.5934 Y0.2786 Z0.7597 N2440 G1 Y1.5028
N2175 X-0.5928 Y0.2793 Z0.7571 N2445 G2 X-0.2973 Y1.5648 I0.1166 J-0.0781
N2180 X-0.5919 Y0.2805 Z0.7547 N2450 X0.1438 Y1.5719 I0.3155 J-5.8928
N2185 X-0.5907 Y0.282 Z0.7527 N2455 G1 X0.3522
N2190 X-0.5892 Y0.2839 Z0.7512 N2460 G2 X0.4147 Y1.4479 I-0.0756 J-0.1159
N2195 X-0.5876 Y0.286 Z0.7503 N2465 X0.4219 Y1.0068 I-5.8388 J-0.3155
N2200 X-0.5858 Y0.2881 Z0.75 N2470 G1 Y0.5782
N2205 G3 X-0.57 Y0.3241 I-0.0622 J0.049 N2475 Y0.5532 F7.5
N2210 G2 X-0.5198 Y0.468 I0.4344 J-0.0708 N2480 G3 X0.4859 Y0.4986 I0.1749 J0.1403 F30.
N2215 X-0.5069 Y0.4894 I0.3842 J-0.2147 F7.5 N2485 X0.5058 Y0.5079 I0.0074 J0.0101
N2220 G3 X-0.4919 Y1.0529 I-3.8529 J0.3849 F30. N2490 G1 Y0.5087
N2225 G1 Y1.5677 N2495 X0.5053 Y0.5108 Z0.7504
N2230 G2 X-0.378 Y1.6335 I0.1058 J-0.0518 N2500 X0.5048 Y0.5128 Z0.7511
N2235 X0.0876 Y1.6419 I0.3304 J-5.4265 N2505 X0.5043 Y0.5147 Z0.7522
N2240 G1 X0.4186 N2510 X0.503 Y0.5162 Z0.7538
N2245 G2 X0.4836 Y1.5272 I-0.0547 J-0.1068 N2515 X0.502 Y0.5174 Z0.7559
N2250 X0.4919 Y1.0616 I-5.4958 J-0.3304 N2520 X0.5013 Y0.5183 Z0.7583
N2255 G1 Y0.5247 N2525 X0.5009 Y0.5187 Z0.7604
N2260 Y0.4997 F7.5 N2530 X0.5007 Y0.5188 Z0.7625
N2265 G2 X0.5629 Y0.3726 I-0.3273 J-0.2664 F30. N2535 G0 Z1.15
N2270 G1 X0.564 Y0.3702 N2540 X-0.5253 Y0.4905
N2275 X0.5655 Y0.3681 N2545 Z0.775
N2280 X0.5675 Y0.3664 N2550 G1 Z0.7625 F30.
N2285 X0.5698 Y0.3651 N2555 X-0.5249 Z0.7597
N2290 X0.5723 Y0.3644 N2560 X-0.524 Y0.4906 Z0.7571
N2295 X0.5749 Y0.3642 N2565 X-0.5225 Y0.4908 Z0.7547
N2300 X0.5775 Y0.3645 N2570 X-0.5206 Y0.491 Z0.7527
N2305 X0.58 Y0.3654 N2575 X-0.5182 Y0.4913 Z0.7512
N2310 X0.5823 Y0.3669 N2580 X-0.5156 Y0.4916 Z0.7503
N2315 X0.5842 Y0.3687 N2585 X-0.5128 Y0.4919 Z0.75
N2320 X0.5851 Y0.3707 Z0.7502 N2590 G3 X-0.4762 Y0.5061 I-0.0093 J0.0786
N2325 X0.5859 Y0.3726 Z0.7508 N2595 X-0.3647 Y0.6252 I-0.1041 J0.2093
N2330 X0.5867 Y0.3743 Z0.7517 N2600 X-0.3519 Y1.116 I-4.2777 J0.3569
N2335 X0.5869 Y0.3765 Z0.7532 N2605 G1 Y1.4286
N2340 X0.5867 Y0.3779 Z0.7547 N2610 G2 X-0.2369 Y1.4935 I0.1074 J-0.0558
N2345 X0.5865 Y0.379 Z0.7564 N2615 X0.2953 Y1.4988 I0.3169 J-5.146
N2350 X0.5864 Y0.3798 Z0.7583 N2620 X0.3457 Y1.2787 I-0.2213 J-0.1664
N2355 X0.5863 Y0.3804 Z0.7604 N2625 X0.3519 Y0.959 I-2.7813 J-0.2138
N2360 X0.5862 Y0.3805 Z0.7625 N2630 G1 Y0.6035
N2365 G0 Z1.15 N2635 G3 X0.3862 Y0.5574 I0.0352 J-0.0097
N2370 X-0.5716 Y0.4171 N2640 G2 X0.4312 Y0.5386 I-0.9574 J-2.3603
N2375 Z0.775 N2645 G3 X0.441 Y0.5616 I0.0045 J0.0116
N2380 G1 Z0.7625 F30. N2650 G1 X0.4403 Y0.5619
N2385 X-0.5713 Y0.4172 Z0.7597 N2655 X0.4377 Y0.5629 Z0.7503
N2390 X-0.5705 Y0.4175 Z0.7571 N2660 X0.4352 Y0.5639 Z0.7512
N2395 X-0.5691 Y0.4181 Z0.7547 N2665 X0.433 Y0.5648 Z0.7527
N2400 X-0.5673 Y0.4189 Z0.7527 N2670 X0.4312 Y0.5655 Z0.7547
N2405 X-0.5651 Y0.4199 Z0.7512 N2675 X0.4298 Y0.566 Z0.7571
N2410 X-0.5627 Y0.4209 Z0.7503 N2680 X0.4289 Y0.5663 Z0.7597
N2415 X-0.5601 Y0.422 Z0.75 N2685 X0.4286 Y0.5665 Z0.7625
N2690 G0 Z1.15 N2960 X0.199 Y1.2738
N2695 X-0.4789 Y0.5373 N2965 X0.2023 Y1.2621
N2700 Z0.775 N2970 X0.2049 Y1.2501
N2705 G1 Z0.7625 F30. N2975 X0.207 Y1.2381
N2710 X-0.4785 Z0.7597 N2980 X0.2084 Y1.226
N2715 X-0.4776 Y0.5371 Z0.7571 N2985 X0.2093 Y1.2138
N2720 X-0.4762 Y0.5369 Z0.7547 N2990 X0.2095 Y1.2016
N2725 X-0.4742 Y0.5367 Z0.7527 N2995 X0.2092 Y1.1894
N2730 X-0.4718 Y0.5364 Z0.7512 N3000 X0.2083 Y1.1772
N2735 X-0.4692 Y0.536 Z0.7503 N3005 X0.2068 Y1.1651
N2740 X-0.4665 Y0.5356 Z0.75 N3010 G2 X0.2169 Y0.6011 I-17.9825 J-0.6043
N2745 G3 X-0.4275 Y0.5402 I0.0105 J0.0784 N3015 G3 X0.2367 Y0.5725 I0.0232 J-0.0051
N2750 X-0.3096 Y0.6248 I-0.029 J0.1648 N3020 G1 X0.2962
N2755 X-0.2835 Y1.0025 I-1.4079 J0.2873 N3025 X0.3016 Y0.5724
N2760 G2 X-0.2763 Y1.3756 I9.9774 J-0.0058 N3030 G3 X0.3012 Y0.5974 I-0.0002 J0.0125
N2765 X-0.1062 Y1.4286 I0.1528 J-0.1909 N3035 G1 X0.2985 Z0.7503
N2770 X0.2241 Y1.4301 I0.19 J-5.4306 N3040 X0.2958 Y0.5973 Z0.7512
N2775 X0.2755 Y1.2105 I-0.2145 J-0.166 N3045 X0.2934 Z0.7527
N2780 X0.2834 Y0.6089 I-8.833 J-0.4168 N3050 X0.2915 Z0.7547
N2785 X0.2829 Y0.5839 I-8.8409 J0.1848 F7.5 N3055 X0.29 Y0.5972 Z0.7571
N2790 G3 X0.3562 Y0.5657 I0.0595 J0.0829 F30. N3060 X0.2891 Z0.7597
N2795 X0.3594 Y0.5905 I0.0012 J0.0124 N3065 X0.2887 Z0.7625
N2800 G1 X0.3586 Y0.5906 N3070 G0 Z1.15
N2805 X0.3559 Y0.5909 Z0.7503 N3075 X-0.369 Y0.5816
N2810 X0.3532 Y0.5911 Z0.7512 N3080 Z0.775
N2815 X0.3509 Y0.5914 Z0.7527 N3085 G1 Z0.7625 F30.
N2820 X0.3489 Y0.5915 Z0.7547 N3090 X-0.3687 Y0.5815 Z0.7597
N2825 X0.3474 Y0.5917 Z0.7571 N3095 X-0.3679 Y0.5812 Z0.7571
N2830 X0.3465 Y0.5918 Z0.7597 N3100 X-0.3665 Y0.5806 Z0.7547
N2835 X0.3462 Z0.7625 N3105 X-0.3647 Y0.5798 Z0.7527
N2840 G0 Z1.15 N3110 X-0.3625 Y0.5789 Z0.7512
N2845 X-0.4224 Y0.568 N3115 X-0.3601 Y0.5778 Z0.7503
N2850 Z0.775 N3120 X-0.3575 Y0.5767 Z0.75
N2855 G1 Z0.7625 F30. N3125 G3 X-0.3187 Y0.5707 I0.0312 J0.0727
N2860 X-0.4221 Y0.5679 Z0.7597 N3130 G1 X-0.3097 Y0.5695
N2865 X-0.4213 Y0.5677 Z0.7571 N3135 X-0.3006 Y0.5689
N2870 X-0.4198 Y0.5672 Z0.7547 N3140 X-0.2915 Y0.569
N2875 X-0.4179 Y0.5667 Z0.7527 N3145 X-0.2825 Y0.5697
N2880 X-0.4157 Y0.566 Z0.7512 N3150 X-0.2735 Y0.571
N2885 X-0.4131 Y0.5652 Z0.7503 N3155 X-0.2646 Y0.5729
N2890 X-0.4105 Y0.5644 Z0.75 N3160 X-0.2558 Y0.5754
N2895 G3 X-0.3712 Y0.5629 I0.0226 J0.0758 N3165 X-0.2473 Y0.5785
N2900 X-0.2302 Y0.7067 I0.0078 J0.1334 N3170 X-0.239 Y0.5822
N2905 X-0.2169 Y1.1718 I-2.089 J0.2926 N3175 X-0.231 Y0.5865
N2910 G1 X-0.2119 Y1.2887 N3180 X-0.2232 Y0.5913
N2915 G2 X-0.1153 Y1.3508 I0.0967 J-0.0444 N3185 X-0.2159 Y0.5966
N2920 X0.1535 Y1.3595 I0.1851 J-1.5502 N3190 X-0.2089 Y0.6024
N2925 G1 X0.161 Y1.3499 N3195 X-0.2023 Y0.6087
N2930 X0.168 Y1.3399 N3200 X-0.1962 Y0.6154
N2935 X0.1745 Y1.3296 N3205 X-0.1905 Y0.6225
N2940 X0.1805 Y1.3189 N3210 X-0.1854 Y0.63
N2945 X0.1859 Y1.308 N3215 X-0.1807 Y0.6379
N2950 X0.1909 Y1.2968 N3220 X-0.1767 Y0.646
N2955 X0.1952 Y1.2854 N3225 X-0.1732 Y0.6544
N3230 X-0.1702 Y0.663 N3500 G3 X0.1821 Y0.5854 I-0.0004 J0.0125
N3235 X-0.1679 Y0.6718 N3505 X0.1692 Y0.5975 I-0.0125 J-0.0004
N3240 X-0.1662 Y0.6807 N3510 G1 X0.1664 Y0.5974 Z0.7503
N3245 X-0.1651 Y0.6897 N3515 X0.1638 Y0.5973 Z0.7512
N3250 X-0.1646 Y0.6988 N3520 X0.1614 Y0.5972 Z0.7527
N3255 X-0.1647 Y0.7079 N3525 X0.1595 Y0.5971 Z0.7547
N3260 G3 X-0.1433 Y1.0748 I-1.6161 J0.2785 N3530 X0.158 Z0.7571
N3265 G1 X-0.1446 Y1.0937 N3535 X0.157 Z0.7597
N3270 X-0.1453 Y1.1126 N3540 X0.1567 Y0.597 Z0.7625
N3275 X-0.1455 Y1.1315 N3545 G0 Z1.15
N3280 X-0.145 Y1.1504 N3550 X-0.2547 Y0.59
N3285 X-0.1441 Y1.1693 N3555 Z0.775
N3290 X-0.1426 Y1.1881 N3560 G1 Z0.7625 F30.
N3295 X-0.1405 Y1.2069 N3565 X-0.2544 Y0.5898 Z0.7597
N3300 X-0.1378 Y1.2256 N3570 X-0.2536 Y0.5893 Z0.7571
N3305 X-0.1346 Y1.2443 N3575 X-0.2523 Y0.5886 Z0.7547
N3310 G2 X0.096 Y1.2815 I0.1608 J-0.2633 N3580 X-0.2506 Y0.5875 Z0.7527
N3315 X0.1367 Y1.0056 I-0.4107 J-0.2016 N3585 X-0.2486 Y0.5863 Z0.7512
N3320 G1 X0.1378 Y0.9272 N3590 X-0.2463 Y0.585 Z0.7503
N3325 X0.1394 Y0.8488 N3595 X-0.2439 Y0.5836 Z0.75
N3330 X0.1415 Y0.7705 N3600 G3 X-0.2062 Y0.5725 I0.0404 J0.068
N3335 X0.144 Y0.6921 N3605 X-0.1021 Y0.5851 I0.0363 J0.137
N3340 X0.147 Y0.6137 N3610 X-0.0149 Y0.8136 I-0.1899 J0.2034
N3345 G3 X0.1481 Y0.5888 I13.2997 J0.548 F7.5 N3615 X-0.004 Y1.0734 I-1.3436 J0.1866
N3350 X0.1701 Y0.5725 I0.0295 J0.0168 F30. N3620 G1 X-0.0042 Y1.0758
N3355 G1 X0.2367 N3625 X-0.0049 Y1.0781
N3360 G3 X0.2358 Y0.5975 I-0.0004 J0.0125 N3630 X-0.0061 Y1.0802
N3365 G1 X0.233 Y0.5974 Z0.7503 N3635 X-0.0078 Y1.082
N3370 X0.2304 Y0.5973 Z0.7512 N3640 X-0.0099 Y1.0835
N3375 X0.228 Y0.5972 Z0.7527 N3645 X-0.0122 Y1.0844
N3380 X0.226 Y0.5971 Z0.7547 N3650 X-0.0148 Y1.0848
N3385 X0.2246 Z0.7571 N3655 X-0.0173 Y1.0847
N3390 X0.2236 Z0.7597 N3660 X-0.0199 Y1.084
N3395 X0.2233 Y0.597 Z0.7625 N3665 X-0.0222 Y1.0827
N3400 G0 Z1.15 N3670 X-0.0242 Y1.081
N3405 X-0.3147 Y0.59 N3675 X-0.0258 Y1.0788
N3410 Z0.775 N3680 X-0.0269 Y1.0763
N3415 G1 Z0.7625 F30. N3685 X-0.0278 Y1.0728
N3420 X-0.3144 Y0.5898 Z0.7597 N3690 X-0.1499 Y0.6045 F40.
N3425 X-0.3136 Y0.5893 Z0.7571 N3695 X-0.1541 Y0.5881 F30.
N3430 X-0.3123 Y0.5886 Z0.7547 N3700 G3 X-0.1425 Y0.5725 I0.0121 J-0.0032
N3435 X-0.3106 Y0.5875 Z0.7527 N3705 X-0.0158 Y0.5969 I0.0345 J0.1621
N3440 X-0.3086 Y0.5863 Z0.7512 N3710 X0.0142 Y0.5723 I0.0503 J0.0307
N3445 X-0.3063 Y0.585 Z0.7503 N3715 G1 X0.017 Y0.5727
N3450 X-0.3039 Y0.5836 Z0.75 N3720 X0.0196 Y0.5737
N3455 G3 X-0.2662 Y0.5725 I0.0404 J0.068 N3725 X0.022 Y0.5753
N3460 X-0.1666 Y0.5847 I0.0345 J0.1315 N3730 X0.0239 Y0.5773
N3465 X-0.0812 Y0.8052 I-0.207 J0.2069 N3735 X0.0253 Y0.5797
N3470 X-0.0728 Y1.1543 I-3.2915 J0.2541 N3740 X0.0262 Y0.5824
N3475 G2 X0.0558 Y1.1268 I0.0635 J-0.0176 N3745 X0.0264 Y0.5852
N3480 X0.0704 Y0.6494 I-2.7061 J-0.3215 N3750 X0.0261 Y0.5879
N3485 G3 X0.0868 Y0.5918 I0.1818 J0.0207 N3755 X0.0251 Y0.5906
N3490 X0.099 Y0.57 I0.1654 J0.0783 F7.5 N3760 X0.0236 Y0.5929
N3495 G1 X0.1701 Y0.5725 F30. N3765 X0.0216 Y0.5948
N3770 X0.0192 Y0.5963 N4040 Z1.1
N3775 X0.0166 Y0.5972 N4045 G1 Z1. F30.
N3780 X0.0138 Y0.5975 N4050 G3 X0.6676 Z0.9 I-0.1 K0.
N3785 X0.0134 N4055 G1 X0.6
N3790 X-0.0779 F40. N4060 X-0.6
N3795 X-0.0783 F30. N4065 G3 X-0.7 Z1. I0. K0.1
N3800 G3 X-0.0787 Y0.5725 I0. J-0.0125 N4070 G0 Z1.15
N3805 G1 X0.1028 N4075 X0.7688 Y-0.2612
N3810 G3 X0.1019 Y0.5975 I-0.0004 J0.0125 N4080 Z1.1
N3815 G1 X0.0991 Y0.5974 Z0.7503 N4085 G1 Z1. F30.
N3820 X0.0965 Y0.5973 Z0.7512 N4090 G3 X0.6687 Z0.9 I-0.1 K0.
N3825 X0.0941 Y0.5972 Z0.7527 N4095 G1 X0.6
N3830 X0.0922 Y0.5971 Z0.7547 N4100 X-0.6
N3835 X0.0907 Z0.7571 N4105 G3 X-0.7 Z1. I0. K0.1
N3840 X0.0897 Z0.7597 N4110 G0 Z1.15
N3845 X0.0894 Y0.597 Z0.7625 N4115 X0.7688 Y-0.1945
N3850 G0 Z1.55 N4120 Z1.1
(FACE4) N4125 G1 Z1. F30.
N3860 G54 G0 N4130 G3 X0.6687 Z0.9 I-0.1 K0.
N3865 M9 N4135 G1 X0.6
N3870 G0 X0.6165 Y-0.595 N4140 X-0.6
N3875 Z1.55 N4145 G3 X-0.7 Z1. I0. K0.1
N3880 Z1.1 N4150 G0 Z1.15
N3885 G1 Z1. F30. N4155 X0.7688 Y-0.1277
N3890 G18 G3 X0.5165 Z0.9 I-0.1 K0. N4160 Z1.1
N3895 G1 X0.4892 N4165 G1 Z1. F30.
N3900 X-0.4892 N4170 G3 X0.6687 Z0.9 I-0.1 K0.
N3905 G3 X-0.5892 Z1. I0. K0.1 N4175 G1 X0.6
N3910 G0 Z1.15 N4180 X-0.6
N3915 X0.6876 Y-0.5283 N4185 G3 X-0.7 Z1. I0. K0.1
N3920 Z1.1 N4190 G0 Z1.15
N3925 G1 Z1. F30. N4195 X0.7688 Y-0.0609
N3930 G3 X0.5876 Z0.9 I-0.1 K0. N4200 Z1.1
N3935 G1 X0.5499 N4205 G1 Z1. F30.
N3940 X-0.5499 N4210 G3 X0.6687 Z0.9 I-0.1 K0.
N3945 G3 X-0.6499 Z1. I0. K0.1 N4215 G1 X0.6
N3950 G0 Z1.15 N4220 X-0.6
N3955 X0.7307 Y-0.4615 N4225 G3 X-0.7 Z1. I0. K0.1
N3960 Z1.1 N4230 G0 Z1.15
N3965 G1 Z1. F30. N4235 X0.7688 Y0.0058
N3970 G3 X0.6307 Z0.9 I-0.1 K0. N4240 Z1.1
N3975 G1 X0.583 N4245 G1 Z1. F30.
N3980 X-0.583 N4250 G3 X0.6687 Z0.9 I-0.1 K0.
N3985 G3 X-0.683 Z1. I0. K0.1 N4255 G1 X0.6
N3990 G0 Z1.15 N4260 X-0.6
N3995 X0.7561 Y-0.3948 N4265 G3 X-0.7 Z1. I0. K0.1
N4000 Z1.1 N4270 G0 Z1.15
N4005 G1 Z1. F30. N4275 X0.7688 Y0.0726
N4010 G3 X0.6561 Z0.9 I-0.1 K0. N4280 Z1.1
N4015 G1 X0.5981 N4285 G1 Z1. F30.
N4020 X-0.5981 N4290 G3 X0.6687 Z0.9 I-0.1 K0.
N4025 G3 X-0.6981 Z1. I0. K0.1 N4295 G1 X0.6
N4030 G0 Z1.15 N4300 X-0.6
N4035 X0.7676 Y-0.328 N4305 G3 X-0.7 Z1. I0. K0.1
N4310 G0 Z1.15 N4580 X-0.5418
N4315 X0.7688 Y0.1393 N4585 G3 X-0.6418 Z1. I0. K0.1
N4320 Z1.1 N4590 G0 Z1.55
N4325 G1 Z1. F30. N4595 G17
N4330 G3 X0.6687 Z0.9 I-0.1 K0. (2D CONTOUR1)
N4335 G1 X0.6 N4600 G54 G0
N4340 X-0.6 N4605 M9
N4345 G3 X-0.7 Z1. I0. K0.1 N4610 G0 X0.05 Y-0.675
N4350 G0 Z1.15 N4615 Z1.55
N4355 X0.7688 Y0.2061 N4620 Z1.1
N4360 Z1.1 N4625 G1 Z0.9394 F30.
N4365 G1 Z1. F30. N4630 Z0.8
N4370 G3 X0.6687 Z0.9 I-0.1 K0. N4635 G19 G3 Y-0.625 Z0.75 J0.05 K0.
N4375 G1 X0.6 N4640 G1 Y-0.6125
N4380 X-0.6 N4645 G17 G3 X0. Y-0.5625 I-0.05 J0.
N4385 G3 X-0.7 Z1. I0. K0.1 N4650 G1 X-0.3
N4390 G0 Z1.15 N4655 G2 X-0.5625 Y-0.3 I0. J0.2625
N4395 X0.7688 Y0.2729 N4660 G1 Y0.3
N4400 Z1.1 N4665 G2 X-0.3 Y0.5625 I0.2625 J0.
N4405 G1 Z1. F30. N4670 G1 X0.3
N4410 G3 X0.6687 Z0.9 I-0.1 K0. N4675 G2 X0.5625 Y0.3 I0. J-0.2625
N4415 G1 X0.6 N4680 G1 Y-0.3
N4420 X-0.6 N4685 G2 X0.3 Y-0.5625 I-0.2625 J0.
N4425 G3 X-0.7 Z1. I0. K0.1 N4690 G1 X-0.3
N4430 G0 Z1.15 N4695 G2 X-0.5625 Y-0.3 I0. J0.2625
N4435 X0.7664 Y0.3396 N4700 G1 Y0.3
N4440 Z1.1 N4705 G2 X-0.3 Y0.5625 I0.2625 J0.
N4445 G1 Z1. F30. N4710 G1 X0.3
N4450 G3 X0.6664 Z0.9 I-0.1 K0. N4715 G2 X0.5625 Y0.3 I0. J-0.2625
N4455 G1 X0.6 N4720 G1 Y-0.3
N4460 X-0.6 N4725 G2 X0.3 Y-0.5625 I-0.2625 J0.
N4465 G3 X-0.7 Z1. I0. K0.1 N4730 G1 X0.
N4470 G0 Z1.15 N4735 G3 X-0.05 Y-0.6125 I0. J-0.05
N4475 X0.7526 Y0.4064 N4740 G1 Y-0.625
N4480 Z1.1 N4745 G19 G2 Y-0.675 Z0.8 J0. K0.05
N4485 G1 Z1. F30. N4750 G0 Z1.55
N4490 G3 X0.6526 Z0.9 I-0.1 K0. N4755 G17
N4495 G1 X0.5967 N4760 M9
N4500 X-0.5967 N4765 G53 G0 Z0.
N4505 G3 X-0.6967 Z1. I0. K0.1 N4770 G49
N4510 G0 Z1.15 N4775 A0. B0.
N4515 X0.7245 Y0.4732 N4780 G53 G0 X2.5 Y2.5
N4520 Z1.1 N4785 M30
N4525 G1 Z1. F30. %
N4530 G3 X0.6245 Z0.9 I-0.1 K0.
N4535 G1 X0.5787
N4540 X-0.5787
N4545 G3 X-0.6787 Z1. I0. K0.1
N4550 G0 Z1.15
N4555 X0.6779 Y0.5399
N4560 Z1.1
N4565 G1 Z1. F30.
N4570 G3 X0.5779 Z0.9 I-0.1 K0.
N4575 G1 X0.5418
G Codes

G Codes
Table of Contents
1. Conventions
2. G Code Quick Reference Table
3. G0 Rapid Move
3.1. Rapid Velocity Rate
4. G1 Linear Move
5. G2, G3 Arc Move
5.1. Center Format Arcs
5.2. Center Format Examples
5.3. Radius Format Arcs
6. G4 Dwell
7. G5 Cubic Spline
8. G5.1 Quadratic Spline
9. G5.2 G5.3 NURBS Block
10. G7 Lathe Diameter Mode
11. G8 Lathe Radius Mode
12. G10 L1 Set Tool Table
13. G10 L2 Set Coordinate System
14. G10 L10 Set Tool Table
15. G10 L11 Set Tool Table
16. G10 L20 Set Coordinate System
17. G17 - G19.1 Plane Select
18. G20, G21 Units
19. G28, G28.1 Go/Set Predefined Position
20. G30, G30.1 Go/Set Predefined Position
21. G33 Spindle Synchronized Motion
22. G33.1 Rigid Tapping
23. G38.n Straight Probe
24. G40 Compensation Off
25. G41, G42 Cutter Compensation
26. G41.1, G42.1 Dynamic Cutter Compensation
27. G43 Tool Length Offset
28. G43.1: Dynamic Tool Length Offset
29. G43.2: Apply additional Tool Length Offset
30. G49: Cancel Tool Length Compensation
31. G53 Move in Machine Coordinates
32. G54-G59.3 Select Coordinate System
33. G61, G61.1 Exact Path Mode
34. G64 Path Blending
35. G73 Drilling Cycle with Chip Breaking
36. G76 Threading Cycle
37. Canned Cycles
37.1. Common Words
37.2. Sticky Words
37.3. Repeat Cycle
37.4. Retract Mode

http://linuxcnc.org/docs/html/gcode/g-code.html[4/7/2017 23:27:46]
G Codes

37.5. Canned Cycle Errors


37.6. Preliminary and In-Between Motion
37.7. Why use a canned cycle?
38. G80 Cancel Canned Cycle
39. G81 Drilling Cycle
40. G82 Drilling Cycle, Dwell
41. G83 Peck Drilling Cycle
42. G84 Right-Hand Tapping Cycle
43. G85 Boring Cycle, Feed Out
44. G86 Boring Cycle, Spindle Stop, Rapid Move Out
45. G87 Back Boring Cycle
46. G88 Boring Cycle, Spindle Stop, Manual Out
47. G89 Boring Cycle, Dwell, Feed Out
48. G90, G91 Distance Mode
49. G90.1, G91.1 Arc Distance Mode
50. G92 Coordinate System Offset
51. G92.1, G92.2 Reset G92 Offsets
52. G92.3 Restore G92 Offsets
53. G93, G94, G95: Feed Rate Mode
54. G96, G97 Spindle Control Mode
55. G98, G99 Canned Cycle Return Level

1. Conventions
Conventions used in this section
In the G code prototypes the hyphen (-) stands for a real value
and (<>) denotes an optional item.
If L- is written in a prototype the - will often be referred to
as the L number, and so on for any other
letter.
In the G code prototypes the word axes stands for any axis as defined
in your configuration.
An optional value will be written like this <L->.
A real value may be:
An explicit number, 4
An expression, [2+2]
A parameter value, #88
A unary function value, acos[0]

In most cases, if axis words are given


(any or all of X Y Z A B C U V W),
they specify a destination
point.
Axis numbers are in the currently active coordinate system,
unless explicitly described as being
in
the absolute coordinate system.
Where axis words are optional, any omitted axes will retain their original value.
Any items in the G code prototypes not explicitly described as
optional are required.
The values following letters are often given as explicit numbers.
Unless stated otherwise, the explicit
numbers can be real values. For
example, G10 L2 could equally well be written G[2*5] L[1+1]. If the

http://linuxcnc.org/docs/html/gcode/g-code.html[4/7/2017 23:27:46]
G Codes

value of parameter 100 were 2, G10 L#100 would also mean the same.
If L- is written in a prototype the - will often be referred to
as the L number, and so on for any other
letter.

2. G Code Quick Reference Table

Code Description
G0 Coordinated Motion at Rapid Rate

G1 Coordinated Motion at Feed Rate

G2 G3 Coordinated Helical Motion at Feed Rate

G4 Dwell

G5 Cubic Spline

G5.1 Quadratic B-Spline

G5.2 NURBS, add control point

G7 Diameter Mode (lathe)

G8 Radius Mode (lathe)

G10 L1 Set Tool Table Entry

G10 L10 Set Tool Table, Calculated, Workpiece

G10 L11 Set Tool Table, Calculated, Fixture

G10 L2 Coordinate System Origin Setting

G10 L20 Coordinate System Origin Setting Calculated

G17 - G19.1 Plane Select

G20 G21 Set Units of Measure

G28 - G28.1 Go to Predefined Position

G30 - G30.1 Go to Predefined Position

G33 Spindle Synchronized Motion

G33.1 Rigid Tapping

G38.2 - G38.5 Probing

G40 Cancel Cutter Compensation

http://linuxcnc.org/docs/html/gcode/g-code.html[4/7/2017 23:27:46]
G Codes

G41 G42 Cutter Compensation

G41.1 G42.1 Dynamic Cutter Compensation

G43 Use Tool Length Offset from Tool Table

G43.1 Dynamic Tool Length Offset

G43.2 Apply additional Tool Length Offset

G49 Cancel Tool Length Offset

G53 Move in Machine Coordinates

G54-G59.3 Select Coordinate System (1 - 9)

G61 G61.1 Path Control Mode

G64 Path Control Mode with Optional Tolerance

G73 Drilling Cycle with Chip Breaking

G76 Multi-pass Threading Cycle (Lathe)

G80 Cancel Motion Modes

G81 Drilling Cycle

G82 Drilling Cycle with Dwell

G83 Drilling Cycle with Peck

G85 Boring Cycle, No Dwell, Feed Out

G86 Boring Cycle, Stop, Rapid Out

G89 Boring Cycle, Dwell, Feed Out

G90 G91 Distance Mode

G90.1 G91.1 Arc Distance Mode

G92 Coordinate System Offset

G92.1 G92.2 Cancel G92 Offsets

G92.3 Restore G92 Offsets

G93 G94 G95 Feed Modes

G96 Spindle Control Mode

G98 G99 Canned Cycle Z Retract Mode

http://linuxcnc.org/docs/html/gcode/g-code.html[4/7/2017 23:27:46]
G Codes

3. G0 Rapid Move

G0 axes

For rapid motion, program G0 axes, where all the axis words are optional.
The G0 is optional if the
current motion mode is G0. This will produce
coordinated motion to the destination point at the
maximum rapid rate
(or slower). G0 is typically used as a positioning move.

3.1. Rapid Velocity Rate


The MAX_VELOCITY setting in the ini file [TRAJ] section defines the maximum
rapid traverse rate.
The maximum rapid traverse rate can be higher than the
individual axes MAX_VELOCITY setting
during a coordinated move. The maximum
rapid traverse rate can be slower than the
MAX_VELOCITY setting in the [TRAJ]
section if an axis MAX_VELOCITY or trajectory constraints
limit it.

G0 Example

G90 (set absolute distance mode)


G0 X1 Y-2.3 (Rapid linear move from current location to X1 Y-2.3)
M2 (end program)

See G90 & M2 sections for more information.

If cutter compensation is active, the motion will differ from


the above; see the Cutter Compensation
Section.
If G53 is programmed on the same line, the motion will also differ;
see the G53 Section for more
information.
The path of a G0 rapid motion can be rounded at direction changes and depends
on the trajectory
control settings and maximum
acceleration of the axes.
It is an error if:
An axis letter is without a real value.
An axis letter is used that is not configured

4. G1 Linear Move

G1 axes

For linear (straight line) motion at programed feed rate


(for cutting or not), program G1 'axes',

http://linuxcnc.org/docs/html/gcode/g-code.html[4/7/2017 23:27:46]
G Codes

where all the axis words are


optional. The G1 is optional if the current motion mode is G1. This will
produce coordinated motion to the destination point at the current feed
rate (or slower).

G1 Example

G90 (set absolute distance mode)


G1 X1.2 Y-3 F10 (linear move at a feed rate of 10 from current position to X1.2 Y-3)
Z-2.3 (linear move at same feed rate from current position to Z-2.3)
Z1 F25 (linear move at a feed rate of 25 from current position to Z1)
M2 (end program)

See G90 & F & M2 sections


for more information.

If cutter compensation is active, the motion will differ from


the above; see the Cutter Compensation
Section.
If G53 is programmed on the same line, the motion will also differ;
see the G53 Section for more
information.
It is an error if:
No feed rate has been set.
An axis letter is without a real value.
An axis letter is used that is not configured

5. G2, G3 Arc Move

G2 or G3 axes offsets (center format)


G2 or G3 axes R- (radius format)
G2 or G3 offsets|R- <P-> (full circles)

A circular or helical arc is specified using either G2 (clockwise


arc) or G3 (counterclockwise arc) at
the current
feed rate. The direction (CW, CCW) is as viewed from the
positive end of the axis about
which the circular motion occurs.
The axis of the circle or helix must be parallel to the
X, Y, or Z axis of the machine coordinate system.
The axis (or, equivalently, the plane perpendicular to the axis)
is selected with G17 (Z-axis, XY-
plane),
G18 (Y-axis, XZ-plane), or G19 (X-axis, YZ-plane).
Planes 17.1, 18.1, and 19.1 are not
currently supported.
If the arc is circular,
it lies in a plane parallel to the selected plane.
To program a helix, include the axis word perpendicular to the arc
plane: for example, if in the G17
plane, include a Z word. This
will cause the Z axis to move to the programmed value during the
circular XY motion.
To program an arc that gives more than one full turn, use the P word
specifying the number of full
turns plus the programmed arc. The P word
must be an integer. If P is unspecified, the behavior is as
if P1 was
given: that is, only one full or partial turn will result. For example, if a
180 degree arc is
programmed with a P2, the resulting motion will be 1 1/2
rotations. For each P increment above 1 an
extra full circle is added to the
programmed arc. Multi turn helical arcs are supported and give
motion useful
for milling holes or threads.
If a line of code makes an arc and includes rotary axis motion,
the rotary axes turn at a constant rate
so that the rotary
motion starts and finishes when the XYZ motion starts and finishes.
Lines of this

http://linuxcnc.org/docs/html/gcode/g-code.html[4/7/2017 23:27:46]
G Codes

sort are hardly ever programmed.


If cutter compensation is active, the motion will differ from
the above; see the Cutter Compensation
Section.
The arc center is absolute or relative as set by G90.1 or G91.1 respectively.
Two formats are allowed for specifying an arc:
Center Format and Radius Format.
It is an error if:
No feed rate has been set.
The P word is not an integer.

5.1. Center Format Arcs


Center format arcs are more accurate than radius format arcs and are
the preferred format to use.
The end point of the arc along with the offset to the center of the
arc from the current location are
used to program arcs that are less
than a full circle. It is OK if the end point of the arc is the same
as
the current location.
The offset to the center of the arc from the current location and
optionally the number of turns are
used to program full circles.
When programming arcs an error due to rounding can result from using a
precision of less than 4
decimal places (0.0000) for inch and less than
3 decimal places (0.000) for millimeters.

Incremental Arc Distance Mode


Arc center offsets are a relative distance from the start location of the arc.
Incremental Arc Distance
Mode is default.
One or more axis words and one or more offsets must be programmed for an
arc that is less than 360
degrees.
No axis words and one or more offsets must be programmed for full circles.
The P word defaults to 1
and is optional.
For more information on 'Incremental Arc Distance Mode see the
G91.1 section.

Absolute Arc Distance Mode


Arc center offsets are the absolute distance from the current 0 position of the axis.
One or more axis words and both offsets must be programmed for arcs
less than 360 degrees.
No axis words and both offsets must be programmed for full circles.
The P word defaults to 1 and is
optional.
For more information on 'Absolute Arc Distance Mode see the
G90.1 section.

XY-plane (G17)

G2 or G3 <X- Y- Z- I- J- P->

Z - helix
I - X offset

http://linuxcnc.org/docs/html/gcode/g-code.html[4/7/2017 23:27:46]
G Codes

J - Y offset
P - number of turns

XZ-plane (G18)

G2 or G3 <X- Z- Y- I- K- P->

Y - helix
I - X offset
K - Z offset
P - number of turns

YZ-plane (G19)

G2 or G3 <Y- Z- X- J- K- P->

X - helix
J - Y offset
K - Z offset
P - number of turns

It is an error if:
No feed rate is set with the F word.
No offsets are programmed.
When the arc is projected on the selected plane, the distance from
the current point to the
center differs from the distance from the end
point to the center by more than (.05 inch/.5
mm)
OR ((.0005 inch/.005mm) AND .1% of radius).

Deciphering the Error message Radius to end of arc differs from radius to start:
start - the current position
center - the center position as calculated using the i, j, or k words
end - the programmed end point
r1 - radius from the start position to the center
r2 - radius from the end position to the center

5.2. Center Format Examples


Calculating arcs by hand can be difficult at times. One option is to
draw the arc with a cad program
to get the coordinates and offsets.
Keep in mind the tolerance mentioned above, you may have to
change the
precision of your cad program to get the desired results. Another
option is to calculate
the coordinates and offset using formulas. As
you can see in the following figures a triangle can be
formed from the
current position the end position and the arc center.

http://linuxcnc.org/docs/html/gcode/g-code.html[4/7/2017 23:27:46]
G Codes

In the following figure you can see the start position is X0 Y0, the
end position is X1 Y1. The arc
center position is at X1 Y0. This gives
us an offset from the start position of 1 in the X axis and 0 in
the Y
axis. In this case only an I offset is needed.

G2 Example Line

G0 X0 Y0
G2 X1 Y1 I1 F10 (clockwise arc in the XY plane)

Figure 1. G2 Example

In the next example we see the difference between the offsets for Y if
we are doing a G2 or a G3
move. For the G2 move the start position is
X0 Y0, for the G3 move it is X0 Y1. The arc center is at
X1 Y0.5 for
both moves. The G2 move the J offset is 0.5 and the G3 move the J
offset is -0.5.

G2-G3 Example Line

G0 X0 Y0
G2 X0 Y1 I1 J0.5 F25 (clockwise arc in the XY plane)
G3 X0 Y0 I1 J-0.5 F25 (counterclockwise arc in the XY plane)

http://linuxcnc.org/docs/html/gcode/g-code.html[4/7/2017 23:27:46]
G Codes

Figure 2. G2-G3 Example

In the next example we show how the arc can make a helix in the Z axis
by adding the Z word.

G2 Example Helix

G0 X0 Y0 Z0
G17 G2 X10 Y16 I3 J4 Z-1 (helix arc with Z added)

In the next example we show how to make more than one turn using the P word.

P word Example

G0 X0 Y0 Z0
G2 X0 Y1 Z-1 I1 J0.5 P2 F25

In the center format, the radius of the arc is not specified, but it
may be found easily as the distance
from the center of the circle to
either the current point or the end point of the arc.

5.3. Radius Format Arcs

G2 or G3 axes R- <P->

http://linuxcnc.org/docs/html/gcode/g-code.html[4/7/2017 23:27:46]
G Codes

R - radius from current position

It is not good practice to program radius format arcs that are nearly
full circles or nearly semicircles
because a small change in the
location of the end point will produce a much larger change in the
location of the center of the circle (and, hence, the middle of the
arc). The magnification effect is
large enough that rounding error in a
number can produce out-of-tolerance cuts. For instance, a 1%
displacement of the endpoint of a 180 degree arc produced a 7%
displacement of the point 90
degrees along the arc. Nearly full circles
are even worse. Other size arcs (in the range tiny to 165
degrees or
195 to 345 degrees) are OK.
In the radius format, the coordinates of the end point of the arc in
the selected plane are specified
along with the radius of the arc.
Program G2 axes R- (or use G3 instead of G2 ). R is the
radius. The
axis words are all optional except that at
least one of the two words for the axes in the selected plane
must be
used. The R number is the radius. A positive radius indicates that the
arc turns through less
than 180 degrees, while a negative radius
indicates a turn of more than 180 degrees. If the arc is
helical, the
value of the end point of the arc on the coordinate axis parallel to
the axis of the helix is
also specified.
It is an error if:
both of the axis words for the axes of the selected plane are omitted
the end point of the arc is the same as the current point.

G2 Example Line

G17 G2 X10 Y15 R20 Z5 (radius format with arc)

The above example makes a clockwise (as viewed from the positive Z-axis)
circular or helical arc
whose axis is parallel to the Z-axis, ending
where X=10, Y=15, and Z=5, with a radius of 20. If the
starting value
of Z is 5, this is an arc of a circle parallel to the XY-plane;
otherwise it is a helical arc.

6. G4 Dwell

G4 P-

P - seconds to dwell (floating point)

The P number is the time in seconds that all axes will remain unmoving.
The P number is a floating
point number so fractions of a second may be used.
G4 does not affect spindle, coolant and any I/O.

G4 Example Line

G4 P0.5 (wait for 0.5 seconds before proceeding)

It is an error if:
the P number is negative or not specified.

http://linuxcnc.org/docs/html/gcode/g-code.html[4/7/2017 23:27:46]
G Codes

7. G5 Cubic Spline

G5 X- Y- <I- J-> P- Q-

I - X incremental offset from start point to first control point


J - Y incremental offset from start point to first control point
P - X incremental offset from end point to second control point
Q - Y incremental offset from end point to second control point

G5 creates a cubic B-spline in the XY plane with the X and Y axes only.
P and Q must both be
specified for every G5 command.
For the first G5 command in a series of G5 commands, I and J must both
be specified. For
subsequent G5 commands, either both I and J must be
specified, or neither. If I and J are
unspecified, the starting
direction of this cubic will automatically match the ending direction of
the
previous cubic (as if I and J are the negation of the previous P and
Q).
For example, to program a curvy N shape:

G5 Sample initial cubic spline

G90 G17
G0 X0 Y0
G5 I0 J3 P0 Q-3 X1 Y1

A second curvy N that attaches smoothly to this one can now be made
without specifying I and J:

G5 Sample subsequent cubic spline

G5 P0 Q-3 X2 Y2

It is an error if:
P and Q are not both specified
Just one of I or J are specified
I or J are unspecified in the first of a series of G5 commands
An axis other than X or Y is specified
The active plane is not G17

8. G5.1 Quadratic Spline

G5.1 X- Y- I- J-

I - X incremental offset from start point to control point

http://linuxcnc.org/docs/html/gcode/g-code.html[4/7/2017 23:27:46]
G Codes

J - Y incremental offset from start point to control point

G5.1 creates a quadratic B-spline in the XY plane with the X and Y axis
only. Not specifying I or J
gives zero offset for the unspecified axis,
so one or both must be given.
For example, to program a parabola, through the origin, from X-2 Y4 to X2 Y4:

G5.1 Sample quadratic spline

G90 G17
G0 X-2 Y4
G5.1 X2 I2 J-8

It is an error if:
both I and J offset are unspecified or zero
An axis other than X or Y is specified
The active plane is not G17

9. G5.2 G5.3 NURBS Block

G5.2 <P-> <X- Y-> <L->


X- Y- <P->
...
G5.3

Warning: G5.2, G5.3 is experimental and not fully tested.


G5.2 is for opening the data block defining a NURBS and G5.3 for
closing the data block. In the lines
between these two codes the curve
control points are defined with both their related weights (P) and
the parameter (L) which determines the order of the curve.
The current coordinate, before the first G5.2 command, is always taken
as the first NURBS control
point. To set the weight for this first
control point, first program G5.2 P- without giving any X Y.
The default weight if P is unspecified is 1. The default order if L is
unspecified is 3.

G5.2 Example

G0 X0 Y0 (rapid move)
F10 (set feed rate)
G5.2 P1 L3
X0 Y1 P1
X2 Y2 P1
X2 Y0 P1
X0 Y0 P2
G5.3
; The rapid moves show the same path without the NURBS Block
G0 X0 Y1
X2 Y2
X2 Y0
X0 Y0
M2

Sample NURBS Output

http://linuxcnc.org/docs/html/gcode/g-code.html[4/7/2017 23:27:46]
G Codes

More information on NURBS can be found here:


http://wiki.linuxcnc.org/cgi-bin/wiki.pl?NURBS

10. G7 Lathe Diameter Mode

G7

Program G7 to enter the diameter mode for axis X on a lathe. When in


the diameter mode the X axis
moves on a lathe will be 1/2 the distance
to the center of the lathe. For example X1 would move the
cutter to
0.500 from the center of the lathe thus giving a 1 diameter part.

11. G8 Lathe Radius Mode

G8

Program G8 to enter the radius mode for axis X on a lathe. When in


Radius mode the X axis moves
on a lathe will be the distance from the
center. Thus a cut at X1 would result in a part that is 2" in
diameter.
G8 is default at power up.

http://linuxcnc.org/docs/html/gcode/g-code.html[4/7/2017 23:27:46]
G Codes

12. G10 L1 Set Tool Table

G10 L1 P- axes <R- I- J- Q->

P - tool number
R - radius of tool
I - front angle (lathe)
J - back angle (lathe)
Q - orientation (lathe)

G10 L1 sets the tool table for the P tool number to the values of the words.
A valid G10 L1 rewrites and reloads the tool table.

G10 L1 Example Line

G10 L1 P1 Z1.5 (set tool 1 Z offset from the machine origin to 1.5)
G10 L1 P2 R0.015 Q3 (lathe example setting tool 2 radius to 0.015 and orientation to
3)

It is an error if:
Cutter Compensation is on
The P number is unspecified
The P number is not a valid tool number from the tool table
The P number is 0

For more information on cutter orientation used by the Q word,


see the Lathe Tool Orientation
diagram.

13. G10 L2 Set Coordinate System

G10 L2 P- <axes R->

P - coordinate system (0-9)


R - rotation about the Z axis

G10 L2 offsets the origin of the axes in the coordinate system specified to
the value of the axis word.
The offset is from the machine origin established
during homing. The offset value will replace any
current offsets in effect for
the coordinate system specified. Axis words not used will not be changed.
Program P0 to P9 to specify which coordinate system to change.

Table 1. Coordinate System

http://linuxcnc.org/docs/html/gcode/g-code.html[4/7/2017 23:27:46]
G Codes

P Value Coordinate G code


System
0 Active n/a

1 1 G54

2 2 G55

3 3 G56

4 4 G57

5 5 G58

6 6 G59

7 7 G59.1

8 8 G59.2

9 9 G59.3

Optionally program R to indicate the rotation of the XY axis around the Z axis.
The direction of
rotation is CCW as viewed from the positive end of the Z axis.
All axis words are optional.
Being in incremental distance mode (G91) has no effect on G10 L2.
Important Concepts:
G10 L2 Pn does not change from the current coordinate system to the one specified by P,
you
have to use G54-59.3 to select a coordinate system.
When a rotation is in effect jogging an axis will only move that axis
in a positive or negative
direction and not along the rotated axis.
If a G92 origin offset was in effect before G10 L2,
it will continue to be in effect afterwards.
The coordinate system whose origin is set by a G10 command may be
active or inactive at the
time the G10 is executed.
If it is currently active, the new coordinates take effect immediately.

It is an error if:
The P number does not evaluate to an integer in the range 0 to 9.
An axis is programmed that is not defined in the configuration.

G10 L2 Example Line

G10 L2 P1 X3.5 Y17.2

In the above example the origin of the first coordinate system


(the one selected by G54) is set to be
X=3.5 and Y=17.2.
Because only X and Y are specified, the origin point is only moved in X and Y;
the

http://linuxcnc.org/docs/html/gcode/g-code.html[4/7/2017 23:27:46]
G Codes

other coordinates are not changed.

G10 L2 Example Line

G10 L2 P1 X0 Y0 Z0 (clear offsets for X,Y & Z axes in coordinate system 1)

The above example sets the XYZ coordinates of the coordinate system 1 to the machine origin.
The coordinate system is described in the Coordinate System Section.

14. G10 L10 Set Tool Table

G10 L10 P- axes <R- I- J- Q->

P - tool number
R - radius of tool
I - front angle (lathe)
J - back angle (lathe)
Q - orientation (lathe)

G10 L10 changes the tool table entry for tool P so that if the
tool offset is reloaded, with the machine
in its current position
and with the current G5x and G92 offsets active, the current coordinates
for
the given axes will become the given values. The axes that are
not specified in the G10 L10 command
will not be changed. This could be
useful with a probe move as described in the G38 section.

G10 L10 Example

T1 M6 G43 (load tool 1 and tool length offsets)


G10 L10 P1 Z1.5 (set the current position for Z to be 1.5)
G43 (reload the tool length offsets from the changed tool table)
M2 (end program)

See T & M6, and


G43/G43.1 sections for more information.

It is an error if:
Cutter Compensation is on
The P number is unspecified
The P number is not a valid tool number from the tool table
The P number is 0

15. G10 L11 Set Tool Table

G10 L11 P- axes <R- I- J- Q->

http://linuxcnc.org/docs/html/gcode/g-code.html[4/7/2017 23:27:46]
G Codes

P - tool number
R - radius of tool
I - front angle (lathe)
J - back angle (lathe)
Q - orientation (lathe)

G10 L11 is just like G10 L10 except that instead of setting the entry
according to the current offsets, it
is set so that the current
coordinates would become the given value if the new tool offset
is reloaded
and the machine is placed in the G59.3 coordinate
system without any G92 offset active.
This allows the user to set the G59.3 coordinate system according to a
fixed point on the machine,
and then use that fixture to measure tools
without regard to other currently-active offsets.
It is an error if:
Cutter Compensation is on
The P number is unspecified
The P number is not a valid tool number from the tool table
The P number is 0

16. G10 L20 Set Coordinate System

G10 L20 P- axes

P - coordinate system (0-9)

G10 L20 is similar to G10 L2 except that instead of setting the


offset/entry to the given value, it is set
to a calculated value that
makes the current coordinates become the given value.

G10 L20 Example Line

G10 L20 P1 X1.5 (set the X axis current location in coordinate system 1 to 1.5)

It is an error if:
The P number does not evaluate to an integer in the range 0 to 9.
An axis is programmed that is not defined in the configuration.

17. G17 - G19.1 Plane Select


These codes set the current plane as follows:
G17 - XY (default)

http://linuxcnc.org/docs/html/gcode/g-code.html[4/7/2017 23:27:46]
G Codes

G18 - ZX
G19 - YZ
G17.1 - UV
G18.1 - WU
G19.1 - VW

The UV, WU and VW planes do not support arcs.


It is a good idea to include a plane selection in the preamble
of each G code file.
The effects of having a plane selected are discussed in Section
G2 G3 Arcs and Section G81 G89

18. G20, G21 Units


G20 - to use inches for length units.
G21 - to use millimeters for length units.

It is a good idea to include units in the preamble


of each G code file.

19. G28, G28.1 Go/Set Predefined Position

Warning Only use G28 when your machine is homed to a repeatable position and the
desired G28 position has been stored with G28.1.

G28 uses the values stored in parameters


5161-5166 as the X Y Z A B C U V W final point to move to.
The parameter
values are absolute machine coordinates in the native machine units as
specifed in
the ini file. All axes defined in the ini file will be moved when
a G28 is issued. If no positions are
stored with G28.1 then all axes will go to
the machine origin.
G28 - makes a rapid move from the current
position to the absolute position of the values in
parameters 5161-5166.
G28 axes - makes a rapid move to the position specified by
axes including any offsets, then will
make a rapid move to the absolute
position of the values in parameters 5161-5166 for all axes
specified. Any
axis not specified will not move.
G28.1 - stores the current absolute position into parameters 5161-5166.

G28 Example Line

G28 Z2.5 (rapid to Z2.5 then to Z location specified in #5163)

It is an error if :
Cutter Compensation is turned on

http://linuxcnc.org/docs/html/gcode/g-code.html[4/7/2017 23:27:46]
G Codes

20. G30, G30.1 Go/Set Predefined Position

Warning Only use G30 when your machine is homed to a repeatable position and the
desired G30 position has been stored with G30.1.

G30 functions the same as G28 but uses the values stored in
parameters 5181-5186 as the X Y Z A B
C U V W
final point to move to. The parameter values are absolute machine
coordinates in the native
machine units as specifed in the ini file.
All axes defined in the ini file will be moved when a G30 is
issued. If no
positions are stored with G30.1 then all axes will go to the
machine origin.

Note G30 parameters will be used to move the tool when a M6 is programmed
if
TOOL_CHANGE_AT_G30=1 is in the [EMCIO] section of the ini file.

G30 - makes a rapid move from the current


position to the absolute position of the values in
parameters 5181-5186.
G30 axes - makes a rapid move to the position specified
by axes including any offsets, then will
make a rapid move to the
absolute position of the values in parameters 5181-5186 for all axes
specified. Any axis not specified will not move.
G30.1 - stores the current absolute position into parameters 5181-5186.

G30 Example Line

G30 Z2.5 (rapid to Z2.5 then to the Z location specified in #5i83)

It is an error if :
Cutter Compensation is turned on

21. G33 Spindle Synchronized Motion

G33 X- Y- Z- K-

K - distance per revolution

For spindle-synchronized motion in one direction, code G33 X- Y- Z- K-


where K gives the distance
moved in XYZ for each revolution of the spindle.
For instance, if starting at Z=0, G33 Z-1 K.0625
produces
a 1 inch motion in Z over 16 revolutions of the spindle.
This command might be part of a
program to produce a 16TPI thread.
Another example in metric, G33 Z-15 K1.5 produces
a
movement of 15mm while the spindle rotates 10 times for a thread of 1.5mm.
Spindle-synchronized motion waits for the spindle index and spindle at speed
pins, so multiple
passes line up. G33 moves end at the programmed endpoint.
G33 could be used to cut tapered
threads or a fusee.
All the axis words are optional, except that at least one must be used.

http://linuxcnc.org/docs/html/gcode/g-code.html[4/7/2017 23:27:46]
G Codes

Note K follows the drive line described by X- Y- Z-. K is not parallel to


the Z axis if X or
Y endpoints are used for example when cutting tapered
threads.

Technical Info
At the beginning of each G33 pass, LinuxCNC uses the spindle speed and the
machine acceleration
limits to calculate how long it will take Z to
accelerate after the index pulse, and determines how
many degrees the
spindle will rotate during that time. It then adds that angle to the
index position
and computes the Z position using the corrected spindle
angle. That means that Z will reach the
correct position just as it
finishes accelerating to the proper speed, and can immediately begin
cutting a good thread.

HAL Connections
The pins motion.spindle-at-speed and the encoder.n.phase-Z for the
spindle must be connected in
your HAL file before G33 will work.
See the Integrators Manual for more information on spindle
synchronized motion.

G33 Example

G90 (absolute distance mode)


G0 X1 Z0.1 (rapid to position)
S100 M3 (start spindle turning)
G33 Z-2 K0.125 (move Z axis to -2 at a rate to equal 0.125 per revolution)
G0 X1.25 (rapid move tool away from work)
Z0.1 (rapid move to starting Z position)
M2 (end program)

See G90 & G0 & M2 sections for more information.

It is an error if:
All axis words are omitted.
The spindle is not turning when this command is executed
The requested linear motion exceeds machine velocity limits
due to the spindle speed

22. G33.1 Rigid Tapping

G33.1 X- Y- Z- K-

K - distance per revolution

For rigid tapping (spindle synchronized motion with return),


code G33.1 X- Y- Z- K- where K- gives
the distance moved
for each revolution of the spindle.
A rigid tapping move consists of the following
sequence:

Warning If the X Y coordinates specified are not the current coordinates when
calling

http://linuxcnc.org/docs/html/gcode/g-code.html[4/7/2017 23:27:46]
G Codes

G33.1 for tapping the move will not be along the Z axis
but will rapid move
from the current location to
the X Y location specified.

1. A move to the specified coordinate, synchronized with the spindle at


the given ratio and
starting with a spindle index pulse.
2. When reaching the endpoint, a command to reverse the spindle (e.g.,
from clockwise to
counterclockwise).
3. Continued synchronized motion beyond the specified end coordinate
until the spindle actually
stops and reverses.
4. Continued synchronized motion back to the original coordinate.
5. When reaching the original coordinate,
a command to reverse the spindle a second time
(e.g.,
from counterclockwise to clockwise).
6. Continued synchronized motion beyond the original coordinate
until the spindle actually stops
and reverses.
7. An unsynchronized move back to the original coordinate.

Spindle-synchronized motions wait for spindle index,


so multiple passes line up.
G33.1 moves end at
the original coordinate.
All the axis words are optional, except that at least one must be used.

G33.1 Example

G90 (set absolute mode)


G0 X1.000 Y1.000 Z0.100 (rapid move to starting position)
S100 M3 (turn on the spindle, 100 RPM)
G33.1 Z-0.750 K0.05 (rigid tap a 20 TPI thread 0.750 deep)
M2 (end program)

See G90 & G0 & M2 sections for more information.

It is an error if:
All axis words are omitted.
The spindle is not turning when this command is executed
The requested linear motion exceeds machine velocity limits
due to the spindle speed

23. G38.n Straight Probe

G38.x axes

G38.2 - probe toward workpiece, stop on contact, signal error if failure


G38.3 - probe toward workpiece, stop on contact
G38.4 - probe away from workpiece, stop on loss of contact, signal error if failure

http://linuxcnc.org/docs/html/gcode/g-code.html[4/7/2017 23:27:46]
G Codes

G38.5 - probe away from workpiece, stop on loss of contact

Important You will not be able to use a probe move until your
machine has been set up
to provide a probe input signal.
The probe input signal must be connected
to motion.probe-input in a .hal file.
G38.x uses motion.probe-input to
determine when the probe has made (or lost) contact.
TRUE for probe
contact closed (touching), FALSE for probe contact open.

Program G38.x axes to perform a straight probe operation.


The axis words are optional, except that
at least one of them must be used.
The axis words together define the destination point that the
probe will move towards,
starting from the current location. If the probe is not tripped before the
destination
is reached G38.2 and G38.4 will signal an error.
The tool in the spindle must be a probe or contact a probe switch.
In response to this command, the machine moves the controlled point
(which should be at the center
of the probe ball) in a straight line at the
current feed rate toward the programmed point.
In inverse
time feed mode, the feed rate is such that the whole motion
from the current point to the
programmed point would take the specified time.
The move stops (within machine acceleration
limits)
when the programmed point is reached,
or when the requested change in the probe input
takes place,
whichever occurs first.
After successful probing, parameters 5061 to 5069 will be set to the
coordinates of X, Y, Z, A, B, C, U,
V, W of the location of the controlled point
at the time the probe changed state.
After unsuccessful
probing, they are set to the coordinates of the programmed point.
Parameter 5070 is set to 1 if the
probe succeeded and 0 if the probe failed.
If the probing operation failed, G38.2 and G38.4 will
signal an error
by posting an message on screen if the selected GUI supports that.
And by halting
program execution.
A comment of the form (PROBEOPEN filename.txt) will open
filename.txt and store the 9-number
coordinate consisting of
XYZABCUVW of each successful straight probe in it.
The file must be closed
with (PROBECLOSE). For more information
see the Comments Section.
An example file smartprobe.ngc is included (in the examples directory)
to demonstrate using probe
moves to log to a file the coordinates of a part.
The program smartprobe.ngc could be used with
ngcgui with minimal changes.
It is an error if:
the current point is the same as the programmed point.
no axis word is used
cutter compensation is enabled
the feed rate is zero
the probe is already in the target state

24. G40 Compensation Off


G40 - turn cutter compensation off. If tool compensation was on the
next move must be a
linear move and longer than the tool diameter.
It is OK to turn compensation off when it is
already off.

http://linuxcnc.org/docs/html/gcode/g-code.html[4/7/2017 23:27:46]
G Codes

G40 Example

; current location is X1 after finishing cutter compensated move


G40 (turn compensation off)
G0 X1.6 (linear move longer than current cutter diameter)
M2 (end program)

See G0 & M2 sections for more information.


It is an error if:
A G2/G3 arc move is programmed next after a G40.
The linear move after turning compensation off is less than the tool diameter.

25. G41, G42 Cutter Compensation

G41 <D-> (left of programmed path)


G42 <D-> (right of programmed path)

D - tool number

The D word is optional; if there is no D word the radius of the currently


loaded tool will be used (if
no tool is loaded and no D word is given,
a radius of 0 will be used).
If supplied, the D word is the tool number to use. This would normally
be the number of the tool in
the spindle (in which case the D word is
redundant and need not be supplied), but it may be any
valid tool number.

Note G41/G42 D0 is a little special. Its behavior is different on


random tool changer
machines and nonrandom tool changer machines
(see the Tool Change section).
On nonrandom
tool changer machines, G41/G42 D0 applies the TLO of the tool
currently
in the spindle, or a TLO of 0 if no tool is in the spindle. On random
tool
changer machines, G41/G42 D0 applies the TLO of the tool T0 defined
in the tool
table file (or causes an error if T0 is not defined in the
tool table).

To start cutter compensation to the left of the part profile, use G41.
G41 starts cutter compensation
to the left of the programmed line
as viewed from the positive end of the axis perpendicular to the
plane.
To start cutter compensation to the right of the part profile, use G42.
G42 starts cutter compensation
to the right of the programmed line
as viewed from the positive end of the axis perpendicular to the
plane.
The lead in move must be at least as long as the tool radius.
The lead in move can be a rapid move.
Cutter compensation may be performed if the XY-plane or XZ-plane is active.
User M100-M199 commands are allowed when Cutter Compensation is on.
The behavior of the machining center when cutter compensation
is on is described in the Cutter
Compensation
Section along with code examples.

http://linuxcnc.org/docs/html/gcode/g-code.html[4/7/2017 23:27:46]
G Codes

It is an error if:
The D number is not a valid tool number or 0.
The YZ plane is active.
Cutter compensation is commanded to turn on when it is already on.

26. G41.1, G42.1 Dynamic Cutter Compensation

G41.1 D- <L-> (left of programmed path)


G42.1 D- <L-> (right of programmed path)

D - cutter diameter
L - tool orientation (see lathe tool orientation)

G41.1 & G42.1 function the same as G41 & G42 with the added scope of being able
to program the
tool diameter. The L word defaults to 0 if unspecified.
It is an error if:
The YZ plane is active.
The L number is not in the range from 0 to 9 inclusive.
The L number is used when the XZ plane is not active.
Cutter compensation is commanded to turn on when it is already on.

27. G43 Tool Length Offset

G43 <H->

H - tool number (optional)

G43 enables tool length compensation. G43 changes subsequent motions


by offsetting the axis
coordinates by the length of the offset. G43
does not cause any motion. The next time a compensated
axis is moved,
that axiss endpoint is the compensated location.
G43 without an H word uses the currently loaded tool from the last
Tn M6.
G43 Hn uses the offset for tool n.

Note G43 H0 is a little special. Its behavior is different on random


tool changer
machines and nonrandom tool changer machines (see the
Tool Changers section).
On nonrandom tool changer
machines, G43 H0 applies the TLO of the tool
currently in the spindle,
or a TLO of 0 if no tool is in the spindle. On random tool
changer
machines, G43 H0 applies the TLO of the tool T0 defined in the tool
table
file (or causes an error if T0 is not defined in the tool table).

http://linuxcnc.org/docs/html/gcode/g-code.html[4/7/2017 23:27:46]
G Codes

G43 H- Example Line

G43 H1 (set tool offsets using the values from tool 1 in the tool table)

It is an error if:
the H number is not an integer, or
the H number is negative, or
the H number is not a valid tool number (though note that 0 is a valid
tool number on
nonrandom tool changer machines, it means "the tool
currently in the spindle")

28. G43.1: Dynamic Tool Length Offset

G43.1 axes

G43.1 axes - change subsequent motions by replacing the current offset(s)


of axes. G43.1 does
not cause any motion. The next time a compensated axis
is moved, that axiss endpoint is the
compensated location.

G43.1 Example

G90 (set absolute mode)


T1 M6 G43 (load tool 1 and tool length offsets, Z is at machine 0 and DRO shows
Z1.500)
G43.1 Z0.250 (offset current tool offset by 0.250, DRO now shows Z1.250)
M2 (end program)

See G90 & T & M6


sections for more information.

It is an error if:
motion is commanded on the same line as G43.1

Note G43.1 does not write to the tool table.

29. G43.2: Apply additional Tool Length Offset

G43.2 H-

H - tool number

G43.2 applies an additional simultaneous tool offset.

G43.2 Example

http://linuxcnc.org/docs/html/gcode/g-code.html[4/7/2017 23:27:46]
G Codes

G90 (set absolute mode)


T1 M6 (load tool 1)
G43 (or G43 H1 - replace all tool offsets with T1's offset)
G43.2 H10 (also add in T10's tool offset)
M2 (end program)

You can sum together an arbitrary number of offsets by calling G43.2


more times. There are no built-
in assumptions about which numbers are geometry
offsets and which are wear offsets, or that you
should have only one of each.
Like the other G43 commands, G43.2 does not cause any motion. The next time a
compensated axis
is moved, that axiss endpoint is the compensated location.
It is an error if:
H is unspecified, or
the given tool number does not exist in the tool table

Note G43.2 does not write to the tool table.

30. G49: Cancel Tool Length Compensation


G49 - cancels tool length compensation

It is OK to program using the same offset already in use. It is also


OK to program using no tool
length offset if none is currently being
used.

31. G53 Move in Machine Coordinates

G53 axes

To move in the machine coordinate system,


program G53 on the same line as a linear move. G53 is
not modal and must be
programmed on each line. G0 or G1 does not have to be programmed on the
same
line if one is currently active.
For example G53 G0 X0 Y0 Z0 will move the axes to the home position even if
the currently selected
coordinate system has offsets in effect.

G53 Example

G53 G0 X0 Y0 Z0 (rapid linear move to the machine origin)


G53 X2 (rapid linear move to absolute coordinate X2)

See G0 section for more information.

It is an error if:

http://linuxcnc.org/docs/html/gcode/g-code.html[4/7/2017 23:27:46]
G Codes

G53 is used without G0 or G1 being active,


or G53 is used while cutter compensation is on.

32. G54-G59.3 Select Coordinate System


G54 - select coordinate system 1
G55 - select coordinate system 2
G56 - select coordinate system 3
G57 - select coordinate system 4
G58 - select coordinate system 5
G59 - select coordinate system 6
G59.1 - select coordinate system 7
G59.2 - select coordinate system 8
G59.3 - select coordinate system 9

The coordinate systems store the axis values and the


XY rotation angle around the Z axis
in the
parameters shown in the following table.

Table 2. Coordinate System Parameters

Select CS X Y Z A B C U V W R
G54 1 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230

G55 2 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250

G56 3 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270

G57 4 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290

G58 5 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310

G59 6 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330

G59.1 7 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350

G59.2 8 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370

G59.3 9 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390

It is an error if:
selecting a coordinate system is used while cutter compensation is on.

See the Coordinate System Section for an overview of coordinate


systems.

http://linuxcnc.org/docs/html/gcode/g-code.html[4/7/2017 23:27:46]
G Codes

33. G61, G61.1 Exact Path Mode


G61 - Exact path mode, movement exactly as programed. Moves will slow or
stop as needed to
reach every programed point. If two sequential moves are
exactly co-linear movement will not
stop.
G61.1 - Exact stop mode, movement will stop at the end of each programed
segment.

34. G64 Path Blending

G64 <P- <Q->>

P - motion blending tolerance


Q - naive cam tolerance
G64 - best possible speed.
G64 P- <Q- > blending with tolerance.
G64 - without P means to keep the best speed possible, no matter how
far away from the
programmed point you end up.
G64 P- Q- - is a way to fine tune your system for best compromise
between speed and accuracy.
The P- tolerance means that the actual path
will be no more than P- away from the
programmed endpoint. The velocity
will be reduced if needed to maintain the path. In
addition, when you
activate G64 P- Q- it turns on the naive cam detector; when there are
a
series of linear XYZ feed moves at the same feed rate
that are less than Q- away from being
collinear, they are collapsed into a
single linear move. On G2/G3 moves in the G17 (XY) plane
when the maximum
deviation of an arc from a straight line is less than the G64 P-
tolerance
the arc is broken into two lines (from start of arc to
midpoint, and from midpoint to end).
those lines are then subject to
the naive cam algorithm for lines. Thus, line-arc, arc-arc, and
arc-line cases as well as line-line benefit from the naive cam
detector. This improves
contouring performance by simplifying the
path. It is OK to program for the mode that is
already active. See also
the Trajectory Control Section for more
information on these modes.
If
Q is not specified then it will have the same behavior as before and
use the value of P-.

G64 P- Example Line

G64 P0.015 (set path following to be within 0.015 of the actual path)

It is a good idea to include a path control specification in the preamble


of each G code file.

35. G73 Drilling Cycle with Chip Breaking

G73 X- Y- Z- R- Q- <L->

http://linuxcnc.org/docs/html/gcode/g-code.html[4/7/2017 23:27:46]
G Codes

R - retract position along the Z axis.


Q - delta increment along the Z axis.
L - repeat

The G73 cycle is drilling or milling with chip breaking.


This cycle takes a Q number which represents
a delta increment along the Z axis.
1. Preliminary motion.
If the current Z position is below the R position, The Z axis does a
rapid move to the R
position.
Move to the X Y coordinates
2. Move the Z-axis only at the current feed rate downward
by delta or to the Z position, whichever
is less deep.
3. Rapid up a bit.
4. Repeat steps 2 and 3 until the Z position is reached at step 2.
5. The Z axis does a rapid move to the R position.

It is an error if:
the Q number is negative or zero.
the R number is not specified

36. G76 Threading Cycle

G76 P- Z- I- J- R- K- Q- H- E- L-

http://linuxcnc.org/docs/html/gcode/g-code.html[4/7/2017 23:27:46]
G Codes

Figure 3. G76 Threading

Drive Line - A line through the initial X position parallel to the Z.


P- - The thread pitch in distance per revolution.
Z- - The final position of threads. At the end of the cycle the tool will
be at this Z position.

Note When G7 Lathe Diameter Mode is in force the values for I, J and K are
diameter
measurements. When G8 Lathe Radius Mode is in force the values for
I, J and K
are radius measurements.

I- - The thread peak offset from the drive line. Negative I values
are external threads, and
positive I values are internal threads.
Generally the material has been turned to this size before
the G76 cycle.
J- - A positive value specifying the initial cut depth. The first
threading cut will be J beyond the
thread peak position.
K- - A positive value specifying the full thread depth. The final
threading cut will be K beyond
the thread peak position.

Optional settings
R- - The depth degression. R1.0 selects constant depth on successive
threading passes. R2.0
selects constant area. Values between 1.0 and
2.0 select decreasing
depth but increasing area.
Values above 2.0 select decreasing area.
Beware that unnecessarily high degression values will
cause a large
number of passes to be used. (degression = a descent by stages or
steps.)
Q- - The compound slide angle is the angle (in degrees) describing to
what extent successive
passes should be offset along the drive line.
This is used to cause one side of the tool to remove
more material than
the other. A positive Q value causes the leading edge of the tool to
cut more
heavily.
Typical values are 29, 29.5 or 30.
H- - The number of spring passes. Spring passes are additional passes at
full thread depth. If
no additional passes are desired, program H0.
E- - Specifies the distance along the drive line used for the taper. The
angle of the taper will be
so the last pass tapers to the thread crest
over the distance specified with E.' E0.2' will give a
taper for the
first/last 0.2 length units along the
thread. For a 45 degree taper program E the
same as K
L- - Specifies which ends of the thread get the taper. Program L0 for no
taper (the default), L1
for entry taper, L2 for exit taper, or L3
for both entry and exit tapers. Entry tapers will pause at
the drive line to
synchronize with the index pulse then move at the feed rate
in to the beginning
of the taper. No entry taper and the tool will rapid to the
cut depth then synchronize and begin
the cut.

The tool is moved to the initial X and Z positions prior to issuing


the G76. The X position is the drive
line and the Z position is the
start of the threads.
The tool will pause briefly for synchronization before each threading
pass, so a relief groove will be
required at the entry unless the
beginning of the thread is past the end of the material or an entry
taper is used.
Unless using an exit taper, the exit move is not synchronized to the spindle
speed and will be a rapid

http://linuxcnc.org/docs/html/gcode/g-code.html[4/7/2017 23:27:46]
G Codes

move. With a slow spindle, the


exit move might take only a small fraction of a revolution. If the
spindle
speed is increased after several passes are complete, subsequent exit
moves will require a
larger portion of a revolution, resulting in a
very heavy cut during the exit move. This can be avoided
by providing a
relief groove at the exit, or by not changing the spindle speed while
threading.
The final position of the tool will be at the end of the drive line.
A safe Z move will be needed with an
internal thread to remove the tool
from the hole.
It is an error if:
The active plane is not the ZX plane
Other axis words, such as X- or Y-, are specified
The R- degression value is less than 1.0.
All the required words are not specified
P-, J-, K- or H- is negative
E- is greater than half the drive line length

HAL Connections
The pins motion.spindle-at-speed and the encoder.n.phase-Z for the
spindle must be connected in
your HAL file before G76 will work.
See the spindle pins in the Motion section for more
information.

Technical Info
The G76 canned cycle is based on the G33 Spindle Synchronized Motion. For more
information see
the G33 Technical Info.
The sample program g76.ngc shows the use of the G76 canned cycle,
and can be previewed and
executed on any machine using the sim/lathe.ini configuration.

G76 Example

G0 Z-0.5 X0.2
G76 P0.05 Z-1 I-.075 J0.008 K0.045 Q29.5 L2 E0.045

In the figure the tool is in the final position after the G76 cycle
is completed. You can see the entry
path on the right from the Q29.5
and the exit path on the left from the L2 E0.045. The white lines
are the cutting moves.

Figure 4. G76 Example

http://linuxcnc.org/docs/html/gcode/g-code.html[4/7/2017 23:27:46]
G Codes

37. Canned Cycles


The canned cycles G81 through G89 and the canned cycle stop G80
are described in this section.
All canned cycles are performed with respect to the currently-selected
plane. Any of the nine planes
may be selected. Throughout this section,
most of the descriptions assume the XY-plane has been
selected. The
behavior is analogous if another plane is selected, and the correct
words must be used.
For instance, in the G17.1 plane, the action of
the canned cycle is along W, and the locations
or
increments are given with U and V. In this case substitute U,V,W for
X,Y,Z in the instructions below.
Rotary axis words are not allowed in canned cycles. When the
active plane is one of the XYZ family,
the UVW axis words are not
allowed. Likewise, when the active plane is one of the UVW family, the
XYZ axis words are not allowed.

37.1. Common Words


All canned cycles use X, Y, Z, or U, V, W groups depending on the
plane selected and R words. The R
(usually meaning retract) position is
along the axis perpendicular to the currently selected plane (Z-
axis
for XY-plane, etc.) Some canned cycles use additional arguments.

37.2. Sticky Words


For canned cycles, we will call a number sticky if, when the same
cycle is used on several lines of
code in a row, the number must be
used the first time, but is optional on the rest of the lines. Sticky
numbers keep their value on the rest of the lines if they are not
explicitly programmed to be
different. The R number is always sticky.
In incremental distance mode X, Y, and R numbers are treated as
increments from the current
position and Z as an increment from the
Z-axis position before the move involving Z takes place. In
absolute
distance mode, the X, Y, R, and Z numbers are absolute positions in the
current coordinate
system.

37.3. Repeat Cycle


The L number is optional and represents the number of repeats.
L=0 is not allowed. If the repeat
feature is used, it is
normally used in incremental distance mode, so that the same sequence
of
motions is repeated in several equally spaced places along a
straight line. When L- is greater than 1
in incremental mode with the
XY-plane selected, the X and Y positions are determined by adding the
given X and Y numbers either to the current X and Y positions (on the
first go-around) or to the X
and Y positions at the end of the previous
go-around (on the repetitions). Thus, if you program L10 ,
you will
get 10 cycles. The first cycle will be distance X,Y from
the original location. The R and Z
positions do not change during the
repeats. The L number is not sticky. In absolute distance mode,
L>1 means do the same cycle in the same place several
times, Omitting the L word is equivalent to
specifying L=1.

37.4. Retract Mode


The height of the retract move at the end of each repeat (called
clear Z in the descriptions below) is
determined by the setting of
the retract mode: either to the original Z position (if that is above
the R

http://linuxcnc.org/docs/html/gcode/g-code.html[4/7/2017 23:27:46]
G Codes

position and the retract mode is G98, OLD_Z), or otherwise to


the R position. See the G98 G99
Section.

37.5. Canned Cycle Errors


It is an error if:
axis words are all missing during a canned cycle,
axis words from different groups (XYZ) (UVW) are used together,
a P number is required and a negative P number is used,
an L number is used that does not evaluate to a positive integer,
rotary axis motion is used during a canned cycle,
inverse time feed rate is active during a canned cycle,
or cutter compensation is active during a canned cycle.

If the XY plane is active, the Z number is sticky, and it is an error


if:
the Z number is missing and the same canned cycle was not already
active,
or the R number is less than the Z number.

If other planes are active, the error conditions are analogous to the
XY conditions above.

37.6. Preliminary and In-Between Motion


Preliminary motion is a set of motions that is common to all of the
milling canned cycles. If the
current Z position is below the R position,
the Z axis does a rapid move to the R position. This
happens only
once, regardless of the value of L.
In addition, at the beginning of the first cycle and each repeat, the
following one or two moves are
made
1. A rapid move parallel to the XY-plane to
the given XY-position,
2. The Z-axis make a rapid move to the R position, if it is
not already at the R position.

If another plane is active, the preliminary and in-between motions are


analogous.

37.7. Why use a canned cycle?


There are at least two reasons for using canned cycles. The first is
the economy of code. A single bore
would take several lines of code to
execute.
The G81 Example 1 demonstrates how a canned cycle could be
used to produce 8 holes with ten lines
of G code within the canned cycle mode.
The program below will produce the same set of 8 holes
using five lines
for the canned cycle. It does not follow exactly the same path nor does
it drill in the
same order as the earlier example. But the program
writing economy of a good canned cycle should
be obvious.

Note Line numbers are not needed but help clarify these examples

http://linuxcnc.org/docs/html/gcode/g-code.html[4/7/2017 23:27:46]
G Codes

Eight Holes

N100 G90 G0 X0 Y0 Z0 (move coordinate home)


N110 G1 F10 X0 G4 P0.1
N120 G91 G81 X1 Y0 Z-1 R1 L4(canned drill cycle)
N130 G90 G0 X0 Y1
N140 Z0
N150 G91 G81 X1 Y0 Z-0.5 R1 L4(canned drill cycle)
N160 G80 (turn off canned cycle)
N170 M2 (program end)

The G98 to the second line above means that the return move will be to
the value of Z in the first line
since it is higher that the R value
specified.

Twelve Holes in a Square


This example demonstrates the use of the L word to repeat a set of
incremental drill cycles for
successive blocks of code within the same
G81 motion mode. Here we produce 12 holes using five
lines of code in
the canned motion mode.

N1000 G90 G0 X0 Y0 Z0 (move coordinate home)


N1010 G1 F50 X0 G4 P0.1
N1020 G91 G81 X1 Y0 Z-0.5 R1 L4 (canned drill cycle)
N1030 X0 Y1 R0 L3 (repeat)
N1040 X-1 Y0 L3 (repeat)
N1050 X0 Y-1 L2 (repeat)
N1060 G80 (turn off canned cycle)
N1070 G90 G0 X0 (rapid move home)
N1080 Y0
N1090 Z0
N1100 M2 (program end)

http://linuxcnc.org/docs/html/gcode/g-code.html[4/7/2017 23:27:46]
G Codes

The second reason to use a canned cycle is that they all produce
preliminary moves and returns that
you can anticipate and control
regardless of the start point of the canned cycle.

38. G80 Cancel Canned Cycle


G80 - cancel canned cycle modal motion. G80 is part of modal group 1,
so programming any
other G code from modal group 1 will also
cancel the canned cycle.

It is an error if:
Axis words are programmed when G80 is active.

G80 Example

G90 G81 X1 Y1 Z1.5 R2.8 (absolute distance canned cycle)


G80 (turn off canned cycle motion)
G0 X0 Y0 Z0 (rapid move to coordinate home)

The following code produces the same final position and machine state as
the previous code.

G0 Example

G90 G81 X1 Y1 Z1.5 R2.8 (absolute distance canned cycle)


G0 X0 Y0 Z0 (rapid move to coordinate home)

The advantage of the first set is that, the G80 line clearly turns off the
G81 canned cycle. With the
first set of blocks, the programmer must turn
motion back on with G0, as is done in the next line, or
any other motion
mode G word.
If a canned cycle is not turned off with G80 or another motion word, the
canned cycle will attempt to
repeat itself using the next block of code
that contains an X, Y, or Z word. The following file drills
(G81) a set
of eight holes as shown in the following caption.

G80 Example 1

N100 G90 G0 X0 Y0 Z0 (coordinate home)


N110 G1 X0 G4 P0.1
N120 G81 X1 Y0 Z0 R1 (canned drill cycle)
N130 X2
N140 X3
N150 X4
N160 Y1 Z0.5
N170 X3
N180 X2
N190 X1
N200 G80 (turn off canned cycle)
N210 G0 X0 (rapid move home)
N220 Y0
N230 Z0
N240 M2 (program end)

Note Notice the z position change after the first four holes.
Also, this is one of the few
places where line numbers have some value,
being able to point a reader to a
specific line of code.

http://linuxcnc.org/docs/html/gcode/g-code.html[4/7/2017 23:27:46]
G Codes

Figure 5. G80 Cycle

The use of G80 in line N200 is optional because the G0 on the next
line will turn off the G81 cycle.
But using the G80 as shown in
Example 1, will provide for easier to read canned cycle. Without it, it
is not so obvious that all of the blocks between N120 and N200 belong
to the canned cycle.

39. G81 Drilling Cycle

G81 (X- Y- Z-) or (U- V- W-) R- L-

The G81 cycle is intended for drilling.


The cycle functions as follows:
1. Preliminary motion, as described in the
Preliminary and In-Between Motion section.
2. Move the Z-axis at the current feed rate to the Z
position.
3. The Z-axis does a rapid move to clear Z.

Example 1 - Absolute Position G81


Suppose the current position is (X1, Y2, Z3) and the following line of NC
code is interpreted.

G90 G98 G81 X4 Y5 Z1.5 R2.8

This calls for absolute distance mode (G90) and OLD_Z retract mode
(G98) and calls for the G81
drilling cycle to be performed once.
The X value and X position are 4.
The Y value and Y position are 5.
The Z value and Z position are 1.5.
The R value and clear Z are 2.8. OLD_Z is 3.

http://linuxcnc.org/docs/html/gcode/g-code.html[4/7/2017 23:27:46]
G Codes

The following moves take place:


1. a rapid move parallel to the XY plane to (X4, Y5)
2. a rapid move move parallel to the Z-axis to (Z2.8).
3. move parallel to the Z-axis at the feed rate to (Z1.5)
4. a rapid move parallel to the Z-axis to (Z3)

Example 2 - Relative Position G81


Suppose the current position is (X1, Y2, Z3) and the following line of NC
code is interpreted.

G91 G98 G81 X4 Y5 Z-0.6 R1.8 L3

This calls for incremental distance mode (G91) and OLD_Z retract mode
(G98). It also calls for the
G81 drilling cycle to be repeated three
times. The X value is 4, the Y value is 5, the Z value is -0.6 and
the
R value is 1.8. The initial X position is 5 (=1+4), the initial Y
position is 7 (=2+5), the clear Z
position is 4.8 (=1.8+3), and the Z
position is 4.2 (=4.8-0.6). OLD_Z is 3.
The first preliminary move is a maximum rapid move along the Z axis to
(X1,Y2,Z4.8), since OLD_Z
< clear Z.
The first repeat consists of 3 moves.
1. a rapid move parallel to the XY-plane to (X5, Y7)
2. move parallel to the Z-axis at the feed rate to (Z4.2)
3. a rapid move parallel to the Z-axis to (X5, Y7, Z4.8)

The second repeat consists of 3 moves. The X position is reset to


9 (=5+4) and the Y position to 12
(=7+5).
1. a rapid move parallel to the XY-plane to (X9, Y12, Z4.8)
2. move parallel to the Z-axis at the feed rate to (X9, Y12, Z4.2)
3. a rapid move parallel to the Z-axis to (X9, Y12, Z4.8)

The third repeat consists of 3 moves. The X position is reset to


13 (=9+4) and the Y position to 17
(=12+5).
1. a rapid move parallel to the XY-plane to (X13, Y17, Z4.8)
2. move parallel to the Z-axis at the feed rate to (X13, Y17, Z4.2)

http://linuxcnc.org/docs/html/gcode/g-code.html[4/7/2017 23:27:46]
G Codes

3. a rapid move parallel to the Z-axis to (X13, Y17, Z4.8)

Example 3 - Relative Position G81


Now suppose that you execute the first G81 block of code but from (X0,
Y0, Z0) rather than from
(X1, Y2, Z3).

G90 G98 G81 X4 Y5 Z1.5 R2.8

Since OLD_Z is below the R value, it adds


nothing for the motion but since the initial value of Z is
less than
the value specified in R, there will be an initial Z move during the
preliminary moves.

Example 4 - Absolute G81 R > Z


This is a plot of the path of motion for the second g81 block of code.

G91 G98 G81 X4 Y5 Z-0.6 R1.8 L3

http://linuxcnc.org/docs/html/gcode/g-code.html[4/7/2017 23:27:46]
G Codes

Since this plot starts with (X0, Y0, Z0), the interpreter adds the
initial Z0 and R1.8 and rapid moves
to that location. After that initial Z
move, the repeat feature works the same as it did in example 3
with the
final Z depth being 0.6 below the R value.

Example 5 - Relative position R > Z

G90 G98 G81 X4 Y5 Z-0.6 R1.8

Since this plot starts with (X0, Y0, Z0), the interpreter adds the initial Z0
and R1.8 and rapid moves
to that location as in Example 4. After that initial Z
move, the rapid move to X4 Y5 is done. Then the
final Z
depth being 0.6 below the R value. The repeat function would make the Z move
in the same
location again.

40. G82 Drilling Cycle, Dwell

G82 (X- Y- Z-) or (U- V- W-) R- L- P-

The G82 cycle is intended for drilling with a dwell at the bottom of
the hole.
1. Preliminary motion, as described in the
Preliminary and In-Between Motion section.
2. Move the Z-axis at the current feed rate to the Z position.
3. Dwell for the P number of seconds.
4. The Z-axis does a rapid move to clear Z.

The motion of a G82 canned cycle looks just like G81 with the
addition of a dwell at the bottom of
the Z move. The length of
the dwell is specified by a P- word in the G82 block.

41. G83 Peck Drilling Cycle

G83 (X- Y- Z-) or (U- V- W-) R- L- Q-

The G83 cycle (often called peck drilling) is intended for deep
drilling or
milling with chip breaking.
The retracts in this cycle clear the hole
of chips and cut off any long stringers (which are common
when drilling
in aluminum). This cycle takes a Q number which represents a delta
increment along

http://linuxcnc.org/docs/html/gcode/g-code.html[4/7/2017 23:27:46]
G Codes

the Z-axis. The retract before final depth will always


be to the retract plane even if G98 is in effect.
The final retract will
honor the G98/99 in effect. G83 functions the same as G81 with the addition
of
retracts during the drilling operation.
1. Preliminary motion, as described in the
Preliminary and In-Between Motion section.
2. Move the Z-axis at the current feed rate downward by
delta or to the Z position, whichever is
less deep.
3. Rapid move back out to the retract plane specified by the R word.
4. Rapid move back down to the current hole bottom, backed off a bit.
5. Repeat steps 2, 3, and 4 until the Z position is reached at step 2.
6. The Z-axis does a rapid move to clear Z.

It is an error if:
the Q number is negative or zero.

42. G84 Right-Hand Tapping Cycle


This code is currently unimplemented in LinuxCNC. It is accepted, but the
behavior is undefined.
See section G33.1

43. G85 Boring Cycle, Feed Out

G85 (X- Y- Z-) or (U- V- W-) R- L-

The G85 cycle is intended for boring or reaming, but could be used
for drilling or milling.
1. Preliminary motion, as described in the
Preliminary and In-Between Motion section.
2. Move the Z-axis only at the current feed rate to the Z
position.
3. Retract the Z-axis at the current feed rate to the R plane if it is lower
than the initial Z.
4. Retract at the traverse rate to clear Z.

44. G86 Boring Cycle, Spindle Stop, Rapid Move Out

G86 (X- Y- Z-) or (U- V- W-) R- L- P-

The G86 cycle is intended for boring. This cycle uses a P number
for the number of seconds to dwell.
1. Preliminary motion, as described in the
Preliminary and In-Between Motion section.
2. Move the Z-axis only at the current feed rate to the Z
position.
3. Dwell for the P number of seconds.

http://linuxcnc.org/docs/html/gcode/g-code.html[4/7/2017 23:27:46]
G Codes

4. Stop the spindle turning.


5. The Z-axis does a rapid move to clear Z.
6. Restart the spindle in the direction it was going.

It is an error if:
the spindle is not turning before this cycle is executed.

45. G87 Back Boring Cycle


This code is currently unimplemented in LinuxCNC. It is accepted, but the
behavior is undefined.

46. G88 Boring Cycle, Spindle Stop, Manual Out


This code is currently unimplemented in LinuxCNC. It is accepted, but the
behavior is undefined.

47. G89 Boring Cycle, Dwell, Feed Out

G89 (X- Y- Z-) or (U- V- W-) R- L- P-

The G89 cycle is intended for boring. This cycle uses a P number,
where P specifies the number of
seconds to dwell.
1. Preliminary motion, as described in the
Preliminary and In-Between Motion section.
2. Move the Z-axis only at the current feed rate to the Z
position.
3. Dwell for the P number of seconds.
4. Retract the Z-axis at the current feed rate to clear Z.

48. G90, G91 Distance Mode


G90 - absolute distance mode In absolute
distance mode, axis numbers (X, Y, Z, A, B, C, U, V,
W)
usually represent positions in terms of the currently active
coordinate system. Any
exceptions to that rule are described
explicitly in the G80 G89 Section.
G91 - incremental distance mode In incremental
distance mode, axis numbers usually
represent
increments from the current coordinate.

G90 Example

G90 (set absolute distance mode)


G0 X2.5 (rapid move to coordinate X2.5 including any offsets in effect)

G91 Example

http://linuxcnc.org/docs/html/gcode/g-code.html[4/7/2017 23:27:46]
G Codes

G91 (set incremental distance mode)


G0 X2.5 (rapid move 2.5 from current position along the X axis)

See G0 section for more information.

49. G90.1, G91.1 Arc Distance Mode


G90.1 - absolute distance mode for I, J & K offsets.
When G90.1 is in effect I and J both must
be specified with G2/3
for the XY plane or J and K for the XZ plane or it is an error.
G91.1 - incremental distance mode for I, J & K offsets. G91.1 Returns
I, J & K to their default
behavior.

50. G92 Coordinate System Offset

G92 axes

G92 makes the current point have the coordinates you want (without
motion), where the axis words
contain the axis numbers you want.
All axis words are optional, except that at least one must be
used.
If an axis word is not used for a given axis, the coordinate on
that axis of the current point is
not changed.
When G92 is executed, the origins of all coordinate systems move.
They move such that the value of
the current controlled point, in the currently
active coordinate system, becomes the specified value.
All coordinate
systems origins are offset this same distance.
For example, suppose the current point is at X=4 and there is
currently no G92 offset active. Then
G92 x7 is programmed. This
moves all origins -3 in X, which causes the
current point to become
X=7. This -3 is saved in parameter 5211.
Being in incremental distance mode has no effect on the action of G92.
G92 offsets may be already be in effect when the G92 is called.
If this is the case, the offset is
replaced with a new
offset that makes the current point become the specified value.
It is an error if:
all axis words are omitted.

LinuxCNC stores the G92 offsets and reuses them on the next run of a
program. To prevent this, one
can program a G92.1 (to erase them), or
program a G92.2 (to remove them - they are still stored).
See the Coordinate System Section for an
overview of coordinate systems.
See the Offsets Section for more information.
See the Parameters Section for more information.

51. G92.1, G92.2 Reset G92 Offsets

http://linuxcnc.org/docs/html/gcode/g-code.html[4/7/2017 23:27:46]
G Codes

G92.1 - reset G92 offsets to zero and set parameters


5211 - 5219 to zero.
G92.2 - reset G92 offsets to zero.

Note G92.1 only clears G92 offsets, to change G53-G59.3 coordinate system offsets
in G
code use either G10 L2 or G10 L20.

52. G92.3 Restore G92 Offsets


G92.3 - set the G92 offset to the values saved in parameters 5211 to 5219

You can set axis offsets in one program and use the same offsets in
another program. Program G92
in the first program. This will set
parameters 5211 to 5219. Do not use G92.1 in the remainder of the
first program. The parameter values will be saved when the first
program exits and restored when
the second one starts up.
Use G92.3 near the beginning of the second program. That will restore
the
offsets saved in the first program.

53. G93, G94, G95: Feed Rate Mode


G93 - is Inverse Time Mode. In inverse time feed rate mode, an F word
means the move should
be completed in [one divided by the F number]
minutes. For example, if the F number is 2.0,
the move should be
completed in half a minute.
When the inverse time feed rate mode is active, an F word must appear
on every line which has
a G1, G2, or G3 motion, and an F word on a line
that does not have G1, G2, or G3 is ignored.
Being in inverse time feed
rate mode does not affect G0 (rapid move) motions.
G94 - is Units per Minute Mode.
In units per minute feed mode, an F word is interpreted to
mean
the controlled point should move at a certain number of inches per
minute, millimeters
per minute, or degrees per minute, depending upon
what length units are being used and
which axis or axes are moving.
G95 - is Units per Revolution Mode
In units per revolution mode, an F word is interpreted to
mean the
controlled point should move a certain number of inches per revolution
of the
spindle, depending on what length units are being used and which
axis or axes are moving.
G95 is not suitable for threading, for
threading use G33 or G76.
G95 requires that
motion.spindle-speed-in to be connected.

It is an error if:
Inverse time feed mode is active and a line with G1, G2, or G3
(explicitly or implicitly) does not
have an F word.
A new feed rate is not specified after switching to G94 or G95

54. G96, G97 Spindle Control Mode

G96 <D-> S- (Constant Surface Speed)


G97 (RPM Mode)

http://linuxcnc.org/docs/html/gcode/g-code.html[4/7/2017 23:27:46]
G Codes

D - maximum spindle RPM


S - surface speed
G96 D- S- - selects constant surface speed of S feet per minute
(if G20 is in effect) or meters
per minute
(if G21 is in effect). D- is optional.
When using G96, ensure that X0 in
the current coordinate system (including offsets and tool
lengths) is
the center of rotation or LinuxCNC will not give the desired spindle speed.
G96 is
not affected by radius or diameter mode.
G97 selects RPM mode.

G96 Example Line

G96 D2500 S250 (set CSS with a max rpm of 2500 and a surface speed of 250)

It is an error if:
S is not specified with G96
A feed move is specified in G96 mode while the spindle is not turning

55. G98, G99 Canned Cycle Return Level


G98 - retract to the position that axis was in just before this series
of one or more contiguous
canned cycles was started.
G99 - retract to the position specified by the R word of the canned cycle.

Program a G98 and the canned cycle will use the Z position prior to
the canned cycle as the Z return
position if it is higher than the R
value specified in the cycle. If it is lower, the R value will be
used.
The R word has different meanings in absolute distance mode and
incremental distance mode.

G98 Retract to Origin

G0 X1 Y2 Z3
G90 G98 G81 X4 Y5 Z-0.6 R1.8 F10

The G98 to the second line above means that the return move will be to
the value of Z in the first line
since it is higher that the R value
specified.
The initial (G98) plane is reset any time cycle motion mode is
abandoned, whether explicitly (G80)
or implicitly (any motion code
that is not a cycle). Switching among cycle modes (say G81
to G83)
does NOT reset the initial plane. It is possible to switch
between G98 and G99 during a series of
cycles.

Last updated 2017-07-01 15:39:34 MDT

http://linuxcnc.org/docs/html/gcode/g-code.html[4/7/2017 23:27:46]
M Codes

M Codes
Table of Contents
1. M Code Quick Reference Table
2. M0, M1 Program Pause
3. M2, M30 Program End
4. M60 Pallet Change Pause
5. M3, M4, M5 Spindle Control
6. M6 Tool Change
6.1. Manual Tool Change
6.2. Tool Changer
7. M7, M8, M9 Coolant Control
8. M19 Orient Spindle
9. M48, M49 Speed and Feed Override Control
10. M50 Feed Override Control
11. M51 Spindle Speed Override Control
12. M52 Adaptive Feed Control
13. M53 Feed Stop Control
14. M61 Set Current Tool
15. M62 - M65 Digital Output Control
16. M66 Wait on Input
17. M67 Analog Output,Synchronized
18. M68 Analog Output, Immediate
19. M70 Save Modal State
20. M71 Invalidate Stored Modal State
21. M72 Restore Modal State
22. M73 Save and Autorestore Modal State
22.1. Selectively Restoring Modal State
23. M100 - M199 User Defined Commands

1. M Code Quick Reference Table

Code Description
M0 M1 Program Pause

M2 M30 Program End

M60 Pallet Change Pause

M3 M4 M5 Spindle Control

M6 Tool Change

M7 M8 M9 Coolant Control

http://linuxcnc.org/docs/html/gcode/m-code.html[4/7/2017 23:30:47]
M Codes

M19 Orient Spindle

M48 M49 Feed & Spindle Overrides Enable/Disable

M50 Feed Override Control

M51 Spindle Override Control

M52 Adaptive Feed Control

M53 Feed Stop Control

M61 Set Current Tool Number

m62-m65 Output Control

M66 Input Control

M67 Analog Output Control

M68 Analog Output Control

M70 Save Modal State

M71 Invalidate Stored Modal State

M72 Restore Modal State

M73 Save Autorestore Modal State

M100-M199 User Defined M-Codes

2. M0, M1 Program Pause


M0 - pause a running program temporarily. LinuxCNC remains
in the Auto Mode so MDI and
other manual actions
are not enabled. Pressing the cycle start button
will restart the program
at the following line.
M1 - pause a running program temporarily if the optional
stop switch is on. LinuxCNC remains
in the Auto Mode
so MDI and other manual actions are not enabled.
Pressing the cycle start
button
will restart the program at the following line.

Note It is OK to program M0 and M1 in MDI mode,


but the effect will probably not be
noticeable,
because normal behavior in MDI mode is
to stop after each line of
input anyway.

3. M2, M30 Program End

http://linuxcnc.org/docs/html/gcode/m-code.html[4/7/2017 23:30:47]
M Codes

M2 - end the program. Pressing cycle start will


start the program at the beginning of the file.
M30 - exchange pallet shuttles and end the program.
Pressing cycle start will start the program
at the beginning of the file.

Both of these commands have the following effects:


1. Change from Auto mode to MDI mode.
2. Origin offsets are set to the default (like G54).
3. Selected plane is set to XY plane (like G17).
4. Distance mode is set to absolute mode (like G90).
5. Feed rate mode is set to units per minute (like G94).
6. Feed and speed overrides are set to ON (like M48).
7. Cutter compensation is turned off (like G40).
8. The spindle is stopped (like M5).
9. The current motion mode is set to feed (like G1).
10. Coolant is turned off (like M9).

Note Lines of code after M2/M30 will not be executed. Pressing cycle start will
start the
program at the beginning of the file.

Warning Using % to wrap the G code does not do the same thing as a Program End.
See
File Requirements for more information on what using
% does not do.

4. M60 Pallet Change Pause


M60 - exchange pallet shuttles and then pause a running program
temporarily (regardless of
the setting of the optional stop
switch). Pressing the cycle start button
will restart the program
at the following line.

5. M3, M4, M5 Spindle Control


M3 - start the spindle clockwise at the S speed.
M4 - start the spindle counterclockwise at the S speed.
M5 - stop the spindle.

It is OK to use M3 or M4 if the S
spindle speed is set to zero. If this is done
(or if the speed override
switch is enabled and set to zero),
the spindle will not start turning.
If, later, the spindle speed is set
above zero
(or the override switch is turned up),
the spindle will start turning.
It is OK to use M3 or
M4 when the spindle is already
turning or to use M5 when the spindle is already stopped.

http://linuxcnc.org/docs/html/gcode/m-code.html[4/7/2017 23:30:47]
M Codes

6. M6 Tool Change

6.1. Manual Tool Change


If the HAL component hal_manualtoolchange is loaded,
M6 will stop the spindle and prompt the
user to change the tool
based on the last T- number programmed.
For more information on
hal_manualtoolchange see
the Manual Tool Change section.

6.2. Tool Changer


To change a tool in the spindle from the tool currently in the spindle
to the tool most recently
selected (using a T word - see Section
Select Tool), program M6.
When the tool change is complete:
The spindle will be stopped.
The tool that was selected (by a T word on the same line or on any
line after the previous tool
change) will be in the spindle.
If the selected tool was not in the spindle before the tool change,
the tool that was in the
spindle (if there was one) will be placed
back into the tool changer magazine.
If configured in the .ini file some axis positions may move when a M6
is issued. See the EMCIO
section for more
information on tool change options.
No other changes will be made. For example, coolant will continue to
flow during the tool
change unless it has been turned off by an M9.

Warning The tool length offset is not changed by M6, use G43 after the
M6 to change
the tool length offset.

The tool change may include axis motion.


It is OK (but not useful) to program a change to the tool
already in the spindle.
It is OK if there is no tool in the selected slot;
in that case, the spindle will be
empty after the tool change.
If slot zero was last selected,
there will definitely be no tool in the
spindle after a tool change. The tool
changer will have to be setup to perform the tool change in hal
and possibly
classicladder.

7. M7, M8, M9 Coolant Control


M7 - turn mist coolant on.
M8 - turn flood coolant on.
M9 - turn all coolant off.

It is OK to use any of these commands, regardless of the current coolant


state.

8. M19 Orient Spindle


M19 R- Q- [P-]

http://linuxcnc.org/docs/html/gcode/m-code.html[4/7/2017 23:30:47]
M Codes

R Position to rotate to from 0, valid range is 0-360 degrees


Q Number of seconds to wait until orient completes. If
motion.spindle.is_oriented does not
become true within Q timeout
an error occurs.
P Direction to rotate to position.
0 rotate for smallest angular movement (default)
1 always rotate clockwise (same as M3 direction)
2 always rotate counterclockwise (same as M4 direction)

M19 is cleared by any of M3,M4,M5.


Spindle orientation requires a quadrature encoder with an index to sense the
spindle shaft position
and direction of rotation.
INI Settings in the [RS274NGC] section.
ORIENT_OFFSET = 0-360 (fixed offset in degrees added to M19 R word)
HAL Pins
motion.spindle-orient-angle (out float)
Desired spindle orientation for M19. Value of the M19
R word parameter
plus the value of the [RS274NGC]ORIENT_OFFSET ini parameter.
motion.spindle-orient-mode (out s32)
Desired spindle rotation mode. Reflects M19 P
parameter word, Default = 0
motion.spindle-orient (out bit)
Indicates start of spindle orient cycle. Set by M19. Cleared by
any of
M3,M4,M5.
If spindle-orient-fault is not zero during spindle-orient true, the
M19
command fails with an error message.
motion.spindle-is-oriented (in bit)
Acknowledge pin for spindle-orient. Completes orient cycle.
If
spindle-orient was true when spindle-is-oriented
was asserted, the spindle-orient pin is
cleared and the spindle-locked
pin is asserted. Also, the spindle-brake pin is asserted.
motion.spindle-orient-fault (in s32)
Fault code input for orient cycle. Any value other than
zero will
cause the orient cycle to abort.
motion.spindle-locked (out bit)
Spindle orient complete pin. Cleared by any of M3,M4,M5.

9. M48, M49 Speed and Feed Override Control


M48 - enable the spindle speed and feed rate override controls.
M49 - disable both controls.

It is OK to enable or disable the controls when


they are already enabled or disabled.
See the Feed
Rate Section for more details.

10. M50 Feed Override Control


M50 <P1> - enable the feed rate override control. The P1
is optional.
M50 P0 - disable the feed rate control.

http://linuxcnc.org/docs/html/gcode/m-code.html[4/7/2017 23:30:47]
M Codes

While disabled the feed override will have no influence,


and the motion will be executed at
programmed feed rate.
(unless there is an adaptive feed rate override active).

11. M51 Spindle Speed Override Control


M51 <P1> - enable the spindle speed override control. The P1
is optional.
M51 P0 - disable the spindle speed override control program.
While disabled the spindle speed
override will have
no influence, and the spindle speed will have the
exact program specified
value of the S-word
(described in Spindle Speed Section).

12. M52 Adaptive Feed Control


M52 <P1> - use an adaptive feed. The P1 is optional.
M52 P0 - stop using adaptive feed.

When adaptive feed is enabled, some external input value is used together
with the user interface
feed override value and the commanded feed rate
to set the actual feed rate. In LinuxCNC, the HAL
pin motion.adaptive-feed
is used for this purpose. Values on motion.adaptive-feed should range
from 0 (feed hold) to 1 (full speed).

13. M53 Feed Stop Control


M53 <P1> - enable the feed stop switch. The P1 is optional.
Enabling the feed stop switch will
allow motion to be
interrupted by means of the feed stop control. In LinuxCNC,
the HAL pin
motion.feed-hold is used for this purpose. A true
value will cause the motion to stop when M53
is active.
M53 P0 - disable the feed stop switch. The state of motion.feed-hold
will have no effect on feed
when M53 is not active.

14. M61 Set Current Tool


M61 Q- - change the current tool number while in MDI or Manual mode.
One use is when you
power up LinuxCNC with a tool currently in
the spindle you can set that tool number without
doing a tool change.

It is an error if:
Q- is not 0 or greater

15. M62 - M65 Digital Output Control


M62 P- - turn on digital output synchronized with motion.
The P- word specifies the digital
output number.

http://linuxcnc.org/docs/html/gcode/m-code.html[4/7/2017 23:30:47]
M Codes

M63 P- - turn off digital output synchronized with motion.


The P- word specifies the digital
output number.
M64 P- - turn on digital output immediately.
The P- word specifies the digital output number.
M65 P- - turn off digital output immediately.
The P- word specifies the digital output number.

The P-word ranges from 0 to a default value of 3. If needed the the


number of I/O can be increased
by using the num_dio parameter when loading
the motion controller. See the Motion Section for
more
information.
The M62 & M63 commands will be queued. Subsequent commands referring
to the same output
number will overwrite the older settings. More than
one output change can be specified by issuing
more than one M62/M63
command.
The actual change of the specified outputs will happen at the
beginning of the next motion
command. If there is no subsequent motion
command, the queued output changes wont happen. Its
best to always
program a motion G code (G0, G1, etc) right after the M62/63.
M64 & M65 happen immediately as they are received by the motion
controller. They are not
synchronized with movement, and they will
break blending.

Note M62-65 will not function unless the appropriate motion.digital-out-nn pins are
connected in your hal file to outputs.

16. M66 Wait on Input

M66 P- | E- <L->

P- - specifies the digital input number from 0 to 3.


E- - specifies the analog input number from 0 to 3.
L- - specifies the wait mode type.
Mode 0: IMMEDIATE - no waiting, returns immediately.
The current value of the input
is stored in parameter #5399
Mode 1: RISE - waits for the selected input to perform a rise event.
Mode 2: FALL - waits for the selected input to perform a fall event.
Mode 3: HIGH - waits for the selected input to go to the HIGH state.
Mode 4: LOW - waits for the selected input to go to the LOW state.
Q- - specifies the timeout in seconds for waiting. If the timeout is
exceeded, the wait is
interrupt, and the variable #5399 will be holding
the value -1. The Q value is ignored if the L-
word is zero (IMMEDIATE).
A Q value of zero is an error if the L-word is non-zero.
Mode 0 is the only one permitted for an analog input.

M66 Example Lines

M66 P0 L3 Q5 (wait up to 5 seconds for digital input 0 to turn on)

http://linuxcnc.org/docs/html/gcode/m-code.html[4/7/2017 23:30:47]
M Codes

M66 wait on an input stops further execution of the program, until the
selected event (or the
programmed timeout) occurs.
It is an error to program M66 with both a P-word and an E-word (thus
selecting both an analog and
a digital input). In LinuxCNC these
inputs are not monitored in real time and thus should not be
used for
timing-critical applications.
The number of I/O can be increased by using the num_dio or num_aio parameter
when loading the
motion controller. See the Motion Section
for more information.

Note M66 will not function unless the appropriate motion.digital-in-nn pins or
motion.analog-in-nn pins are connected in your hal file to an input.

Example HAL Connection

net signal-name motion.digital-in-00 <= parport.0.pin10-in

17. M67 Analog Output,Synchronized

M67 E- Q-

M67 - set an analog output synchronized with motion.


E- - output number ranging from 0 to 3.
Q- - is the value to set (set to 0 to turn off).

The actual change of the specified outputs will happen at the


beginning of the next motion
command. If there is no subsequent motion
command, the queued output changes wont happen. Its
best to always
program a motion G code (G0, G1, etc) right after the M67. M67 functions
the same as
M62-63.
The number of I/O can be increased by using the num_dio or num_aio parameter
when loading the
motion controller. See the Motion Section for
more information.

Note M67 will not function unless the appropriate motion.analog-out-nn pins are
connected in your hal file to outputs.

18. M68 Analog Output, Immediate

M68 E- Q-

M68 - set an analog output immediately.

http://linuxcnc.org/docs/html/gcode/m-code.html[4/7/2017 23:30:47]
M Codes

E- - output number ranging from 0 to 3.


Q- - is the value to set (set to 0 to turn off).

M68 output happen immediately as they are received by the motion


controller. They are not
synchronized with movement, and they will
break blending. M68 functions the same as M64-65.
The number of I/O can be increased by using the num_dio or num_aio parameter
when loading the
motion controller. See the Motion Section for
more information.

Note M68 will not function unless the appropriate motion.analog-out-nn pins are
connected in your hal file to outputs.

19. M70 Save Modal State


To explicitly save the modal state at the current call level, program
M70. Once modal state has been
saved with M70, it can be restored
to exactly that state by executing an M72.
A pair of M70 and M72 instructions will typically be used to
protect a program against inadvertant
modal changes within
subroutines.
The state saved consists of:
current G20/G21 settings (imperial/metric)
selected plane (G17/G18/G19 G17.1,G18.1,G19.1)
status of cutter compensation (G40,G41,G42,G41.1,G42,1)
distance mode - relative/absolute (G90/G91)
feed mode (G93/G94,G95)
current coordinate system (G54-G59.3)
tool length compensation status (G43,G43.1,G49)
retract mode (G98,G99)
spindle mode (G96-css or G97-RPM)
arc distance mode (G90.1, G91.1)
lathe radius/diameter mode (G7,G8)
path control mode (G61, G61.1, G64)
current feed and speed (F and S values)
spindle status (M3,M4,M5) - on/off and direction
mist (M7) and flood (M8) status
speed override (M51) and feed override (M50) settings
adaptive feed setting (M52)
feed hold setting (M53)

Note that in particular, the motion mode (G1 etc) is NOT restored.
current call level means either:

http://linuxcnc.org/docs/html/gcode/m-code.html[4/7/2017 23:30:47]
M Codes

executing in the main program. There is a single storage location


for state at the main program
level; if several M70 instructions
are executed in turn, only the most recently saved state is
restored
when an M72 is executed.
executing within a G-code subroutine. The state saved with M70
within a subroutine behaves
exactly like a local named parameter - it
can be referred to only within this subroutine
invocation with an
M72 and when the subroutine exits, the paramter goes away.

A recursive invocation of a subroutine introduces a new call level.

20. M71 Invalidate Stored Modal State


Modal state saved with an M70 or by an M73 at the current call
level is invalidated (cannot be
restored from anymore).
A subsequent M72 at the same call level will fail.
If executed in a subroutine which protects modal state by an M73, a
subsequent return or endsub
will not restore modal state.
The usefulness of this feature is dubious. It should not be relied upon as it might
go away.

21. M72 Restore Modal State


Modal state saved with an M70 code can be
restored by executing an M72.
The handling of G20/G21 is specially treated as feeds are interpreted
differently depending on
G20/G21: if length units (mm/in) are about to
be changed by the restore operation, 'M72 'will
restore the distance
mode first, and then all other state including feed to make sure the
feed value is
interpreted in the correct unit setting.
It is an error to execute an M72 with no previous M70 save
operation at that level.
The following example demonstrates saving and explicitely restoring
modal state around a
subroutine call using M70 and M72. Note that
the imperialsub subroutine is not "aware" of the M7x
features and can be
used unmodified:

O<showstate> sub
(DEBUG, imperial=#<_imperial> absolute=#<_absolute> feed=#<_feed> rpm=#<_rpm>)
O<showstate> endsub
O<imperialsub> sub
g20 (imperial)
g91 (relative mode)
F5 (low feed)
S300 (low rpm)
(debug, in subroutine, state now:)
o<showstate> call
O<imperialsub> endsub
; main program
g21 (metric)
g90 (absolute)
f200 (fast speed)
S2500 (high rpm)
(debug, in main, state now:)
o<showstate> call

http://linuxcnc.org/docs/html/gcode/m-code.html[4/7/2017 23:30:47]
M Codes

M70 (save caller state in at global level)


O<imperialsub> call
M72 (explicitely restore state)
(debug, back in main, state now:)
o<showstate> call
m2

22. M73 Save and Autorestore Modal State


To save modal state within a subroutine, and restore state on
subroutine endsub or any return path,
program M73.
Aborting a running program in a subroutine which has an M73
operation will not restore state .
Also, the normal end (M2) of a main program which contains an M73
will not restore state.
The suggested use is at the beginning of a O-word subroutine as in the
following example. Using
M73 this way enables designing subroutines
which need to modify modal state but will protect the
calling program
against inadvertant modal changes. Note the use of
predefined named parameters in
the showstate subroutine.

O<showstate> sub
(DEBUG, imperial=#<_imperial> absolute=#<_absolute> feed=#<_feed> rpm=#<_rpm>)
O<showstate> endsub
O<imperialsub> sub
M73 (save caller state in current call context, restore on return or endsub)
g20 (imperial)
g91 (relative mode)
F5 (low feed)
S300 (low rpm)
(debug, in subroutine, state now:)
o<showstate> call
; note - no M72 is needed here - the following endsub or an
; explicit 'return' will restore caller state
O<imperialsub> endsub
; main program
g21 (metric)
g90 (absolute)
f200 (fast speed)
S2500 (high rpm)
(debug, in main, state now:)
o<showstate> call
o<imperialsub> call
(debug, back in main, state now:)
o<showstate> call
m2

22.1. Selectively Restoring Modal State


Executing an M72 or returning from a subroutine which contains an
M73 will restore all modal state
saved.
If only some aspects of modal state should be preserved, an
alternative is the usage of predefined
named parameters, local parameters and conditional
statements. The idea is to remember the modes
to be restored at the
beginning of the subroutine, and restore these before exiting. Here is
an
example, based on snippet of nc_files/tool-length-probe.ngc:

http://linuxcnc.org/docs/html/gcode/m-code.html[4/7/2017 23:30:47]
M Codes

O<measure> sub (measure reference tool)


;
#<absolute> = #<_absolute> (remember in local variable if G90 was set)
;
g30 (above switch)
g38.2 z0 f15 (measure)
g91 g0z.2 (off the switch)
#1000=#5063 (save reference tool length)
(print,reference length is #1000)
;
O<restore_abs> if [#<absolute>]
g90 (restore G90 only if it was set on entry:)
O<restore_abs> endif
;
O<measure> endsub

23. M100 - M199 User Defined Commands

M1-- <P- Q->

M1-- - an integer in the range of 100 - 199.


P- - a number passed to the file as the first parameter.
Q- - a number passed to the file as the second parameter.

Note After creating a new M1nn file you must restart the GUI so it is aware
of the new
file, otherwise you will get an Unkown m code error.

The external program named M100 through M199 (no extension and a capitol M)
is executed with
the optional P and Q values as its two arguments.
Execution of the G code file pauses until the
external program exits.
Any valid executable file can be used. The file must be located in the search
path specificed in the ini file configuration. See the
Display Section for more information on search
paths.

Warning Do not use a word processor to create or edit the files. A word processor
will
leave unseen codes that will cause problems and may prevent a bash or
python file from working. Use a text editor like Gedit in Ubuntu or
Notepad++
in other operating systems to create or edit the files.

The error Unknown M code used denotes one of the following


The specified User Defined Command does not exist
The file is not an executable file
The file name has an extension
The file name does not follow this format M1nn where nn = 00 through 99
The file name used a lower case M

http://linuxcnc.org/docs/html/gcode/m-code.html[4/7/2017 23:30:47]
M Codes

For example to open and close a collet closer that is controlled by a


parallel port pin using a bash
script file using M101 and M102. Create two
files named M101 and M102. Set them as executable
files (typically
right click/properties/permissions) before running LinuxCNC. Make sure the
parallel
port pin is not connected to anything in a HAL file.

M101 Example File

#!/bin/bash
# file to turn on parport pin 14 to open the collet closer
halcmd setp parport.0.pin-14-out True
exit 0

M102 Example File

#!/bin/bash
# file to turn off parport pin 14 to open the collet closer
halcmd setp parport.0.pin-14-out False
exit 0

To pass a variable to a M1nn file you use the P and Q option like this:

M100 P123.456 Q321.654

M100 Example file

#!/bin/bash
voltage=$1
feedrate=$2
halcmd setp thc.voltage $voltage
halcmd setp thc.feedrate $feedrate
exit 0

To display a graphic message and stop until the message window is closed
use a graphic display
program like Eye of Gnome to display the graphic
file. When you close it the program will resume.

M110 Example file

#!/bin/bash
eog /home/john/linuxcnc/nc_files/message.png
exit 0

To display a graphic message and continue processing the G code file


suffix an ampersand to the
command.

M110 Example display and keep going

#!/bin/bash
eog /home/john/linuxcnc/nc_files/message.png &
exit 0

http://linuxcnc.org/docs/html/gcode/m-code.html[4/7/2017 23:30:47]
GUIA DE USO FRESADORA DE ESCRITORIO POCKETNC

FUSION 360 ULTIMATE BETA POST (FULL 5 AXIS)

DOWNLOAD POST

This is a set of instructions for uploading new Fusion CAM posts. Please note that the current post will eventually be

updated and provided within the Fusion software. This update may take several months, so the following solution can be

used as a temporary work around.

The steps are as follows

1. Migrate to A360 cloud storage (a360.autodesk.com/drive)

2. Sign in using Fusion 360 login information

3. Open folder labeled CAMPosts

3. Use blue upload button to upload new cam post

5. To use the new post within Fusion, select a toolpath as normal, then select the Source dropdown and "My Cloud Posts"

Recopilado por Ulises Rodrguez cnc@avancort.com Julio/2017


GUIA DE USO FRESADORA DE ESCRITORIO POCKETNC

The Post processor tab will now show a list of all cam posts available on your A360 drive. It will take several minutes

before posts uploaded to the A360 drive show up in Fusion, in some cases users may need to restart Fusion for a post to be

available.

Recopilado por Ulises Rodrguez cnc@avancort.com Julio/2017


MASTERCAM POST PROCESSOR INFORMATION
First, choose the version of Mastercam you have to download the necessary files:

MASTERCAM X9

MASTERCAM 2017

The files you will need are in the zipped file and include:

Paste files 1, 2 and 3 in the following directory location:


Users > Public > Public Documents > shared mcamx9 > CNC_MACHINES
Paste files 4 and 5 in the following directory location:
Users > Public > Public Documents > shared mcamx9 > mill > Posts
With these files in location open Mastercam and navigate to:
MACHINE TYPE -> MILL -> Manage list
In this location find Generic PocketNC 5X Mill.mmd-9 and Generic PocketNC 5X Mill MM.MMD-9
The difference between these two mill formats is related to the unit output:
Metric - Generic PocketNC 5X Mill MM.MMD-9
English - Generic PocketNC 5X Mill.mmd-9
Select either or both of these machines and click "Add" to move these machines onto the standard mill
selection in the Mastercam interface.
MACHINE SIMULATION
To run the Machine Sim on your PC:

Click here to download all the files needed to run the machine simulation on your computer.

1) Create a Folder in C:\Users\Public\Documents\shared mcamx9\MachineSimulation\MachSim called

POCKETNC (correct naming convention is critical)

2) Copy all file enclosed in the Zip (must unzip them first) to this folder

3) Launch machine sim inside mastercam and the POCKETNC should now appear in the dropdown.
The desk and laptop are defined as the machine housing and can be turned off or made transparent for
simulation.
WORK COORDINATE SYSTEM TUTORIAL
If you are new to Mastercam or programming 5 axis, the this tutorial would be a good introduction to get the hang

of things:

WCS TUTORIAL

EXAMPLE FILES
Shortcuts for switching workspaces
You can now switch workspaces with CTRL + Leftbracket and CTRL + Rightbracket key
combos. This will take you through the next and previous workspace in the order it is listed in
the workspace switcher.
Key Combinations
Command
Extrude E
Hole H
Press Pull Q
Fillet F
Move M
Toggle Visibility V
Toggle Component Color Cycling Shift + N
Model Toolbox S
Appearance A
Compute All Crtl + B (Windows) or Command + B (Mac)
Joint J
As-built Joint Shift + J
Line L
2-point Rectangle R
Center Diameter Circle C
Trim T
Offset O
Measure I
Project P
Normal / Construction X
Sketch Dimension D
Scripts and Add-ins Shift + S
Window Selection 1
Freeform Selection 2
Paint Selection 3
Delete Del
Windows Key
System Keyboard Shortcuts Mac Key Combinations
Combinations
Create Version Ctrl + S Command + S
Recovery Save Ctrl + Shift + S Command + Shift + S
Windows Key
Canvas Selection Mac Key Combinations
Combinations
Pan Hold Middle Mouse Button Hold Middle Mouse Button
Windows Key
Canvas Selection Mac Key Combinations
Combinations
Zoom Roll Middle Mouse Button Roll Middle Mouse Button
Orbit Hold Shift + Hold Middle Hold Shift + Hold Middle
Mouse Button Mouse Button
Orbit around point Hold Shift + Click then Hold Hold Shift + Click then Hold
Middle Mouse Button Middle Mouse Button
Undo Ctrl + Z Command + Z
Redo Ctrl + Y Command + Y
Copy Ctrl + C Command + C
Paste Ctrl + V Command + V
Cut Ctrl + X Command + X
Sculpt Workspace Windows Key
Mac Key Combinations
Selection Combinations
Grow selection Shift + Up Arrow Shift + Up Arrow
Shrink selection Shift + Down Arrow Shift + Down Arrow
Loop selection Alt + P Control + P
Loop grow selection Alt + O Control + O
Ring selection Alt + L Control + L
Ring grow selection Alt + K Control + K
Ring shrink selection Alt + J Control + J
Previous U Alt + Left Arrow Control + Command + Left
Arrow
Next U Alt + Right Arrow Control + Command +
Right Arrow
Previous V Alt + Down Arrow Control + Command +
Down Arrow
Next V Alt + Up Arrow Control + Command + Up
Arrow
Range selection Alt + M Command + M
Invert selection Alt + N Command + N
Toggle box mode Alt + 1 Control + 1
Toggle control frame mode Alt + 2 Control + 2
Toggle smooth mode Alt + 3 Control + 3
Select edge ring Double-click an edge Double-click an edge
Select face ring Select two faces then Select two faces then
double-click a third face double-click a third face
Windows Key
Edit Form Command Mac Key Combinations
Combinations
Add geometry Alt + Drag Alt + Drag
Add geometry and keep Alt + Ctrl + Drag Alt + Command + Drag
creases
Render Workspace Windows Key
Mac Key Combinations
Command Combinations
Appearance A A
Animate Workspace Windows Key
Mac Key Combinations
Command Combinations
Transform Components M M
Auto Explode All Levels U U
Manual Explode E E
View U U
Publish Video P P
Simulate Workspace Windows Key
Mac Key Combinations
Command Combinations
New Simulation Study N N
Structural Constraint C C
Structural Loads L L
Force F F
Model View Ctrl + L Command + L
DOF View Ctrl + D Command + D
Groups View Ctrl + G Command + G
Results View Ctrl + R Command + R
Settings E E
Drawing Workspace Windows Key
Mac Key Combinations
Command Combinations
Projected View P P
Move M M
Delete Delete Delete
Center Mark C C
Dimension D D
Text T T
Balloon B B
CAM Workspace Windows Key
Mac Key Combinations
Command Combinations
Generate Toolpath Ctrl + G Command + G
Duplicate Ctrl + D Command + D
Show Log Ctrl + L Command + L
Scripts and Add-Ins Shift + S Shift + S
FUSION 360 /

Learn from the experts.


Foundational Concepts
Before your first sketch is made, understanding the foundational philosophy behind Fusion 360 is
essential. Its recommended to start here before moving on to other lessons.

1:33 min.Learn more

Sketch
Sketches are the base building blocks for your design. In this tutorial, youll be able to start a new sketch,
create sketch objects, edit existing sketches, and turn sketches into 3D objects.

5:07 miLearn more


Import
Importing data will save you a significant amount of time. In this tutorial, youll learn how to import CAD
data and other types of files, including documents, images, and specifications.

2:29 minLearn more

Model
Fusion 360 gives you flexibility in your preferred modeling technique. In this tutorial, youll learn how to
turn a sketch into a parametric 3D model.

4:56 Learn more


Assemble
Fusion 360 provides two approaches to assembly modeling: traditional distributed design and top-down
(multi-body). In this tutorial, youll learn how to use both, with an emphasis on assembly joints. Unlike
the Caster Wheel design, the Tripod design is saved in your Data Panel. In the Samples section of your
Data Panel, browse to: Basic Training -> 06 Assemblies -> 06_tripod.

8:16 min.Learn more

Manage
With Fusion 360 you can manage your design and project data from anywhere, on any device. In this
tutorial, youll learn about managing and sharing your CAD files, version management, and workgroup
access.

5:29 minLearn more


Drawings
Product development requires more than just a 2D drawing. In this tutorial, youll learn how to create 2D
drawings, renderings, and animations.

5:59 min.Learn more

Collaborate
Product development typically requires multiple people to take a product to market. In this tutorial, youll
learn how to collaborate using Fusion 360 and A360.

4:41 min.Learn more


Sculpt
Use this powerful tool set in Fusion 360 for freeform modeling driven by T-Splines. In this example,
youll learn how to use push pull gestures to form a body to a complex freeform shape.

4:39 minLearn more

Patch
Gain additional flexibility in an already robust modeling environment with the patch workspace in Fusion
360. In this tutorial, you will learn how to use surfaces to help in the product design process.

3:47 min.Learn more


Simulate
Simulation enables engineers to gain crucial information on a products performance and strength. In this
tutorial, youll learn how to set up a simulation, apply mesh, and analyze the results.

5:02 miLearn more

CAM
Fusion 360 has the functionality to help you fabricate your designs. In this tutorial, youll learn how to set
up toolpaths and generate machine code to cut, turn, and mill your designs.

4:16 min.Learn more


Toolpath Overview
Understanding Toolpaths by Type and Use
Before going further, it is helpful to understand how 2D toolpaths are used in most CAM software
programs. Please refer to the Autodesk CNC Handbook for more elaborate detail. Fusion has some
Toolpath types, like the 2D Adaptive, that offer additional roughing functionality. This will be covered
in greater detail, in future lessons.

Under the 2D and 3D icons you'll find drop-down menus containing the toolpath/machining commands:
The following example illustrates selecting a 2D Pocket strategy which is used to remove the interior
cavity of a part . Be sure to create a Setup before starting your toolpaths. A setup defines a number of
general properties for your machining process. For more information about creating a setup, see the
Help topic: Setup Reference.
There are 2 ways to select a toolpath. You can click the appropriate icon from the command ribbon . In
this example, you would click 2D panel 2D Pocket

Look for this Icon... Within this menu... .


Note: As an alternative, you can also right-click in an empty portion of the graphics window to display
the marking menu. As shown below, 2D is selected from the overflow menu and then 2D Pocket is
selected from the submenu.

About 2D Machining Strategies


Learn about the various 2D machining strategies.
Drilling and Hole Making

CAM includes a powerful Drill tool for generating drilling, counterboring and tapping operations. The
Circular strategy is used for milling cylindrical pockets and islands, while the Thread operation is used
for thread milling cylindrical pockets and islands. The Bore operation allows you to bore mill
cylindrical pockets and islands by selecting the cylindrical geometry directly. All operations are
optimized to minimize tool travel and overall cycle time. Both standard and customized cycles are
supported for all point-to-point operations, including spot-drilling, deep drilling with chip break, etc.
Contouring

With the Contouring strategies, you can easily machine 2D and 3D contours with separate lead-in and
lead-out, and with or without tool compensation. Choose multiple roughing and finishing passes and
multiple depth cuts for any contour. Machine open and closed contours without creating additional
geometry and eliminate sharp motion with corner smoothing.

Pocket

The Pocket toolpath is used for machining closed curves both with and without islands. The toolpath
starts at the center of the pocket and works its way outward. The entry can be selected anywhere on the
model and includes possibilities for plunge, ramp, or at a pre-drilled position. The special high-speed
option creates a smooth toolpath and allows you to specify a maximum tool engagement. As a result, the
feedrate can be increased significantly, reducing the machining time and tool wear.
Facing

The Facing strategy is designed for quick part facing to prepare the raw stock for further machining. It
can also be used for clearing flat areas in general.

Adaptive Clearing

The Adaptive Clearing strategy creates a roughing/clearing toolpath inside closed curves both with and
without islands. This strategy avoids full-width cuts by progressively shaving material off the remaining
stock. The generated toolpath ensures that the cutting conditions remain constant with a stable load on
the tool. As a result, the feedrate can be increased significantly, reducing the machining time by 40% or
more which provides improved surface quality and less tool wear.
About 3D Machining Strategies
Learn about the various 3D machining strategies.
Parallel

Parallel passes is one of the most widely used finishing strategies. The passes are parallel in the XY
plane and follow the surface in the Z direction. Parallel passes are best suited for shallow areas and
down milling. To automatically detect shallow areas, the machining can be limited to a maximum angle
between the tool tip and the surface. By selecting the down milling option, tool deflection can be
minimized when machining complex surfaces.

Contour

Contour passes is the best strategy for finishing steep walls, but can be used for semi-finish and finish
machining on the more vertical areas of a part. If a slope angle is specified, for example 30 to 90
degrees, the steeper areas are machined, leaving the shallower areas up to 30 degrees for more
appropriate strategies.
Horizontal Clearing

The Horizontal Clearing strategy automatically detects all the flat areas of the part and clears them
with an offsetting path. When the flat area is shelved above the surrounding areas, the cutter moves
beyond the flat areas to clean the edges. Using the optional maximum stepdown, horizontal faces can be
machined in stages, making the horizontal clearing suitable for both semi-finishing and finishing.

Pencil

The Pencil strategy creates toolpaths along internal corners and fillets with small radii, removing
material that no other tool can reach. Whether using single or multiple passes, the Pencil strategy is
ideally suited for cleaning up after other finishing strategies.
Scallop/Constant Stepover

The Scallop strategy creates passes that are at a constant distance from one another by offsetting inward
along the surface. The passes follow sloping and vertical walls to maintain the stepover. Although
Scallop finishing can be used to finish an entire part, it is most commonly used for rest machining,
following a combination of Contour and Parallel passes. Like the other finishing strategies, machining
can be limited by a contact angle range.
Spiral

Spiral machining creates a spiral toolpath from a given center point, generating a constant contact as it
machines within a given boundary. It is ideally suited for use on round shallow parts using tool contact
angles up to 40 degrees, in conjunction with Contour passes for the more vertical faces. The center
point of the detail to be machined is located automatically, or can be user-specified. This strategy also
supports tool contact angles.
Morphed Spiral

The Morphed Spiral strategy is very similar to the Spiral strategy. However, a Morphed Spiral
operation generates the spiral from the selected boundary as opposed to a Spiral operation which trims
the generated passes to the machining boundary. This means that Morphed Spiral can be used for
additional surfaces for which Spiral is not appropriate. It can also be very useful when machining free-
form/organic surfaces. Although the Scallop strategy is often used for these types of surfaces, both the
sharp corners and the linking transitions between the generated passes can result in visible marks. The
Morphed Spiral strategy generally provides a much smoother toolpath by avoiding these issues.

Radial

Like spiral machining, Radial machining also starts from a center point, providing you with the ability
to machine radial parts. It also provides the option to stop short of the center of the radial passes, where
they become very dense. The center point of the detail to be machined is located automatically, or can be
user-specified. This routine can also be used with tool contact angles.
Pocket

Pocket is the conventional roughing strategy for clearing large quantities of material effectively. The
part is cleared layer by layer with smooth offset contours maintaining climb milling throughout the
operation. To avoid plunging, the tool ramps down along a helical path between levels. To maintain a
high feedrate, and thereby reducing machining time, sharp changes of direction are avoided by
smoothing the tool motion.

Adaptive Clearing

Adaptive Clearing is an innovative roughing strategy that offers significant improvements compared to
conventional roughing strategies. The strategy avoids full-width cuts by progressively shaving material
off the remaining stock. The generated toolpath ensures that the cutting conditions remain constant with
a stable load on the tool. As a result, the feedrate can be increased significantly, reducing the machining
time by 40% or more.
3+2 Machining

All 2D and 3D strategies support 3+2 machining (5-axis positioning) by rotating the part or the head of
the machine tool through a combination of A, B, or C axis motions. Creating 3+2 operations is just a
matter of selecting a work plane for the operation and CAM takes care of the rest. Once in position, all
machining strategies are available, and are both tooling and holder gouge protected for all the strategies
that normally support this.
Toolpath Parameter Pages
Toolpath Dialog Tabs and Their Meaning
Strategy Dialog and Tabs
Th illustrations shown below will give you an overview of what you can expect to see in the toolpath
dialogs.
Tool tab - Select the tool to use, Coolant function, as well as the Feeds and Speeds.
Geometry tab - Select the geometry to be machined.

Heights tab - Define the toolpath clearance heights, starting heights, retract heights and cut depth.
Passes tab - Define how the tool removes material. The parameters of this page will change depending
on the toolpath type.
Linking tab - Define how the tool responds between cuts. Sets the conditions for retracting and how the
tool will lead in or lead off of the cut.
GUIA DE USO FRESADORA DE ESCRITORIO POCKETNC

MASTERCAM POST PROCESSOR INFORMATION


First, choose the version of Mastercam you have to download the necessary files:

MASTERCAM X9

MASTERCAM 2017

The files you will need are in the zipped file and include:

Paste files 1, 2 and 3 in the following directory location:

Users > Public > Public Documents > shared mcamx9 > CNC_MACHINES

Paste files 4 and 5 in the following directory location:

Users > Public > Public Documents > shared mcamx9 > mill > Posts

With these files in location open Mastercam and navigate to:

MACHINE TYPE -> MILL -> Manage list

In this location find Generic PocketNC 5X Mill.mmd-9 and Generic PocketNC 5X Mill MM.MMD-9

The difference between these two mill formats is related to the unit output:

Recopilado por Ulises Rodrguez cnc@avancort.com Julio/2017


GUIA DE USO FRESADORA DE ESCRITORIO POCKETNC

Metric - Generic PocketNC 5X Mill MM.MMD-9

English - Generic PocketNC 5X Mill.mmd-9

Select either or both of these machines and click "Add" to move these machines onto the standard mill
selection in the Mastercam interface.

MACHINE SIMULATION
To run the Machine Sim on your PC:

Click here to download all the files needed to run the machine simulation on your computer.

1) Create a Folder in C:\Users\Public\Documents\shared mcamx9\MachineSimulation\MachSim called

POCKETNC (correct naming convention is critical)

2) Copy all file enclosed in the Zip (must unzip them first) to this folder
Recopilado por Ulises Rodrguez cnc@avancort.com Julio/2017
GUIA DE USO FRESADORA DE ESCRITORIO POCKETNC

3) Launch machine sim inside mastercam and the POCKETNC should now appear in the dropdown.

The desk and laptop are defined as the machine housing and can be turned off or made transparent for
simulation.

Recopilado por Ulises Rodrguez cnc@avancort.com Julio/2017


GUIA DE USO FRESADORA DE ESCRITORIO POCKETNC

Recopilado por Ulises Rodrguez cnc@avancort.com Julio/2017


GUIA DE USO FRESADORA DE ESCRITORIO POCKETNC

WORK COORDINATE SYSTEM TUTORIAL


If you are new to Mastercam or programming 5 axis, the this tutorial would be a good introduction to get the hang of

things:

WCS TUTORIAL

EXAMPLE FILES

Recopilado por Ulises Rodrguez cnc@avancort.com Julio/2017

S-ar putea să vă placă și