Professional Documents
Culture Documents
THAI NGUYEN UNIVERSITY OF TECHNOLOGYeeee
THAI NGUYEN UNIVERSITY OF TECHNOLOGYeeee
REPORT
USE INVENTOR TO OUTPUT G CODE FOR CNC
MILLLING
THAI NGUYEN,2020
I. INTRODUCE ABOUT G CODE?
1. Define
G-code (also RS-274), which has many variants, is the common name for the
most widely used computer numerical control (CNC) programming language. It is
used mainly in computer-aided manufacturing to control automated machine tools.
G-code is a language in which people tell computerized machine tools how to
make something. The "how" is defined by G-code instructions provided to a
machine controller (industrial computer) that tells the motors where to move, how
fast to move, and what path to follow. The two most common situations are that,
within a machine tool such as a lathe or mill, a cutting tool is moved according to
these instructions through a toolpath cutting away material to leave only the
finished workpiece and/or, an unfinished workpiece is precisely positioned in any
of up to nine axes[1] around the three dimensions relative to a toolpath and, either or
both can move relative to each other. The same concept also extends to noncutting
tools such as forming or burnishing tools, photoplotting, additive methods such
as 3D printing, and measuring instruments.
2. FUNCTION
G-codes, also called preparatory codes, are any word in a CNC program that
begins with the letter G. Generally it is a code telling the machine tool what type of
action to perform, such as:
Address Description
O program number
/ optional block
N block number
G preparatory function
X, Y, Z, U, V ,W length coordinates
E auxiliary coordinate
F feed rate
S spindle speed
M miscellaneous function
T tool number
L repetition number
Q auxiliary data
,C distance of chamfer
,R radius of fillet
,A angle of straight line
2. List of G-Code
Code Description code descrition
G00 Rapid positioning G50 Scaling function cancel
G01 Linear interpolation
G02 Circular interpolation, clockwise G52 Local coordinate system (LCS)
G05.1 Q1.
AI Advanced Preview Control G61 Exact stop check, modal
G30 Return to secondary home G99 Return to R level in canned cycle
position (machine zero, aka
machine reference point)
G31 Feed until skip function G76 Fine boring cycle for milling
G40 Tool radius compensation off G82 Drilling cycle with dwell
G41 Tool radius compensation left G83 Peck drilling cycle (full
retraction from pecks)
G45 Axis offset single increase G85 boring cycle, feed in/feed out
G46 Axis offset single decrease G86 boring cycle, feed in/spindle
stop/rapid out
G48 Axis offset double decrease G88 boring cycle, feed in/spindle
stop/manual operation
G49 Tool length offset compensation G89 boring cycle, feed in/dwell/feed
cancel out
Syntax: G0 [X] [Y] [Z] [A] [B] [C] [F] where F is the speed parameter.
Example: G0 X0.5 Y1.3 Z10 F1000
Meaning: Move to the coordinates X 0.5, Y 1.3, Z 10 at a speed of 1000 units /
minute.
2.Command to move in the arc G2 & G3.
* Note how to write, syntax ...
Gx is required, where x is between 0 (or 00) and 99.
[x] the [] symbol denotes an optional parameter that may or may not be.
G2 - command to move forward (CW)
F1000
G17
G1 X1 Y2
G2 X2 Y1 I1 J1
These two commands have the same syntax and usage but quite complicated
because it is necessary to define the correct machining plane as XY, XZ or YZ. For
each machining plane the corresponding parameter is also different.
Instructions G17, G18, G19 specify the machining planes xOy, xOz and yOz,
respectively.
IV. INVERTOR CAM WITH G-CODE
+ milling
+ side offset
And save it
Choose cutting tool that you require
Note: Choose number you want to cut in retract height offset, feed height offset
and maximum stepdown.
This is simulation process.
Output program