0% found this document useful (0 votes)
24 views

Part Program Manual (Autosaved)

Uploaded by

Revocatus Elias
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

Part Program Manual (Autosaved)

Uploaded by

Revocatus Elias
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 33

Numerical Control

 Numerical control is a method of automatically operating a


manufacturing machine based on a code of letters, numbers,
and special characters.
 The numerical data required to produce a part is provided to
a machine in the form of a program, called part program or
CNC program.
 The program is translated into the appropriate electrical
signals for input to motors that run the machine.

1
Numerical Control - History

The concept is credited to John Parson (1947). Using punched cards


he was able to control the position of a machine in an attempt to
machine helicopter blade.
US Air Force teamed up with MIT to develop a programmable milling
machine (1949).
In 1952, a three-axis Cincinnati Hydrotel milling machine was
demonstrated. The term Numerical Control (NC) originated. The
machine had an electromechanical controller and used punched cards.
A new class of machines called machining centers and turning centers
that could perform multiple machining processes was developed.
Modern NC machine has a computer on board, Computer Numerical
Control (CNC). They can run unattended at over 20,000 rpm (spindler
speed) with a feed rate of over 600 ipm and an accuracy of .0001
2
Types of Part Programming in CNC Machine
 There are several types of part programming used in CNC machines to instruct the
machine on how to create a specific part. These types include:
 Manual Part Programming: In manual part programming, the CNC programmer
directly writes the code that specifies the tool movements, speeds, and other parameters
needed to create the part. This method is suitable for simple parts but can be time-
consuming and prone to errors.
 Computer-Aided Part Programming: Computer-aided part programming involves
using CAM (Computer-Aided Manufacturing) software to generate the CNC program
automatically based on a 3D CAD model of the part. CAM software simplifies the
process by creating tool paths and generating the necessary G-codes for machining
complex parts.
 Conversational Part Programming: Conversational programming is a user-friendly
method that allows operators to input machining parameters through a series of
prompts and responses on the CNC machine’s interface. This type of programming is
often used for quick setups and simple parts without the need for extensive coding
knowledge..
Manual Part Programming
 Manual part programming refers to the process of creating a sequence
of instructions that describe the operations to be performed on a part
manually, without the use of computer-aided manufacturing (CAM)
software.
 In manual part programming, operators write the machining instructions in
a format that can be understood by computer numerical control (CNC)
machines.
 These instructions typically include details such as tool selection, spindle
speed, feed rate, and movement coordinates to guide the CNC machine in
producing the desired geometry on a part.
 Tool selection, machining operations (e.g., drilling, milling, turning),
 Cutting parameters (speed, feed rate, depth of cut), tool paths, and quality
control measures.
Simple Procedures to Write Manual Part Programming
 Understand the Part Geometry: Begin by thoroughly understanding the geometry of the part
that needs to be machined. This includes dimensions, features, and tolerances.
 Select the Machining Operations: Determine the sequence of machining operations required
to produce the part. This may involve operations such as drilling, milling, turning, or grinding.
 Identify Tooling and Cutting Parameters: Select appropriate tools for each operation based
on the material and geometry of the part. Determine cutting speeds, feeds, and depths of cut for
optimal machining.
 Write Code for Each Operation: Using a manual programming language like G-code or M-
code, write step-by-step instructions for each machining operation. Include tool movements,
spindle speeds, feed rates, and any necessary tool changes.
 Test and Verify the Program: Before running the program on a CNC machine, simulate it
using software to check for errors or collisions. Make any necessary adjustments to ensure the
program functions correctly.
 Document and Save the Program: Once the manual part program is verified, document it
with detailed notes for future reference. Save the program in a secure location for reuse.
Benefits and Limitations of Manual Part Programming
 Benefits: Manual part programming allows for direct control
over machining operations without relying on CAM software.
 It can be useful for simple parts or when CAM software is not
available.
 Limitations: Manual part programming can be time-
consuming and prone to errors compared to CAM-generated
programs.
 It may not be suitable for complex geometries or parts
requiring multiple machining operations.
Typical Part Program Order
 Program start
 Load selected tool
 Turn spindle on
 Turn coolant on
 Rapid movement to starting position above the part (G00 command)
 Perform all machining operations on the part
 Turn coolant off
 Turn spindle off
 Move to a safe position
 End program
Basic outline of operations in a CNC part program
 Program Start: The program begins with the initialization of the CNC machine and loading of the part program.
 Load Selected Tool: The appropriate cutting tool is loaded into the machine based on the operation to be
performed.
 Turn Spindle On: The spindle, which rotates the cutting tool, is activated to start machining.
 Turn Coolant On: Coolant is often used during machining processes to lubricate and cool the cutting tool and
workpiece.
 G00 Rapid to Starting Position Above Part: The machine moves rapidly to a predetermined position above the
part to begin machining.
 All Machining Operations to Part: This step involves executing all necessary machining operations such as
milling, drilling, turning, or threading as per the part program instructions.
 Turn Coolant Off: Once machining is complete, coolant may be turned off to prepare for the next step.
 Turn Spindle Off: The spindle is deactivated after completing the machining operations.
 Move to Safe Position: The machine moves to a safe position away from the workpiece to avoid any collisions or
damage.
 End Program: The part program execution is completed, and the CNC machine is ready for the next task or part.
 These steps represent a basic outline of operations in a CNC part program where a single tool is used for
machining. these steps are repeated for each tool or operation required on the part.
The basic formats used for CNC
 Part programming consists of a sequences of instructions to be
performed on the NC/CNC machine
 NC information is passed to MCU in the block format/statement
 Each block of CNC data may be arranged differently depends upon
the control system requirements of the system configuration
 The basic formats used for CNC input are:
 Fixed Sequential Format
 Tab Sequential Format
 Word Address Format
 Letter Address Format
The basic formats used for CNC
 The fixed sequential format is a traditional way of writing part
programs where each block of code is assigned a specific line
number.
 The tab sequential format is a more modern approach to
writing part programs where each block of code starts with a
specific letter or code indicating the type of command being
executed.
 Word address format uses specific words or labels to identify
different elements within a block of the part program.
Basic Concept of Part Programming

 When running, a part program is interpreted one


command line at a time until all lines are completed.
 Commands, which are also referred to as blocks, are
made up of words which each begin with a letter
address and end with a numerical value.
Basic Concept of Part Programming
 Basically, the machine receives instructions as a sequence of blocks containing
commands to set machine parameters; speed, feed and other relevant information.
 I, J, K: These are used in circular interpolation commands to define the center
point of a circle or arc. I and J represent offsets from the current position in X and Y
axes, while K is used for Z-axis offset.

Sequence and format of words:

N G X Y Z I J K F S T M

sequence no destination coordinates dist to center of circle tool

feed rate spindle speed


preparatory function
Other function
Programming Key Letters
• O - Program number (Used for program identification)
• N - Sequence number (Used for line identification)
• G - Preparatory function
• X - X axis designation
• Y - Y axis designation
• Z - Z axis designation
• R - Radius designation
• F – Feed rate designation
• S - Spindle speed designation
• H - Tool length offset designation
• D - Tool radius offset designation
• T - Tool Designation
• M - Miscellaneous function
Commonly Used G Codes
 G00 - Rapid Move: This code instructs the machine to move rapidly to a specified position without
cutting.
 G01 - Linear Interpolation: Used for straight-line cutting movements at a defined feed rate.
 G02/G03 - Circular Interpolation: These codes are used for circular or helical interpolation, creating
arcs or circles in the machining process. (Clockwise/Counterclockwise)
 G17/G18/G19 - Plane Selection: These codes determine the plane in which circular interpolation will
occur (X-Y plane, X-Z plane, or Y-Z plane).
 G20/G21 - Inch/Metric Mode: Selects between inch and metric units for programming dimensions.
 G28/G30 - Return to Home Position: Sends the machine back to its reference or home position.
 G40/G41/G42 - Cutter Radius Compensation: Adjusts toolpath based on cutter radius for precise
cutting.
 G90/G91 - Absolute/Incremental Programming: Specifies whether coordinates are absolute (from
origin) or incremental (from current position).
 G98/G99 - Return to Initial Level in Canned Cycles: Used in drilling cycles to return to either the
initial Z-level or R-level.
G - Code References List
Common List of M Codes:
• The common list of M codes used in CNC machining centers includes the following functions:
• M00: Program stop
• M01: Optional stop
M7 - turn mist coolant on.
• M02: End of program
M8 - turn flood coolant on.
• M03: Spindle on clockwise M9 - turn both M7 and M8 off
• M04: Spindle on counter-clockwise
• M05: Spindle stop
• M06: Tool change
• M08: Coolant on
• M09: Coolant off
• M10: Clamp on
• M11: Unclamp
• M30: End of program and rewind to beginning of program
• M98: Call subprogram
• M99: End subprogram
• These M codes are essential commands used to control various functions in CNC machining operations.
G90 and G91 G Codes
The programming CNC machines, we have to be aware of the difference between
G90 and G91 g-codes. Also known as absolute (G90) or incremental (G91)
programming.
These G-Codes tell the machine controls how to read the measurements.
The G Code G90 is used to define the absolute positioning system. When G90
is active the machine will read all dimensions and movements from the working
datum position.
If we were to issue a movement command such as G00 X100 Y100; then the
machine would move 100mm in the plus direction from the datum in both the
X and Y axis.
When working with G91 incremental positioning, We command the tool to
move from its current position and not the datum position.
Programming with G90 absolute
(G90 EXAMPLE);
N010 G21 G54 G98 G40 G80 G49 G90;
N010 T1 M6; (15 mm Drill);
S600 M03;
G00 X15.0 Y15.0 (POSITION 1);
X35.0 (POSITION 2);
X55.0 (POSITION 3); Y
X75.0 (POSITION 4);
Y35.0 (POSITION 5);
X55.0 (POSITION 6);
X35.0 (POSITION 7);
X15.0 (POSITION 8); X
Y55.0 (POSITION 9);
X35.0 (POSITION 10);
X55.0 (POSITION 11);
X75.0 (POSITION 12);
G00 Z50.0;
G28 X0.0 Y0.0 M05;
M00;

Every X and Y movement command takes the dimensions from the datum position on the bottom left of the part.
Programming with G91 incremental
 (G91 EXAMPLE);
 N010 G21 G54 G98 G40 G80 G49 G90;
 N020 T1 M6;(15MM DRILL);
 G90 G21 (MOVING TO POSITION 1 IN ABSOLUTE);
 S600 M03;
 G00 X15.0 Y15.0 (POSITION 1);
 G91 (INCREMENTAL MODE); X20.0 (POSITION 2);
 X20.0 (POSITION 3);
 X20.0 (POSITION 4);
 Y20.0 (POSITION 5);
 X-20.0 (POSITION 6);
 X-20.0 (POSITION 7);
 X-20.0 (POSITION 8);
 Y20.0 (POSITION 9);
 X20.0 (POSITION 10);
 X20.0 (POSITION 11);
 X20.0 (POSITION 12);
 G90 (ABSOLUTE MODE);
 G00 Z50.0; I have used G90 absolute to move the cutter to the first position since the spindle position is unknown
 G28 X0.0 Y0.0 M05; at this time, once the tool is at the first hole, G91 is activated for the duration of the movements
 M00;
Symbols Used in G-Code
 Semicolon (;): In CNC programming, each line of code typically represents
a specific action or instruction for the machine to follow. The semicolon
helps to indicate the end of one command and the beginning of another.
 Full Stop (.) It acts as a delimiter to separate different commands or
functions within the program. When the CNC machine reads a full stop, it
knows that it has reached the end of a particular instruction and should
move on to the next one.
 Plus (+) and Minus (-): These symbols are commonly used to indicate
positive and negative values, such as feed rates, tool offsets, or coordinate
positions.
 Percent Sign (%): In some CNC systems, the percent sign is used to mark
the start and end of a program or subprogram.
Example
 Basic manual part programming sequence to drill a 10 mm diameter hole with a depth of 5 mm at
the center of a workpiece with dimensions of 100 x 100 x 20 mm using Fixed Sequential Format.
 N10 G21 G54 G98 G40 G80 G49 G90;
 N20 T01 M06 (Select tool and perform tool change)
 N30 S1000 M03 (Spindle speed and direction)
 N40 G0 G43 Z5 H01: move to a safe height above the workpiece.
 N50 G0 X50 Y50 (Move to safe position above workpiece center)
 N60 G01 Z-5 F50 M7 (Begin drilling to depth of 5mm)
 N70 G00 Z5 (Retract drill bit)
 N80 M05 (Stop spindle)
 N90 M09 (Stop coolant)
 N100 G91 G28 X0. Y0. Z0.;
 N110 M30; (End program)
Example of G code from CNC VMC Simulator
N010 G21 G54 G98 G40 G80 G49 G90;
N020 T1 M6; N180 G0 Y100.; N340 G0 Y100.; N490 G0 Z100.;
N190 G1 Z-2.; N350 G1 Z-15.; N500 M5;
N030 S2800 M3; N360 G0 Z2.;
N200 G0 Z2.; N510 M9;
N040 G0 G43 Z50. H1; N370 G0 Y140.; N520 G91 G28 X0. Y0. Z0.;
N210 G0 Y60.;
N050 G0 X60. Y60.; N380 G1 Z-15.; N530 M30;
N220 G1 Z-2.;
N230 G0 Z2.; N390 G0 Z2.;
N060 G0 Z2.;
N070 G1 Z-2. F280 M7; N240 G0 Z100.; N400 G0 X140.;
N080 G0 Z2.; N250 M5; N410 G1 Z-15.;
N260 M9; N420 G0 Z2.;
N090 G0 Y100.; N270 T2 M6;
N100 G1 Z-2.; N430 G0 Y100.;
N280 S1800 M3; N440 G1 Z-15.;
N110 G0 Z2.;
N290 G0 G43 Z50. H2; N450 G0 Z2.;
N120 G0 Y140.; N300 G0 X60.;
N460 G0 Y60.;
N130 G1 Z-2.; N310 G0 Z2.;
N470 G1 Z-15.;
N140 G0 Z2.; N320 G1 Z-15. F360 M7;
N480 G0 Z2.;
N330 G0 Z2.;
N150 G0 X140.;
N160 G1 Z-2.;
N170 G0 Z2.;
The meaning of provided on CNC program
N010 G21 G54 G98 G40 G80 G49 G90;
 G21: Sets the machine to operate in metric units.
 G54: Establishes the coordinate system for the part.
 G98: Indicates that the tool will return to the initial Z-plane after each drilling operation.
 G40: Cancels cutter radius compensation.
 G80: Cancels any canned cycle mode.
 G49: Cancels tool length compensation.
 G90: Sets absolute programming mode.
N020 T1 M6;
 T1: Selects tool number 1.
 M6: Changes the tool to the selected one.
N030 S2800 M3;
 S2800: Sets spindle speed to 2800 RPM.
 M3: Starts the spindle in a clockwise direction.
N040 G0 G43 Z50. H1;
 G0: Rapid positioning movement command.
 G43 Z50.: Initiates tool length offset with an offset value of 50mm on the Z-axis.
 H1: Selects tool length offset number 1.
N050 G0 X60. Y60.;
 Moves the tool rapidly to position X=60 and Y=60
Part Program With Cam Software
A part program are generated using Computer-aided manufacturing
(CAM) software and are then translated into G-code and M-code
commands for execution by the CNC machine.
The program controls various functions such as tool movements,
spindle rotation, coolant usage, and other auxiliary functions necessary
for machining operations.
These instructions are typically generated in Computer-Aided
Manufacturing (CAM) software and fed into Computer Numerical
Control (CNC) machines, such as drills, lathes, mills, grinders, and
routers. The CNC computer translates these instructions into
standardized G-code and M-code commands and follows them in the
Automatic Part Programming

Software programs can automatic generation of CNC data

Define Tool

CNC data

Make 3D model
Simulate
cutting
Procedures to Develop G-Code Using SolidWorks CAM:
 Design Your Part: Create a 3D model of the part in SolidWorks with accurate dimensions and features.
 Activate CAM Functionality: Open the CAMWorks or SolidWorks CAM tab in SolidWorks to enable
CAM features.
 Specify Machine Type: Define the type of CNC machine (e.g., milling machine, lathe) for which you
are generating G-code.
 Set Up Stock Material: Specify the material type, dimensions, and placement of the stock material for
machining.
 Feature Recognition: Utilize Automatic Feature Recognition (AFR) to identify machinable features
like holes, pockets, and bosses from the 3D model.
 Assign Machining Operations: Assign appropriate operations (drilling, milling, turning) to each
recognized feature and customize parameters.
 Simulation and Validation: Run a simulation within SolidWorks to visualize the machining process,
check for collisions, and make adjustments if needed.
 Generate G-Code: Once satisfied with the setup, generate the G-code that will guide the CNC machine
in producing the part.
 Post-Processing: Select the correct post-processor for your CNC machine to convert G-code into a
format compatible with its controls.
 Export and Execute: Export the G-code file, transfer it to your CNC machine’s control software, and
begin the machining process while monitoring its progress.
Exercises 1
Exercises 2
Develop The G Code for the drawing given below
Exercise 3

F 25
Raw Material

70

F 22.5
F 17.5
Finished Part

20
30
Exercise
• Write the part program to drill the holes in the part shown in Figure 1.
The part is 12.0 mm thick. Cutting speed = 100 m/min and feed = 0.06
mm/rev. Use the lower left corner of the part as the origin in the x-y
axis system. Write the part program in the word address format using
absolute positioning.
• Hint: you will need to calculate the N.
Exercise 4

You might also like