Fundamental Principles of NC Programming
2.5 Second programming example for milling application
Fundamentals
Programming Manual, 10.2004 Edition, 6FC5 298-7AB00-0BP1
2-23
Machine manufacturer
The machine data settings must be defined correctly before the program can run on the
machine.
References: /FB1/ Functional description, K2, "Axes, Coordinate Systems,.."
Programming 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/Functional description, K2, "Axes, Coordinate Systems,.."
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********************