Computer Numerical Control Workshop
Computer Numerical Control Workshop
Objectives:
To understand the working principle & applications of CNC machines.
To understand the structure & flow of a CAM system.
To understand the applications of CNC machines.
This workshop provides an introductory treatment of automation technology & the components that
make up an automated system. Also, two important automation technologies used in manufacturing are
described: numerical control mainly & industrial robotics.
Automation Fundamentals
Automation can be defined as the technology by which a process or procedure is performed without
human assistance. Humans may be present as observers or even participants, but the process itself
operates under its own self-direction.
Three Components of An Automated System
An automated system consists of three basic components:
(1) Power
(2) A program of instructions
(3) A control system to conduct the instructions
The form of power used in most automated systems is electrical. The advantages of electrical power are:
(1) It is widely available.
(2) It can be readily converted to other forms of power such as mechanical, thermal, or hydraulic.
(3) It can be used at extremely low power levels for functions such as signal processing, communication,
data storage, & data processing.
(4) It can be stored in long-life batteries.
Power is also used to accomplish any material handling activities needed in the process, such as
loading & unloading parts, if these activities are not performed manually. Finally, power is needed to
operate the control system.
The activities in an automated process are determined by a program of instructions. In the simplest
automated processes, the only instruction may be to maintain a certain controlled variable at a specified
level. In more complex processes, a sequence of activities is required during the work cycle, & the order
& details of each activity are defined by the program of instructions.
Each activity involves changes in one or more process parameters, such as changing the x-coordinate
position of a machine tool worktable, opening or closing a valve in a fluid flow system, or turning a motor
on or off. Process parameters are inputs to the process. They may be continuous (continuously variable
over a given range, such as the x-position of a worktable) or discrete (on or off). Examples include the
actual position of the machine worktable, the rotational speed of a motor shaft, or whether a warning
light is on or off. The program of instructions specifies the changes in process parameters & when they
should occur during the work cycle, & these changes determine the resulting values of the process
variables. For example, in computer numerical control, the program of instructions is called a part
program. It specifies the individual steps required to machine a given part, including worktable & cutter
positions, cutting speeds, feeds, & other details of the operation.
In some automated processes, the work cycle program must contain instructions for making decisions or
reacting to unexpected events during the work cycle.
(a)
(b)
Figure 1: Two basic types of control systems: (a) closed loop & (b) open loop.
Examples of situations requiring this kind of capability include:
(1) Interactions & communications with humans such as responding to requests for system status info.
(2) Safety monitoring requirements
The program of instructions is executed by a control system, the third basic component of an
automated system. Two types of control system can be distinguished: closed loop & open loop. A
closed-loop system, also known as a feedback control system, is one in which the process variable
of interest (output of the process) is compared with the corresponding process parameter (input to
the process), & any difference between them is used to drive the output value into agreement with
the input. Figure 1 (a) shows the six elements of a closed-loop system: (1) input parameter, (2)
process, (3) output variable, (4) feedback sensor, (5) controller, & (6) actuator.
The input parameter represents the desired value of the output variable. The process is the operation
or activity being controlled; more specifically, the system is controlling the output variable. A sensor is
used to measure the output variable & feedback its value to the controller, which compares output with
input & makes the required adjustment to reduce any difference. The adjustment is made by means of
actuators, hardware devices that physically accomplish the control actions.
The other type of control system, shown in Figure 1 (b), is an open-loop system, which executes the
program of instructions without a feedback loop. No measurement of the output variable is made, so
there is no comparison between output & input in an open-loop system. In effect, the controller relies on
the expectation that the actuator will have the intended effect on the output variable. Thus, there is
always a risk in an open-loop system that the actuator will not function properly or that its actuation
will not have the expected effect on the output. On the other hand, the advantage of an open-loop
system is that its cost is less than a comparable closed-loop system.
Hardware for Automation
Automation & process control is implemented using various hardware devices that interact with the
production operation & associated processing equipment. Sensors are required to measure the
process variables. Actuators are used to drive the process parameters. & various additional devices
are needed to interface the sensors & actuators with the process controller, which is usually a digital
computer.
Sensors
A sensor is a device that converts a physical stimulus or variable of interest (e.g., temperature, force,
pressure, or other characteristic of the process) into a more convenient physical form (e.g., electrical
voltage) for the purpose of measuring the variable. The conversion allows the variable to be
interpreted as a quantitative value.
Sensors of several types are available to collect data for feedback control in manufacturing
automation. They are often classified according to type of stimulus; thus, there are mechanical,
electrical, thermal, radiation, magnetic, & chemical variables. For example, within the mechanical
category, the physical variables include position, velocity, force, & torque. Electrical variables include
voltage, current, & resistance, & so on for the other major categories.
In addition to the type of stimulus, sensors are also classified as analog or discrete.
Before a measuring device can be used, it must be calibrated, which means determining how the
value of the stimulus is related to the value of the output signal. Ease of calibration is one criterion by
which a measuring device can be selected. Other criteria include accuracy, precision, operating range,
speed of response, reliability, & cost.
Actuators
In automated systems, an actuator is a device that converts a control signal into a physical action,
which usually refers to a change in a process input parameter. The action is typically mechanical,
such as a change in position of a worktable or rotational speed of a motor. The control signal is
generally a low-level signal, & an amplifier may be required to increase the power of the signal to drive
the actuator. Actuators can be classified according to type of amplifier as:
(1) Electrical.
(2) Hydraulic.
(3) Pneumatic.
Electrical actuators include AC & DC electric motors, stepper motors, & solenoids. Hydraulic
actuators utilize hydraulic fluid to amplify the control signal & are often specified when large forces
are required in the application. Pneumatic actuators are driven by compressed air, which is commonly
used in factories. All three actuator types are available as linear or rotational devices. This designation
distinguishes whether the output action is a linear motion or a rotational motion. Electric motors &
stepper motors are more common as rotational actuators, whereas most hydraulic & pneumatic
actuators provide a linear output.
Interface Devices
Interface devices allow the process to be connected to the computer controller & vice versa.
Sensor signals from the manufacturing process are fed into the computer, & command signals are
sent to actuators that operate the process. Continuous analog signals from sensors attached to the
process must be transformed into digital values that can be used by the control computer, a function
accomplished by an analog-to-digital converter (ADC).
Contact input/output interfaces are components used to communicate binary data back & forth
between the process & the control computer. A contact input interface is a device that reads binary
data into the computer from an external source. It consists of a series of binary electrical contacts that
indicate the statuses of binary devices attached to the process. The status of each contact is
periodically scanned by the computer to update values used by the control program. A contact
output interface is a device used to communicate on/off signals from the computer to external
binary components such as solenoids, alarms, & indicator lights.
As mentioned earlier, discrete data sometimes exists in the form of a series of pulses. For example,
an optical encoder emits its measurement of position & velocity as a series of pulses.
(a) (b)
Figure 2: Optical encoder: (a) Apparatus & (b) Series of pulses emitted to measure rotation of disk.
Process Controllers
Most process control systems use some type of digital computer as the controller. Whether control
involves continuous or discrete parameters & variables, or a combination of continuous & discrete, a
digital computer can be connected to the process to communicate & interact with it using the interface
devices discussed.
A widely used process controller that satisfies these requirements is a programmable logic controller.
A programmable logic controller (PLC) is a microcomputer-based controller that uses stored
instructions in programmable memory to implement logic, sequencing, timing, counting, & arithmetic
control functions, through digital or analog input/output modules, for controlling various machines &
processes.
Computer Numerical Control
Numerical control (NC) is a form of programmable automation in which the mechanical actions of a
piece of equipment are controlled by a program containing coded alphanumeric data. The data rep-
resent relative positions between a work head & a work part. The work head is a tool or other pro-
cessing element, & the work part is the object being processed.
The operating principle of NC is to control the motion of the work head relative to the work part & to
control the sequence in which the motions are carried out. The first application of numerical control
was in machining & this is still an important application area.
Computer Numerical Control (CNC) refers to any machine tool (i.e., mill, lathe, drill press, etc.)
which uses a computer to electronically control the motion of one or more axes on the machine. The
functions & motions of a machine tool are controlled by means of a prepared program containing
coded alphanumeric data. The development of NC machine tools started from a task supportedby
the US Air Force in the early 1950’s, involving MIT & several machine-tool manufacturing companies.
The need was recognized for machines to be able to manufacture complex jet aircraft parts.
As computer technology evolved, computers replaced the more inflexible controllers found on the NC
machines, hence the dawn of the CNC era. CNC uses software programs to provide the instructions
necessary to control the axis motions, spindle speeds, tool changes & so on. CNC machine tools
allow multiple axes of motion simultaneously, resulting in 2D & 3D contouring ability & also an
increase in productivity & quality control by allowing multiple parts to be produced using the same
program & tooling. CNC can control the motions of the workpiece or tool, the input parameters such
as feed, depth of cut, speed, & the functions such as turning spindle on/off, turning coolant on/off.
CNC is a specialized & versatile form of Soft Automation & its applications cover many kinds,
although it was initially developed to control the motion & operation of machine tools & it may be
considered to be a means of operating a machine through the use of discrete numerical values fed
into the machine, where the required 'input' technical information is stored on a kind of input media
such as floppy disk, hard disk, CD ROM, DVD, USB flash drive, or RAM card etc.
The machine follows a predetermined sequence of machining operations at the predetermined
speeds necessary to produce a workpiece of the right shape & size & thus according to completely
predictable results. A different product can be produced through reprogramming & a low-quantity
production run of various products is justified.
The definition of CNC given by Electronic Industry Association is “A system in which actions are
controlled by the direct insertion of numerical data at some point. The system must automatically
interpret at least some portion of this data. In a simple word, a CNC system receives numerical data,
interpret the data & then control the action accordingly.”
Applications
The applications of CNC include both for machine tool as well as non-machine tool areas. In the
machine tool category, CNC is widely used for lathe, drill press, milling machine, grinding unit,
laser, sheet-metal press working Machining, tube bending machine etc. Highly automated machine
tools such as turning center & machining center which change the cutting tools automatically
under CNC control have been developed.
Advantages & Limitations
The benefits of CNC are:
(1) H igh accuracy in manufacturing
(2) Short production time
(3) Greater manufacturing flexibility
(4) S impler fixturing
(5) C ontour machining (2 to 5 -axis machining)
(6) R educed human error
The drawbacks include:
(1) Excessive cost
(2) Maintenance
(3) The requirement of skilled part programmer
The Technology of Numerical Control
This section defines the components of a numerical control system & describes the coordinate axis
system & motion controls.
Components of an NC System
A numerical control system consists of three basic components:
(1) Part program
(2) Machine control unit
(3) Processing equipment
The part program (this is the term used in machine tool technology) is the detailed set of commands
to be followed by the processing equipment. It is the program of instructions in the NC control system.
Each command specifies a position or motion that is to be accomplished by the work head relative to
the work part. A position is defined by its x-y-z coordinates. In machine tool applications, additional
details in the NC program include spindle rotation speed, spindle direction, feed rate, tool change
instructions, & other commands related to the operation. The part program is prepared by a part
programmer, a person who is familiar with the details of the programming language & also
understands the technology of the processing equipment.
The machine control unit (MCU) is the heart of the CNC system. There are two subunits in the
machine control unit: the Data Processing Unit (DPU) and the Control Loop Unit (CLU).
MCU in modern NC technology is a microcomputer that stores & executes the program by converting
each command into actions by the processing equipment, one command at a time. The MCU consists
of both hardware & software. The hardware includes the microcomputer, components to interface with
the processing equipment, & certain feedback control elements. The software in the MCU includes
control system software, calculation algorithms, & translation software to convert the NC part
program into a usable format for the MCU. The MCU also permits the part program to be edited in
case the program contains errors, or changes in cutting conditions are required. Because the MCU is
a computer, the term computer numerical control (CNC) is often used to distinguish this type of
NC from its technological predecessors that were based entirely on hard-wired electronics. The
processing equipment accomplishes the sequence of processing steps to transform the starting work
part into a completed part. It operates under the control of the MCU according to the instructions in
the part program.
a. Data Processing Unit
On receiving a part program, the DPU first interprets and encodes the part program into internal
machine codes. The interpolator of the DPU then calculates the intermediate positions of the motion
in terms of BLU (basic length unit) which is the smallest unit length that can be managed by the
controller. The calculated data is passed to CLU for further action.
b. Control Loop Unit
The data from the DPU are converted into electrical signals in the CLU to control the driving system
to perform the required motions. Other functions such as machine spindle ON/OFF, coolant ON/OFF,
tool clamp ON/OFF are also controlled by this unit according to the internal machine codes.
(a) (b)
Figure 4: Coordinate systems used in numerical control: (a) for flat & prismatic work, & (b) for rotational work.
The coordinate systems described above are for basic machines in which one cutting tool is
controlled. Some machines have additional axes to achieve independent control of multiple cutting
tools; for example, CNC mill-turn centers. In many NC systems, the relative movements between the
processing tool & the work part are accomplished by fixing the part to a worktable & then controlling
the positions & motions of the table relative to a stationary or semi-stationary work head. Most
machine tools are based on this method of operation. In other systems, the work part is held stationary
& the work head is moved along 2 or 3 axes. Flame cutters, x-y plotters, & coordinate measuring
machines operate this way.
Figure 5: Schematic illustration of drilling, boring, & milling with various paths.
Interpolator
Another aspect of motion control is concerned with how the positions in the coordinate system are
defined.
The input speed of 0.1 in/sec in example 2 is converted into the velocity components by an interpolator
called the linear interpolator whose function is to provide the velocity signals to x & y directions.
Similarly, we have circular & parabolic interpolators. See figure 6.
(a) (b)
Figure 8: (a) Ball Screw in a CNC machine, (b) Ball screw structure.
Driving System
The driving system is an important component of a CNC machine as the accuracy and repeatability
depend very much on the characteristics and performance of the driving system. The requirement is
that the driving system has to response accurately according to the programmed instructions. This
system usually uses electric motors although hydraulic motors are sometimes used for large machine
tools. The motor is coupled either directly or through a gear box to the machine leadscrew to move the
machine slide or the spindle. Three types of electrical motors are commonly used.
a. DC Servo Motor
This is the most common type of feed motor used in CNC machines. The change of the motor speed
is by varying the armature voltage and the control of motor torque is achieved by controlling the
motor's armature current. In order to achieve the necessary dynamic behavior, it is operated in a
closed loop system equipped with sensors to obtain the velocity and position feedback signals.
b. AC Servo Motor
In an AC servomotor, the rotor is a permanent magnet while the stator is equipped with 3-phase
windings. The speed of the rotor is equal to the rotational frequency of the magnetic field of the stator,
which is regulated by the frequency converter.
AC motors are gradually replacing DC servomotors. The main reason is that there is no commutator or
brushes in AC servomotor so that maintenance is virtually not required. Furthermore, AC servos have
a smaller power-to-weight ratio and faster response.
c. Stepping Motor
A stepping motor is a device that converts the electrical pulses into discrete mechanical rotational
motions of the motor shaft. This is the simplest device that can be applied to CNC machines since it
can convert digital data into actual mechanical displacement. It is not necessary to have any analog-
to-digital converter nor feedback device for the control system. They are ideally suited to open loop
systems.
However, stepping motors are not commonly used in machine tools due to the following drawbacks:
slow speed, low torque, low resolution and easy to slip in case of overload. Examples of stepping
motor application are the magnetic head of floppy-disc drive and hard disc drive of computer, daisy-
wheel type printer, X-Y tape control, and CNC EDM Wire-cut machine.
d. Linear Motor
A linear electric motor is an AC rotary motor laid out flat. The same principle used to produce torque in
rotary motors is used to produce force in linear motors. Through the electromagnetic interaction
between a coil assembly and a permanent magnet assembly, the electrical energy is converted to
linear mechanical energy to generate a linear motion. Linear motors have the advantages of high
speeds, high precision and fast response.
Feedback Device
In order to have a CNC machine operating accurately, the positional values and speed of the axes
need to be constantly updated. Two types of feedback devices are normally used, positional feedback
device and velocity feedback device.
a. Positional Feed Back Devices
There are two types of positional feedback devices: linear transducer for direct positional
measurement and rotary encoder for angular or indirect linear measurement.
Linear Transducers: A linear transducer is a device mounted on the machine table to measure the
actual displacement of the slide in such a way that backlash of screws, motors, etc. would not cause
any error in the feedback data. This device is considered to be of the highest accuracy and also more
expensive in comparison with other measuring devices mounted on screws or motors.
Rotary Encoders: A rotary encoder is a device mounted at the end of the motor shaft or screw to
measure the angular displacement. This device cannot measure linear displacement directly so that
error may occur due to the backlash of screw and motor etc. Generally, this error can be compensated
for by the machine builder in the machine calibration process.
b. Velocity Feedback Device
The actual speed of the motor can be measured in terms of voltage generated from a tachometer
mounted at the end of the motor shaft. DC tachometer is essentially a small generator that produces
an output voltage proportional to the speed. The voltage generated is compared with the command
voltage corresponding to the desired speed. The difference of the voltages can be then used to
actuate the motor to eliminate the error.
Display Unit
The Display Unit serves as an interactive device between the machine and the operator. When the
machine is running, the Display Unit displays the present status such as the position of the machine
slide, the spindle RPM, the feed rate, the part programs, etc.
In an advanced CNC machine, the Display Unit can show the graphics simulation of the tool path so
that part programs can be verified before the actually machining. Much other important information
about the CNC system can also be displayed for maintenance and installation work such as machine
parameters, logic diagram of the programmer controller, error messages and diagnostic data.
(a) (b)
(c) (d)
Figure 11: (a) Floppy Disk Drive on a CNC machine, (b) USB Flash Drive on a CNC machine,
(c) Serial communication, (d) Ethernet communication
Serial communication
The data transfer between a computer and a CNC machine tool is often accomplished through a serial
communication port. Part programs can be downloaded into the memory of a machine tool or
uploaded to the computer for temporary storage by running a communication program on the
computer and setting up the machine control to interact with the communication software.
Direct Numerical Control is referred to a system connecting a set of numerically controlled machines to
a common memory for part program or machine program storage with provision for on-demand
distribution of data to the machines.
The host computer is linked with a number of CNC machines or computers connecting to the CNC
machines for downloading part programs. The communication program in the host computer can
utilize two-way data transfer features for production data communication including production
schedule, parts produced and machine utilization etc.
Ethernet communication
Due to the advancement of the computer technology and the drastic reduction of the cost of the
computer, it is becoming more practical and economic to transfer part programs between computers
and CNC machines via an Ethernet communication cable. This media provides a more efficient and
reliable means in part program transmission and storage. Most companies now built a Local Area
Network (LAN) as their infrastructure. More and more CNC machine tools provide an option of the
Ethernet Card for direct communication within the LAN.
Parallel Transmission
Parallel transmission is commonly used in data transmission between computers and external devices
such as sensors, programmable logic controllers (PLC) or actuators.
Local Area Networks
To enable the CAD/CAM facilities to run smoothly, it is desirable for the facilities to be linked together.
In the local-area network, terminals can access any computer on the network or devices on the shop
floor without a physical hardwire. The design of software enables controls of data handling and error
recovery, while hardware generates and receives signals, and media that carries the signals.
Machine Control Unit
The machine control unit (MCU) is a microcomputer that stores the program & executes the
commands into actions by the machine tool. The MCU consists of two main units: the data processing
unit (DPU) & the control loops unit (CLU). The DPU software includes control system software,
calculation algorithms, translation software that converts the part program into a usable format for the
MCU, interpolation algorithm to achieve smooth motion of the cutter, editing of part program (in case of
errors & changes). The DPU processes the data from the part program & provides it to the CLU which
operates the drives attached to the machine leadscrews & receives feedback signals on the actual
position & velocity of each one of the axes. A driver (DC motor) & a feedback device are attached to
the leadscrew. The CLU consists of the circuits for position & velocity control loops, deceleration &
backlash take up, function controls such as spindle on/off.
Machine Tool
The machine tool could be a lathe, milling machine, laser, plasma, coordinate measuring machine etc.
Figure 12 shows that a right-hand coordinate system is used to describe the motions of a machine
tool. There are three linear axes (x, y, z), three rotational axes (i, j, k), & other possible axes such as tilt
(θ). For example, a 5-axis machine implies any combination of x, y, z, i, j, k, & θ.
Figure 12: Right-hand coordinate system used in drill press & lathe.
Facts about CNC Machining
• CNC manufacturing offers advantages on two types of parts:
(1) Simple parts that are mass produced and/or (2) Complex parts with features requiring multiple
axes of simultaneous motion. For low quantity simple parts, it is often quicker to produce the parts on
manual machines (as in lab).
• CNC does not inherently imply increased part accuracy. An old CNC with a lot of hours of use will
produce less accurate features than a new quality manual machine and vice versa; so, don’t
automatically associate higher accuracy with CNC machines. (Accuracy has more to do with machine
design, component selection and mechanical wear).
• Modern CNC machines offer increased productivity due to stiffer machine and spindle designs,
more powerful motors, high pressure coolant (up to 1000 psi) that floods the cutting zone, automatic
tool changers, digital workpiece and tool probing, and/or horizontally mounted spindles.
• Downsides to CNC machines are higher initial cost, larger space and electrical requirements,
increased maintenance cost, required programming skillset and their inherent complexity means
there’s a higher probably of component failure during the useful lifespan.
PART PROGRAMMING FOR NC/CNC
The transfer of an engineering blueprint of a product to a part program can be performed manually
using a calculator or with the assistance of a computer language. A part programmer must have an
extensive knowledge of the machining processes & the capabilities of the machine tools. In this
section, we describe how the part programmers execute manually the part programs. In machine tool
applications, the task of programming the system for a given part is usually accomplished by someone
familiar with the metalworking process who has learned the programing procedure for the particular
equipment in the plant. Computer systems are used extensively in NC part programing. Part
programing requires the programmer to define the points, lines, & surfaces of the work part in the axis
system, & to control the movement of the cutting tool relative to these defined part features.
CNC Programming Types
Several part programing techniques are available, the most important of which are:
(1) Manual part programming (conversational programming).
(2) CAD/CAM-assisted part programming.
(3) Manual data input.
1. Manual Part Programming (Conversational Programming)
This is the simplest of the methods.
It is a macro programming language used to instruct the machine to perform preprogrammed cycles
(i.e., facing, drilling holes in arrays, etc.). When writing a conversational program, you simply enter the
appropriate parameters associated with each machining cycle. This is analogous to using the polar
array function in SolidWorks or AutoCAD; you don’t have to do the layout or trig to find the location of
the features; you just specify the essential parameters & the software does the rest for you.
Part programs can be input to the controller via the keyboard. Built-in intelligent software inside the
controller enables the operator to enter the required data step by step.
Program Explanation
N01 G90 Absolute Dimensioning
N02 G00X-30 Y-30 Z100 Rapid move to (X-30, Y-30, Z100)
N03 T01 Using Tool Number 1
N04 G00 Z5 S1000 M03 Rapid move to Z5;
start spindle clockwise at 1000 rpm
N05 G01 Z-10 F100 Feed to Z-10 at 100 mm/min
N06 G41 G01 X0 Y15 F200 Call up compensation,
cutter on the left feed to (X0, Y15) at 200 mm/min
N07 G01 Y66.564 From N07 to N15 is the contour cutting.
N08 G02 X16.111 Y86.183 I20 J0
N09 G02 X93.889 Y86.183 I38.889 J-196.183
N10 G02 X110 Y66.564
I-3.889 J-19.619
N11 G01 Y26.247
N12 G02 X98.882 Y11.758 I-15 J0
N13 G01 X55 Y0
N14 G01 X15
N15 G02 X0 Y15 I0 J15
N16 G40 X-30 Y-30 Cancel of compensation, feed to (X-30, Y-30)
N17 G00 Z100 M30 Rapid move to Z100; program end
Example 3: Turning
Program Explanation
N01 G28 U0.1 W0.1 Return to Machine Zero
N02 G00 U-60.0 W-40.0 Rapid move to Tool Changing position.
N03 G50 X200.0 Z100.0 Assign the Program Zero
N04 G97 S2000 Assign revolution speed as 2000 rpm.
N05 M03 Switch on spindle, turning in forward direction.
N06 T01 Select Tool Number T1 and call tool offset.
N07 G00 X0 Z42.0 Rapid move to (X0, Z42.0)
N08 M08 Switch coolant on
N09 G69 F0.15 Assign feed to be 0.15 mm/rev.
N10 G01 Z40.45 Start cutting the Contour along path A
N11 G03 X 9.217 Z31.13 R5.8
N12 X8.955 Z29.465 R1.556
N13 G02 X 9.6 Z29.1 R1.48
N14 G01 X11.142
N15 G03 X 11.142 Z25.4 R2.398
N16 G01 X16.6 Z9.385
N17 Z8.5
N18 X20.6
N19 Z-3.0 Finish Contouring
N20 G00 X200.0 Z100.0 Rapid move to Tool Changing Position
N21 T0100 Cancel tool offset.
N22 T0202 Select Tool Number T2 and call tool offset.
N23 G00 X21.0 Z9.385 Rapid move to (X21.0 Z3.985)
N24 G01 X16.6 F0.15 Start cutting contour along path B, in 0.15mm/rev feed.
N25 G03 X9.6 Z24.203 R34.2
N26 G01 Z25.4
N27 X14.0 Finish contouring
N28 G00 X200.0 Z100.0 Rapid move to Tool Changing position.
N29 T0200 Cancel tool offset.
N30 T0303 Select Tool Number T3 and call tool offset.
N31 G00 X24.0 Z0 Rapid move to (X24.0 Z0)
N32 G01 X-0.5 F0.06 Part off in feed rate 0.06 mm/rev
N33 G00 X200.0 Z100.0 Rapid move to Tool Changing position.
N34 T0300 Cancel tool offset.
N35 M30 Program end
CNC CAM Programming
Once the part has been designed using conventional mechanical design methods (structural analysis,
FEA, fatigue study, etc.), the part is manufactured using the following method.
(In this course MasterCAM will be demonstrated).
1. A solid 3D model of the part to be produced is created. Any standard CAD format is acceptable.
2. Then the solid model is imported into the CAM (Computer Aided Manufacturing) software.
3. The raw material stock size is input & the part’s coordinate origin is set.
4. The necessary information for each tool used in machining the part features is input. Typically, a
tool library exists, which is a database of tools & their related parameters.
5. For each part feature, the appropriate tool from the library is selected & the parameters necessary
for machining that feature is set. Typical parameters include spindle speed, depth of cut, feed rate,
number of passes, tool path pattern, etc.
6. The programmed tool path(s) is verified by running the CAM software’s virtual machining cycle.
Figure 14: Inventor CAD model of example part (mirrored for clarity).
Figure 15: CAM part setup & coordinate zeroing.
Figure 17. Tool parameters stored for each cutting tool used.
Figure 18. CAM parameters for cutting one feature (pocket) in the part.
Figure 21. Virtual verification cycle used to catch errors before cutting.