L4 TA202A NC Programming
L4 TA202A NC Programming
NC Programming
Lecture 4
Mohit Law
Mechanical Engineering
[email protected]
https://www.youtube.com/watch?v=IbV4vIYUg1U
N040 G91 X25.00 Y10.00 Z−12.55 F150.0 S1100 T06 M03 M07
Block Incremental Move to these With this feed Use Turn spindle &
number approach coordinates and speed tool # 6 coolant ‘ON’
Load tool number 6 on the spindle (T06), rotate the spindle CW at 1,100 rev/min
(S1100, M03) and turn the cutting fluid on (M07) before the motion starts. Move the
machine tool in 25 mm, 10 mm, and 12.55 mm increments (G91) in the x, y, and z
directions with the resultant feeding velocity of 150 mm/min along the tool path.
N040 represents the 40th block sequence of the entire part program
Source: Altintas’s Mfg. Automation book
The velocities of two axes are controlled to keep the tool on a straight path in a plane
of motion. To keep the end mill following the straight line (𝑃1 𝑃2 ) at a given vector
feed velocity, the linear interpolation command G01 must be used.
y
𝑃1 10,12 ;
𝑃2 60,37 ;
x
Absolute programming mode Incremental programming mode
N0010 G90 G01 X60.0 Y37.0 F300.0 or N0010 G91 G01 X50.0 Y25.0 F300.0
Source: Altintas’s Mfg. Automation book
The velocities of two axes on a plane of motion are varied to keep the tool following
the given arc at the specified feed velocity. Some CNC systems require the coordinates
of the arc center and arc’s end point, whereas others need the radius of the arc and its
end point. CNC assumes that the tool is located at the beginning point of the arc.
• M00: Program stop. Terminates further program execution after the completion of
other commands in the block.
• M01: Optional stop if it is enabled by the operator. The program continues after the
execution of a continue command by the operator.
• M02: End of program indicating completion of machining cycle. Stops spindle,
coolant, and feed after the completion of all commands in the last NC block.
• M03, M04: Start spindle CW (M03) or CCW (M04).
• M05: Spindle off.
• M06: Tool change.
• M07, M08: Cutting fluid ON (M07), OFF (M08).
• M30: End of program. It stops feed, spindle, and cutting fluid and rewinds the NC
program to the beginning.
• M49: Prevents operator from overriding spindle and feed speeds. Source: Altintas’s Mfg. Automation book
P0 (0,0,0)
Source: Altintas’s Mfg. Automation book
N03 G92 X-12.5 Y-12.5 Z50.0 - Cutter starts from here with respect to the part zero (P1)
N04 G00 Z2.5 M03 S800 - Spindle on CW, move rapidly to 2.5mm above the part (P1)
N05 G01 Z-7.5 F25.0 M08 - Coolant on, plunge with feed in Z (P1)
N01 G90
N02 G71
N03 G92 X-12.5 Y-12.5 Z50.0 (P1)
N04 G00 Z2.5 M03 S800 (P1)
N05 G01 Z-7.5 F25.0 M08 (P1)
N06 X162.5 F125 (P2)
N07 Y0.0 (P3)
N08 G02 X220 Y57.5 I57.5 J0 (P4)
N09 G01 X232.5 (P5)
N10 Y70.0 (P6)
N11 G03 X180 Y122.5 I-52.5 J0 (P7)
N12 G01 X107.5 (P8)
N13 Y110 (P9)
N14 G02 X80.0 Y82.5 I-27.5 J0 (P10)
N15 G01 X40.0 (P11)
N16 G03 X-12.5 Y30.0 I0 J-52.5 (P12)
N17 G01 Y-12.5 (P1)
N18 Z3.8 (P1)
N19 G00 Z50 M09 M05
N20 M30
*Note: () are not part of the program Source: Altintas’s Mfg. Automation book
A workpiece with a diameter of 80 mm is provided to you. This has to be machined on a CNC lathe
machine to bring it down to the final dimensions shown below. Write a G code to do so. Start and end
at point ‘A’. Use the incremental mode of programming. Assume you can remove all material in a
single pass. The spindle speed must be 500 rpm, and the feed must be 0.2 mm/rev. Note that all
dimensions given are in mm. Include all the necessary preparatory and miscelleanous functions you
think are important for a full grade. Note that the sketch is not to scale.
% This program
Machine Toolassumes that the tool is already at ‘A’.
19 IIT Kanpur
Dynamics Laboratory
% This program assumes that the tool is already at ‘A’.
Code Description
ssumes that the tool is already at ‘A’.
N01 G91 G71; Incremental mode and in SI units
N02 M03 S500 M08; Turn the spindle on to rotate at 500 RPM, and also turn on
the coolant
N03 G01 X-25.0 Z-40.0 F100.0; Move to point B with a linear feed of 100 mm/min – which is
obtained from the given feed in mm/rev multiplied by the
speed, i.e., 0.2 mm/rev x 500 RPM = 100 mm/min
N04 G01 Z-30.0; Tool moves to point C. X position remains unchanged
N05 G01 X20.0 Z-10.0; Tool moves to point D using linear interpolation
N06 G01 X5.0 Z 80.0; Back to point A
N07 M30; End of program
Example 1:
Example 2:
Interpret the following NC program block by block. Correctly interpret the G and M functions for each
block and plot the complete tool path with the corresponding coordinates. Mark the corresponding
NC blocks on the tool path segments. For a complete grade mark each of the A, B, C, D, E, F, and G
points on the plot you will make. Also mark the features A1, A2, and B1 on the plot. Note that all
dimensions given are in mm. Your plot does not have to be to exact scale.
N01 G90; N15 G01 Z0; (Feature A1)
N02 G71; N16 G02 X-35 Y80.0 I0. J10.0; (Feature A1)
N06 G03 X34.09 Y15.62 I0 J45.0; (Point B) N20 G02 X35 Y80.0 I0. J10.0; (Feature A2)
N07 G03 X58.63 Y77.74 I-34.09 J49.38; (Point C) N21 G01 Z50.0;
N08 G03 X24.79 Y119.64 I-6.63 J29.26; (Point D) N22 G01 X-15.0 Y30.0; (Feature B1)
N09 G03 X-24.79 Y119.64 I-24.79 J-54.64; (Point E) N23 G01 Z0; (Feature B1)
N10 G03 X-58.63 Y77.74 I-27.21 J-12.64; (Point F) N24 G03 X15.0 Y30.0 I15.0 J30.0; (Feature B1)
N11 G03 X-34.09 Y15.62 I58.63 J-12.74; (Point G) N25 G01 Z50.0;
https://www.youtube.com/watch?v=IbV4vIYUg1U