# How to program arcs and linear movement in G-Code manually

Introduction

G-code is used in a lot of automated manufacturing processes. For example, CNC machines and 3D printers use G-code to make parts. Programming arcs and linear movement in G-code can be a little tricky. I've noticed that there aren't many sources on the internet that address this topic. So, I decided to make my own guide. I will be presenting basics steps and tips in programming arcs and linear movement in G-code. This will only include movement on a 2D plane and is designed to give a general overview of programming. The instructable will not take into account material properties, tool diameter, speeds, and feeds. I do encourage you to do all the calculations yourself as you go through my instructable. This will give you a better understanding of the code and remember a tool can become a crutch. Don't forget to use the tool path dimenisions .pdf as a reference.

Materials

- Paper
- Writing Utensil
- Scientific Calculator
- .pdf file of supplied technical drawing
-Time-approximately 60 min

Terminology

Absolute- A series of numerical positions that are calculated from a fixed point of origin.
Clearance Plane- A plane designated for safe tool travel in between cutting functions.
End point-The point where an arc ends
F variable- Feed rate (inches per minute)
G00- Rapid linear movement
G01- Linear interpolation
G02- Clockwise circular interpolation
G03- Counter Clockwise circular interpolation
I variable- Incremental coordinate used to define a point in the X direction.
Incremental- A series of numerical positions that is referenced from a previous position and is independent of absolute origin.
IPM-A unit of velocity used to determine feed rate. (inches per minute)
J variable- Incremental coordinate used to define a coordinate in the Y direction.
Origin- The fixed, central point in the Cartesian coordinate system. The origin has a numerical value of zero.
Start point- The point where an arc begins.
X variable- Absolute coordinate used to define a point in the X direction.
Y variable- Absolute coordinate used to define a point in the Y direction.

Formulas

1) Xs=Xc+(R*cos(Theta1))
2) Ys=Yc+(R*sin(Theta1))
3) Xe=Xc+(R*cos(Theta2))
4) Ye=Yc+(R*sin(Theta2))
5) I=(Xc-(R*cos(Theta1)))-Xc
6) J=(Yc-(R*sin(Theta1)))-Yc

Remove these ads by Signing Up