Sie sind auf Seite 1von 6

Fanuc CNC MiII

Programming.
Learn Fanuc CNC miII programming
from these exampIes.
Learn Fanuc CNC programming compIete from the
Fanuc programming DVDs:
Fanuc CNC Programming DVDs.
Home: http://home.coIumbus.rr.com/hputz
If you have any questions or probIems, caII me at 614-888-8466 or
send an emaiI.
Fanuc CNC MiII Programming:
A typicaI Fanuc miIIing program with caIcuIations for speeds and feeds:
This exampIe wouId work on Fanuc controIs since the 6M in about
1981.
MiId SteeI, 4" square, Iets driII 2 hoIes with a High Speed DriII, each .5"
diam. and .5" deep.
O2001(Program Number)
N1G90G80G40
(G90 sets up AbsoIute, G80 and G40 cIear out info)
N2T1M6
(TooI change to T1, M6 activates changer, or on kneemiII, waits for
manuaI tooI change.)
N3G54G0X1.0Y1.0S800M3
(G54 is co-ordinate system, G0 is rapid to X1.0 and Y1.0, S800= about
100SFM for MiId SteeI cut with .5" diam. HS driII)
Page 1 oI 6 Learn Fanuc CNC Mill and Lathe Programming/Machining.
14/05/2008 http://home.columbus.rr.com/hputz/learningcncmill.html
N4G43H1Z1.0M8
(G43 is tooI Iength comp, H1 identifies Iocation in offset page where
tooI Iength is registered, Z1.0 is Iocation to which we rapid, turn cooIant
on)
N4G81G99X1.0Y1.0R.1Z-.5F8.0
(Use Canned CycIe G81, rapid to R-vaIue, driII to Z-.5 at F8.0, return to R
in rapid)
N5X3.0Y3.0
(Repeat cycIe at new Iocation)
N6G80M9
(CanceI CycIe, cooIant off)
N7G91G28Z0
(SimpIified return to Z-zero in G91, incrementaI)
N8G28X0Y0
(Home in X-Y)
N9M30
(End, rewinds memory)
Note: G28 is one of the very few codes that has to be repeated, aImost
aII others carry forward and do not have to be repeated.
MiII-DriII feed is aIways in Inches per minute.
To figure feed: RPM times Feed per Rev.= F vaIue.
The simpIified method for figuring RPM:
SFM times 4 divided by diam. of cutter.
Cutter Comp ExampIe: Originally E-Mailed to CNC Newsgroup.
Hi Brian: Here it is, a 2" square part with radius.
Zero is at Iower Ieft corner.
O1000
N1 G90 G80 G40
N2 T1 M6
N3 G54 G0 X-1.0 Y-1.0 S2500 M3 (Rapid to off the Ieft corner of part.)
N4 G43 H1 Z-.5 M8(Set tooI Iength.)
N5 G41 D31 X0 Y-.5 (Set comp in offset #31, approaching from Ieft.)
N6 G1 Y1.75 F25.0 (Cut part.)
N7 G2 X.25 Y2.0 R.25
N8 G1 X1.75
N9 G2 X2.0 Y1.75 R.25
N10 G1 Y0
N11 X-.5
N12 G0 G40 X-1.0 Y-1.0 (CanceI comp going back to originaI point.)
N13 G91 G28 Z0
N14 M30
Page 2 oI 6 Learn Fanuc CNC Mill and Lathe Programming/Machining.
14/05/2008 http://home.columbus.rr.com/hputz/learningcncmill.html
This wiII work in any Fanuc since 1980 or so. This is the simpIe tooI
changer, you may have to separate the T1 and the M6.
AIso, the D vaIue couId be programmed as a H on some machines.
Time Estimating for the above:
TooI change time depends on the machine and the time for setup
depends on your own skiII.
The basic method for figuring the time for cutting is to figure RPM, then
the rate of feed per minute.
Take the totaI distance cut in G1 and divide that by the rate of feed.
In this case, the part is 2 " square, so the totaI cutting distance is 8"
pIus the .5" before the part and .5" past it.
TotaI of 9" divided by the feedrate of 25.0 IPM is about 30 seconds. Add
a few seconds for rapid and you have a reasonabIe time estimate.
Fanuc Sub exampIe:
We want to C/DriII, DriII and Tap a series of hoIes, aII are Iocated at odd
dimensions, we wiII driII 1 hoIe and put aII hoIe Iocations into a sub for
recaII.
Advantage: You onIy have to program Iocations once and recaII Sub.
More important: You can not make a mistake in hoIe Iocations, check
out the C/DriII positions and you can be sure the driII, tap, wiII be
exactIy in the same Iocation.
Note: EspeciaIIy usefuI when dimensions are converted from Metric and
every Inch dimension is a reaIIy odd number.
ExampIe:
O100
N1 G90 G80 G40
T1 M6
G54 G0 X1.0 Y1.0 S1000 M3
G43 H1 Z1.0 M8
G81 G99 R.1 Z-.25 F5.0 (C/DriII 1st. hoIe.)
M98 P1000 (Jump to Sub O1000 for other Iocations.)
G91 G28 Z0 M9
M30
Sub: O1000
X2.093
X3.1229
Page 3 oI 6 Learn Fanuc CNC Mill and Lathe Programming/Machining.
14/05/2008 http://home.columbus.rr.com/hputz/learningcncmill.html
X4.0327
Y1.1175
X.3214
G80 M9
M99 (Return to Main Program)
DriII 1st. hoIe, then recaII Sub, same for chamfering, tapping, etc.
Counterbore Sub Program:
Its in IncrementaI, so we can repeat it anywhere on the part. This was
originaIIy deveIoped for a bus company to manufacture fIoor boards
with a Iot of different size hoIes. The method is to pIace the tooI right
above the hoIe Iocation and then caII the Sub Iike this:
M98 P1000(This was a 1" counterbore, we made up Subs for aII hoIe
sizes and caIIed them according to hoIe size)
G91 G1 Z-.5 F12.0(Feed to depth)
G41 D31 X-.5 F10.0(Set Comp, tooI radius in offset #31)
G3 I.5(CompIete CircIe)
G1 G40 X.5 F20.0(Take out Comp)
G0 Z.5
M99(Return to Main Program)
Next Iine in Main program shouId be new hoIe position, the Re-caII sub,
etc.
The appIicabIe videos to Iearn the detaiIed method of programming:
"Prep" to Iearn about feeds-speeds and basics.
"Math" to figure shapes.
"Lathe" or "MiII" to Iearn programming.
"Shortcuts-Canned CycIes" for ease of programming and Sub
Programming..
"Cutter Comp" for Iathes and miIIs.
Check out aII DVDs: http://home.coIumbus.rr.com/hputz.
Look for more Iater.
CaII or E-MaiI for any questions.
CNC MiIIing reIated Iinks:
The best source for Speeds, Feeds info:
www.cutdata.com
Page 4 oI 6 Learn Fanuc CNC Mill and Lathe Programming/Machining.
14/05/2008 http://home.columbus.rr.com/hputz/learningcncmill.html
CNC Download and Graph:
www.cncwarrior.com
Do a lot of programming for very little money:
www.bobcadcam.com
CNC Networking & Factory Automation:
www.shopfloorautomations.com
CNC Editor & Graphing Software, easy to use and affordable:
www.mnsi.net/~eaglesd/
Fanuc service and training:
www.GEFANUC.com
CNC programming too complicated? Try the Centroid control:
www.centroidcnc.com
Affordable and good, CNC mills with Centroid:
www.atrump.com
First class tools for milling, drilling:
www.coromant.sandvik.com
CNC milling facts and knowledge:
www.nfrpartners.com/cncfaq.htm
CNC Educational Services:
http://cnc.hypermart.net
VaIuabIe CNC Resources: Machining reIated magazines.
ts amazing how much you can learn by reading machinetool related magazines,
subscribe to these, they are usually free, put them in your favorite relaxing place and
learn---.
American Machinist: The Original.
www.americanmachinist.com
Modern Machine Shop.
www.mmsonline.com
Manufacturing Engineering.
www.sme.org/manufacturingengineering
Cutting Tool Engineering.
www.ctemag.com
CNC...West, concentrating on the west coast.
www.cnc-west.com
Page 5 oI 6 Learn Fanuc CNC Mill and Lathe Programming/Machining.
14/05/2008 http://home.columbus.rr.com/hputz/learningcncmill.html
Moldmaking Facts & Knowledge
www.moldmakingtechnology.com
Learning about manual machining:
www.metalwebnews.com
For info, write:
hputz@columbus.rr.com .
614-888-8466
Home
Page 6 oI 6 Learn Fanuc CNC Mill and Lathe Programming/Machining.
14/05/2008 http://home.columbus.rr.com/hputz/learningcncmill.html

Das könnte Ihnen auch gefallen