Fundamental Principles of NC Programming
2.5 Second programming example for milling application
Fundamentals
Programming Manual, 11/2006, 6FC5398-1BP10-2BA0
71
Example
_MILL1_MPF
N10 MSG("THIS IS MY NC PROGRAM")
;MSG = Message output in an alarm line
:10 F200 S900 T1 D2 M3
;Feed, spindle, tool,
;tool offset, spindle clockwise
N20 G0 X100 Y100
;Rapid traverse to position
N30 G1 X150
;Rectangle with feed, straight line in X
N40 Y120
;Straight line in Y
N50 X100
;Straight line in X
N60 Y100
;Straight line in Y
N70 G0 X0 Y0
;Return rapid traverse movement
N100 M30
;End of block
2.5 Second programming example for milling application
Programming a sample workpiece
This programming example contains surface and side milling, as well as drilling.
• The workpiece is intended for machining on a vertical milling machine.
• The dimensions are in inches.
Machine manufacturer
The machine data settings must be defined correctly before the program can run on the
machine.
References: /FB1/Function Manual Basic Functions; Axes, Coordinate Systems,.. (K2)
Example
%_N_RAISED_BOSS_MPF
N005 MSG ("Traverse axes to tool change location")
N010 START01:SUPA G0 G70 Z0 D0
N015 SUPA X0 Y0
;********************Tool change********************
N020 MSG ("Tool change active")
N025 T1 M6
;d = 3 inch face cutter
N030 MSG ()
;Clears the message from block N020
N035 MSG ("Face milling Z=0 workpiece surface")
N040 G0 G54 X-2 Y.6 S800 M3 M8
N045 Z1 D1
N050 G1 Z0 F50
N055 X8 F25
N060 G0 Y3.5
N065 G1 X-2