3 G-CodesG00, G01, G02, G03, G04, G54, G90, G91, G94 and G95 Are the same as explained in module 4.New important G codes:FunctionDescriptionG17,G18, and G19Working plane selectionG40Cutter radius compensation OFF.G41Cutter radius compensation ON Left.G42Cutter radius compensation ON Right.G70Input system inchG71Input system metric
4 G-CodesThe following G-Codes and their relative slides will be used as a reference when solving some practical tasks in this module.FunctionDescriptionG111Polar coordinate interpolationG147Approach with a straight line.G148Leave in a straight line.G247Approach with a quarter a circle.G248Leave with a quarter a circle.
5 G17, G18, and G19 Used to select the working plane G17 XY Plane G18 ZX PlaneG19 YZ PlaneThe tool axis is vertical to the working plane
6 What Is The Correct G-code To Select The Top Surface Of The Workpiece As a Working Plane ?
7 G41, G42 and G40With G41 / G42 the tool traverse at equal distances to the programmed contour along its path. This distance is the dimension of the radius of the cutter.If the cutter is left to the contour this is programmed by G41 (This called cutter radius compensation left).
8 G41, G42 and G40If the cutter is right to the contour this is programmed by G42.(This called cutter radius compensation right)To cancel the radius compensation use G40
9 G70 / G71G70: The controller of the CNC milling machine reads the input values in imperial system (Inch)G71: The controller of the CNC milling machine reads the input values in metric system (mm)
10 G111If we want to use polar coordinate system to move the tool, we need first to locate the pole (zero point of the polar coordinate system) measured from original workpiece zero point, this is done by G111.Then write the required movement in polar system by specifying the Angle (AP) and the radius (RP).Example:G111 X30 Y40 Z0G01 RP=40 AP=60 F300
11 G147, G148, G247 and G248 Soft approach and leaving commands. The function of soft approach and leaving serves to approach the starting point of a contour tangentially irrespective of the position of the initial point.The function is mainly used in connection with the tool radius correction; however, it is not obligatory.
12 G147, G148, G247 and G248 G147 Approach with straight line G148 Leave in straight line.G247 Approach with a quarter a circleG248 Leave in a quarter a circle
13 Cycles Cycle Description Cycle 81 Drilling; to make a hole in one phase.Cycle 83Deep Drilling; to make a deep hole, which requires introducing the tool with several phases. (Chip-breaking and chip removal).PocketTo engrave a circular or a rectangular area on a surface.HolesTo repeat a drilling operation following circular or linear contours.
14 Cycle 81 – Drilling CycleTo make a hole in one phase
32 Example of CNC Programming 12 April 2017Example of CNC ProgrammingWhat Must Be Done To Drill A Hole On A CNC Vertical Milling Machine?Given That:Absolute Positioning Mode,Cutting Tool No. 1, Spindle Speed 1000 RPM, Clockwise Direction Of Rotation At Feed Rate 200 mm/min .Hole Position X10, Y12, And Depth Of Hole 10 mm.An example of creating a CNC program using a simple hole drilled on a computer numerical controlled (CNC) vertical milling machine.IAT - DXB 2008
34 N025 G00 X10 Y12 Z10 Rapid To Hole Position (Above The Hole) Tool Home 12 April 2017N025 G00 X10 Y12 Z10Rapid To Hole Position (Above The Hole)Tool HomeTop ViewFront ViewIn this case, we are using a simple analogy to stress how a programmer must be able to visualize a CNC program’s execution. We first look at how a machinist would machine a hole in a work piece held in a vise on a milling machine. Then we’ll show how the same operation will be performed with a CNC program.The machinist standing in front of the milling machine has everything they need right in front of them. They wouldn’t forget something as simple as turning the spindle on before trying to drill the hole. On the other hand, a CNC programmer must typically work with nothing more than a blueprint, a pencil, a calculator, and a blank piece of paper. They must be able to visualize every motion and function of the program’s execution in their minds.IAT - DXB 2008
35 Z Axis Feed To Drill The Hole 12 April 2017N030 G01 Z-10 F200Z Axis Feed To Drill The HoleTop ViewFront ViewIAT - DXB 2008
36 Rapid Movement In Z Axis Out Of Hole 12 April 2017N035 G00 Z6Rapid Movement In Z Axis Out Of HoleTop ViewFront ViewIAT - DXB 2008