CNC stands for Computer Numerical Controlled , and refers specifically to the computer control of machine tools for the purpose of (repeatedly) manufacturing complex parts in metals as well as other materials, using a program written in a notation conforming to the EIA-274-D standard and commonly called G-code. CNC was developed in the early 1950s by the MIT
Servomechanisms Laboratory. The introduction of CNC machines radically changed the manufacturing industry. Curves are as easy to cut as straight lines, complex 3-D structures are relatively easy to produce, and the number of machining steps that required human action have been dramatically reduced. With the increased automation of manufacturing processes with
CNC machining, considerable improvements in consistency and quality have been achieved.
CNC automation eliminated errors and provided CNC operators with time to perform additional tasks. CNC automation also allows for more flexibility in the way parts are held in the manufacturing process and the time required to change the machine to produce different components. In modern CNC systems, end-to-end component design is highly automated using computer-aided design (CAD) and computer-aided manufacturing (CAM) programs. The programs produce a computer file that is interpreted to extract the commands needed to operate a particular machine via a postprocessor, and then loaded into the CNC machines for production. Since any particular component might require the use of a number of different tools-drills, saws, etc., modern machines often combine multiple tools into a single "cell". In other cases, a number of different machines are used with an external controller and human or robotic operators that move the component from machine to machine. In either case, the complex series of steps needed to produce any part is highly automated and produces a part that closely matches the original CAD design. In a sense, the CNC machine represent a special segment of industrial robot systems, as they are programmable to perform many kinds of machining operations (within their designed physical limits, like other robotic systems).
CNC machines were relatively briefly preceded by the less advanced NC, or Numerically
Controlled, machines. Modern CNC mills differ little in concept from the original model built at
MIT in 1952. Mills typically consist of a table that moves in the X and Y axes, and a tool spindle that moves in the Z (depth). The position of the tool is driven by motors through a series of step-down gears in order to provide highly accurate movements, or in modern designs, direct-drive stepper motors. Closed-loop control is not mandatory today, as open-loop control works as long as the forces are kept small enough. As the controller hardware evolved, the mills themselves also evolved. One change has been to enclose the entire mechanism in a large box as a safety measure, often with additional safety interlocks to ensure the operator is far enough from the working piece for safe operation. Most new CNC systems built today are completely electronically controlled. CNC-like systems are now used for any process that can be described as a series of movements and operations. These include laser cutting, welding, bending, spinning, pinning, gluing, fabric cutting, sewing, tape and fiber placement, routing, picking and placing (PnP), and sawing. In CNC, a "crash" occurs when the machine moves in such a way that is harmful to the machine, tools, or parts being machined, sometimes resulting in bending or breakage of cutting tools, accessory clamps, vises, and fixtures, or causing damage to the machine itself by bending guide rails, breaking drive screws, or causing structural components to crack or deform under strain. A mild crash may not damage the machine or tools, but may damage the part being machined so that it must be scrapped. pg 2
Many CNC tools have no inherent sense of the absolute position of the table or tools when turned on. They must be manually " homed " or " zeroed " to have any reference to work from, and these limits are just for figuring out the location of the part to work with it, and aren't really any sort of hard motion limit on the mechanism. It is often possible to drive the machine outside the physical bounds of its drive mechanism, resulting in a collision with itself or damage to the drive mechanism. Many CNC tools also don't know anything about their working environment.
They often lack any form of sensory capability to detect problems with the machining process, and will not abort if something goes wrong. They blindly follow the machining code provided and it is up to an operator to detect if a crash is either occurring or about to occur, and for the operator to manually abort the cutting process.
In the first part of this manual , you will explore the basics of CNC machining and review safety procedures for operating CNC machining centers. Numerical Control (NC) is a programming standard that is used to tell a machine how to move in order to perform an operation on raw material. The term CNC is used to describe a category of automated machine tools, such as mills , routers and lathes , which operate using NC instructions received from a computer program.
Numerical control programs are written in a programming language understood by many CNC tools. Using this language - called G&M Code - about which you will learn in this module, a computer is able to control the motions of a CNC machine, enabling it to perform tasks such as drilling, routing, milling, turning and punching.
A Brief History
The term Computer Numerical Control was coined in the 1950s, when programming commands were written as numeric codes. The machinist would manually write these codes for the machine. Since then, symbolic languages have been developed to communicate instructions to machine tools. For example, Computer Aided Design ( CAD ) and Computer Aided
Manufacturing ( CAM ) applications enable you to draw a part as a series of lines and curves, known as the part geometry . The geometry is then used to automatically generate NC code instructions for the machine tool.
In this manual, you will learn to recognize and work with numeric codes. Based on this knowledge, you will be able to effectively write a program to inscribe a "curved" letter into a piece of rectangular flat plastic stock material . pg 3
CNC is especially popular in research and development because CNC tools enable you to create a working prototype of a product or an idea. Simply having a physical three-dimensional example of your idea makes it easier to understand the concept, improve on the design, and generate interest. It is easier to sell an idea to potential customers or investors when you can hand them a model of the product. When only a limited number of parts need to be produced, CNC keeps costs down by allowing you to produce parts in-house, rather than send them out to be machined.
Flexibility: Creating a different workpiece is a simple matter of loading a different program.
This enables you to quickly switch between different programs.
Consistent and Accurate Workpiece Production:
Once a program has been proven to produce a correct workpiece, thousands more identical workpieces can be produced.
Improved Automation: CNC machines can be run with minimal operator intervention. Not only does this eliminate mistakes caused by human error, it also frees the operator to devote his or her time to other tasks.
CNC Mills
A mill is a machine that creates a part by rotating a cutting tool to remove material from a moving workpiece .
The cutting tool is mounted in the spindle and rotates at varying speeds, according to the tool and material specifications.
The workpiece is secured to a table known as a cross-slide .
The cross-slide moves the workpiece, bringing it into contact with the cutting tool. The tool removes material from the workpiece at the points of contact, creating parts.
Years ago, all the movements of the mill were performed by hand. With the development of technology, computers control most modern mills.
Mill Types
There are two main types of mills: .
Vertical mills , in which the spindle axis is vertical, meaning that the tool can move up and down, towards and away from the top or face of the workpiece. pg 4
Horizontal mills , in which the spindle axis is horizontal, meaning that the tool can move from side-to-side, toward and away from the side of the workpiece.
While mill operation may vary from mill to mill, the machining concepts are the same for all mills. Working with the eXpertMill will provide you with excellent insight into CNC milling.
Safety Shield
One of the most important parts of the mill is the safety shield . The safety shield helps protect you from flying chips of material as you machine a part. Before the spindle motor turns on, a magnetic switch on the safety shield is checked to ensure the shield is closed.
Spindle and Vise
The spindle is a rotating shaft into which the cutting tool is mounted with either a collet or a tool holder.
The vertical column supports the spindle assembly components, including the motor that rotates the spindle and the cutting tool.
A vise or other fixture secures the workpiece to the cross-slide.
Axis Motors
The eXpertMill has three axis motors. These motors control the movement of the cutting tool and the cross-slide as follows:
The Z-axis motor moves the spindle up and down, or in and out of the workpiece.
The X-axis motor moves the cross-slide left and right beneath the tool.
The Y-axis motor moves the cross-slide in and out beneath the tool, or toward and away from the vertical column. pg 5
The milling machine has two controls mounted on the front panel:
The Emergency stop button halts all mill operation when pressed. The machine will not operate until you pull the Emergency Stop button back out.
The Spindle speed switch controls the speed of the spindle manually. When turned to "CNC
On", the speed is controlled automatically
Control Panel
On the right side of the machine you find the control panel with important components for operating the machine.
The power switch turns the machine on or off.
The spindle lockout switch prevents the spindle from turning on when locked.
The inputs and outputs indicators allow you to connect and monitor the operation of robots, pnuematic devices and other tools that automate the machining process.
The spindle display allows you to monitor the operation of the spindle. The Speed indicator displays the speed of the spindle when in operation.
Machine state indicators tell you the state of many of the machine’s components:
Safety shield : Lights red when the door is open.
Emergency stop : Lights red when the emergency stop is pushed in.
Axis Limits : Lights red when an axis travel limit is hit on one of the axes. pg 6
In this section, you will examine CNCBase, the control program you will use to operate the simulated mill.
A control program is a software application that controls the operation of a hardware device.
CNCBase is a control program that integrates mill control software with graphic verification capabilities. CNCBase enables you to operate the simulated eXpertMill in the same way you would an actual hardware mill. You can use CNCBase to set operating parameters, to edit and check NC programs, and then to machine parts on the simulated eXpertMill.
Running CNCBase
From the Window menu, select Verify Screen to hide the windows and dialog boxes displayed in the main CNCBase window. Use the Verify Screen when you want to display only the simulated machine. From the Window menu, select Run and Edit Screen . The windows and dialog boxes in the main CNCBase window are redisplayed.
Hint: Any time you reposition or resize the CNCBase window, select one of the viewing modes from the
Window menu to reposition the windows and dialog boxes in the
CNCBase window.
Note that the Jog Control window is displayed. Using the controls in the
Jog Control window, you can manually control the position of the tool relative to the workpiece along the
X (left to right), Y (front to back) and
Z (up and down) axes. From the Window menu, select Run And Edit Screen . The tools you need when running and editing NC programs are displayed, including the Jog Control and
Operator Panel. The Machine Info window is also displayed, enabling you to check and monitor machining parameters.
From the Window menu, select Verify Screen . The simulated machine shows in the 3D window and the Verify window is enlarged, enabling you to clearly view the graphic verification of an NC program.
From the Window menu, select Program Screen , and select any of the viewing options. As only one program is open, that program will be displayed over the entire window. pg 7
Confirm that the Emergency Stop Button icon on the Inputs toolbar is released, indicating that the Emergency Stop button is released.
Double-click the Emergency Stop button to press it. Note that the Emergency Stop Button icon on the Inputs toolbar is now depressed and the "Press for Error Report" area of the status bar starts blinking.
Click the status bar to view the message.
Double-click the safety shield to open it. Note that the Safety Shield icon on the Inputs toolbar is now depressed, and another message appears in the status bar, indicating that the safety shield is open.
Double-click the safety shield to close it, and ensure that the Safety Shield icon on the Inputs toolbar returns to normal, indicating that the shield is properly closed.
CNCBase is comprised of a variety of windows, toolbars and icons. Each of these tools serves a different purpose. You will explore each of these options as they are used.
Menus and Toolbars
Menu Bar: Provides access to commands for working with CNCBase, such as options to write programs and control the hardware.
Message Bar: Provides feedback, error messages and current machine state.
Standard Toolbar: Provides access to the most commonly used commands, such as showing or hiding windows, verifying a program or homing the mill.
Outputs Toolbar: Provides commands for supplying power to the spindle and the outlets on the controller box.
Inputs Toolbar: The Inputs toolbar enables you to view the state of the mill, such as if the
Emergency Stop button is depressed or the safety shield is open or closed.
Status Bar: Provides information about a function selected in one of the windows or toolbars.
Windows
3D Image Window: Displays the simulated machine.
Program Window: Displays the currently active numerical control program.
Verify Window: Displays an example of what the finished workpiece will look like, without running the machine.
Jog Control Window: Enables you to move (jog) the cross-slide and spindle on the machine.
Operator Panel Window: Provides controls used while running a program on the machining center.
Machine Info Window: Provides information on the current hardware configuration, such as the tool in use, spindle speed and tool position.
Actual Position Window: Provides information on the current position of the tool relative to the machine coordinates and work coordinates. pg 8
CNCBase offers three different working modes: .
Run and Edit Screen .
Verify Screen .
Program Screen .
When a working mode is selected, the windows displayed in the main work area change to a format designed especially for performing operations in the selected mode.
Note: Unless you are actually running a program, always work in Preparation Screen.
Run And Edit Screen
Run And Edit Screen can be activated by selecting Run And Edit Screen from the Window menu. In Run And Edit Screen, the Program window is displayed alongside the 3D Image window, enabling you to troubleshoot your NC part program while the lathe is machining. In the Run And Edit Screen, the Jog Control window is displayed, enabling you to move the crossslide in the 3D Image window to prepare the lathe for machining. The Verify window is also displayed, enabling you to check your program before machining a part.
Verify Screen
Verify Screen can be activated by selecting
Verify Screen from the Window menu.
In Verify Screen, the 3D Image window is enlarged, enabling you to follow the program execution. As you will see, you can adjust the view of the turning center and zoom in and out.
Program Screen
Program Screen can be activated by selecting
Program Screen from the Window menu, and selecting one of three views:
Tile Horizontally
Tile Vertically
Cascade
A window is displayed for each open program, enabling you to view, compare and modify all the active NC programs. Note: If no programs are open, the Program Screen will be empty. pg 9
A numerical control program contains the commands that tell the milling machine what movements are required to machine a part.
When you open an NC program file in
CNCBase, that file is displayed in its own
Program window.
When you open a program, the background of the Program window is gray. This means that the program is locked and cannot be modified.
All programs are locked each time they are closed. To modify a program, you must first save it under a new name. You can then unlock and edit the file.
Note: When a program is running it cannot be modified. The program therefore locks and the background of the Program window turns gray when a program is running.
Unlocking Programs
To unlock a program, you must first save it under a new name. You can then deselect the Lock option from the Edit menu to unlock the program.
Once a program is unlocked, you can use text-editing tools such as Cut, Copy, Paste,
Delete and Undo from the
Edit menu to modify the program. These commands can also be accessed from the pop-up menu displayed when you right-click in a Program window.
3D Image Window Description
The 3D Image window displays a 3D simulation of the milling machine. The objects shown in the 3D Image window respond directly to all CNCBase functions and NC program commands, such as axis manipulation, movement commands and program execution. In addition, the simulated mill runs programs and produces finished workpieces in the same way as the real mill. pg 10
The 3D Image window simulates a video camera output screen. You can control the camera to focus in on a clear view of the machining center and mill actions.
3D Window Tools
The Standard toolbar provides shortcuts to frequently used functions that are specific to the 3D
Image window.
The viewing tools enable you to adjust the viewing angle of the machining center in the 3D
Image window. By rotating the scene, zooming in and out of the work area and adjusting the viewing angle, you can adjust the display to meet your specific requirements. pg 11
Jog Control Window
When an CNC program is running, commands in the program code control the movements of the tool and cross-slide.
These commands control where and how fast the hardware moves. You can also manually move the spindle using the buttons in the Jog Control window. When the Activate Jog option in the Jog Control window is active, you can manually move the spindle using keys on your keyboard.
Hint: You can activate the jog control by pressing the Activate Jog button or the F4 key on the keyboard.
Jog Control Window Controls
The X and Y arrows move the cross-slide left to right and front to back. left arrow right arrow up arrow down arrow
You can also use the corresponding arrow keys on your keyboard.
The Z arrows move the spindle up and down. plus minus
Note: You can also use the plus and minus keys on the numeric keypad on your keyboard.
The Speed buttons define the movement speed.
The Step buttons define the type of movements.
Determining Speed Settings
The Speed options enable you to determine the speed at which the hardware will move.
The default speed settings are:
2 inches per minute.
(keyboard shortcut: s )
15 inches per minute.
(keyboard shortcut: m )
50 inches per minute.
(keyboard shortcut: f )
Note: The green LED indicators tell you the current speed setting
Determining Motion Settings
The Step Size options determine distance that the spindle or cross-slide moves each time one of the arrows is pressed. The default Step Size settings are:
0.001 inches. pg. 13
(keyboard shortcut: a )
0.01 inches.
(keyboard shortcut: b )
0.1 inches.
(keyboard shortcut: c )
Continuous movement.
(keyboard shortcut: o )
Limit Switches
In next section, you will see that the mill can be moved in three different directions.
The spindle can move up and down, and the cross-slide can move from right to left and back to front. The maximum amount of movement in each direction is limited by the mechanics of the mill.
The furthest point to which the hardware can be moved in each direction (up, down, left, right, front and back) is marked by a limit switch. When this switch is hit (the hardware has reached the furthest possible point in one direction) the motor will cut out, preventing any further movement in that direction.
Soft Limits
In addition to the mechanical movement restrictions, CNCMotion is programmed to include soft limits.
The soft limits are a safety feature that stops movement a small distance before the physical limit switch is reached.
When a limit is reached, the Positive
Limit or Negative Limit icons on the Inputs toolbar are depressed. pg. 14
Spindle Operation
Like the movements of the tool and crossslide, when an NC program is running, commands in the program code control the spindle. These commands control when the spindle turns on and off, and the speed at which it rotates. You can manually adjust the spindle using the Spindle icon on the
Outputs toolbar, and the Spindle Speed dial on the front panel of the mill.
You can operate the spindle automatically or manually. You can switch between these two states using the Spindle Mode switch next to the Emergency Stop button on the machining center.
If the toggle switch is set to CNC , the spindle will turn on and off when commanded by the
CNC part program, and will rotate at the speed specified in the program.
If the toggle switch is set to Manual , the spindle will turn on and off when the Spindle icon on the Outputs toolbar is clicked. The spindle will rotate at the speed selected with the Spindle
Speed dial on the machining center.
Note: Before running a program or performing a dry run, ensure that the Spindle Mode switch is set to CNC.
Spindle Components
When the spindle rotates, the cutting tool rotates with it. The spindle motor rotates the spindle and the cutting tool. The vertical column supports the entire spindle assembly. The cutting tool is mounted into a tool holder, which is then mounted into the spindle. pg. 15
Setup Tool Library
In order for the control program to do the right job, you must give it the right information. When you insert a tool into the spindle, the control program needs to know which tool is there in order to execute the program correctly.
Tool definitions are stored in the Setup
Tool Library . When you select Setup
Library from the Tools menu, the Setup
Tool Library window is displayed, enabling you to browse the library, define new tools or modify existing tools. Select Select Tool from the Tools menu. The Select Tool for Use dialog box is displayed.
From the Tool dropdown list, select the tool you installed in the spindle, Tool 01 . A description of the tool is displayed on the right side of the dialog box.
Click View > Machine Info to open the Machine Info window.
Confirm that the Tool field reports that Tool 01 is installed. Click Insert Tool .
In order to machine a part correctly the machine must be able to locate the workpiece and positions on the workpiece.
Imagine that you are sharing a car with a friend. One day you can take the car and travel wherever you need, and the next day your friend can do the same. In order for each of you to be able to locate the car at the beginning of your day to drive it, you will have to agree upon a fixed parking space for the car to be left in each night.
The same is true of the milling machine. Each time the machine is used, the cross-slide and spindle are moved along the X, Y and Z-axes to any number of positions within the work envelope. The next time the machine is used, the control program has no way of knowing the exact positions of the cross-slide and spindle. For this reason, before work can begin, the crossslide and spindle are sent to a predefined position in the work envelope from where they can be located by the control program
A reference position is a constant position relative to which other positions are defined.
Before performing any machining operations, you are required to send the machine to the factory-defined reference position called the home position . This home position is a fixed position for the spindle and cross-slide that acts as a reference point for all operations.
Note: It is recommended to home the mill each time you power up or begin work. pg. 16
Reference Positions Used by the Mill
The eXpertMill VMC-0600 uses the following two reference positions: pg. 17
Machine Zero: The factory-set starting position for the cross-slide and spindle. The machine zero position is fixed and does not change according to the tool or stock.
Workpiece Origin: The reference position on the workpiece relative to which the work coordinates are set. The operator sets the workpiece origin according to the tool and stock being used.
Machine Zero
The machine zero is a factory-defined home position for the mill. The spindle and cross-slide will automatically go to this home position when commanded. The home position in the eXpertMill is the top (Z-axis) rear (Y-axis) right (X-axis) of the work envelope, as shown in the figure. This is the end of travel (the furthest the tool can travel relative to the workpiece) on each of the axes.
Note: The right-hand rule shown here is a simple way to remember the directions of travel on the mill.
Home Position
The top of the work envelope is the highest the spindle can travel on the positive end of the Z-axis.
The rear of the work envelope is the furthest the spindle can travel towards the back relative to the cross-slide, on the positive end of the Y-axis.
The right of the work envelope is the furthest the spindle can travel to the right relative to the crossslide, on the positive end of the X-axis
Homing Routines
If the mill is not sent to the home position (homed) when it is started up, it cannot accurately locate the workpiece on the cross-slide. When you perform a regular homing routine , the spindle (Z) and cross-slide (X, Y) slowly moves along each of the axes in turn until they hit a limit switch. When the limit switches have been reached on all three axes, the position is set as the machine zero. This type of homing is used when you have lost position totally.
When you start up the machine, or when you have only slightly lost position (you know more or less where the machine zero positions are), you can perform a quick home . During a quick home, the machine moves quickly to a short distance from where it thinks the limits are found
and then slowly moves until the limits are hit. This is much faster than moving in at the normal slow rate. The quick home feature is particularly useful for homing the mill after hitting a limit or after pressing the Emergency Stop while the mill is moving at a high speed.
Homing the Mill
The mill is homed by selecting Set/Check Home from the Setup menu, or clicking the Home icon on the toolbar.
Defining the Workpiece Origin
The spindle and cross-slide are permanent components of the machining center. They are always the same size and shape. Therefore, one generic home position will always be correct for the cross-slide and spindle.
Workpieces and tools come in a variety of shapes and sizes. It is therefore impossible to define one generic home position to be used as the reference position for all combinations of workpieces and tools.
As a result, you must manually define a reference position for stock of different sizes. This position, known as the workpiece origin or point-of-origin , is defined as the intersection of the axes ( 0, 0, 0 ). The workpiece origin is used as the reference position relative to which the coordinates of any other points on the workpiece can be defined.
Using the Workpiece Origin
The workpiece origin differs from the machine zero in that it is set by the operator and is dependent on the stock size and the tool being used. The point-of-origin is used as the starting point for the program. Setting a point-of-origin enables you to define the work coordinates. These coordinates relate to the workpiece and are usually set from the top-front-left corner of the workpiece mounted in the vise.
To define this position, you will jog the tool in turn to the top, front and left sides of the workpiece and touch off the stock. When you touch off the stock, you bring the tool up against the workpiece until it just grips a piece of paper held between the tool and the workpiece. To set up workpiece Point-of-Origin, jog to the desired position then from the Setup menu, Set Axis to Zero for each dimension . You can use the Go to Position from the Setup menu to move the tool above the workpiece origin. pg. 18
Verifying a Program pg. 19
In this section, you will learn to "check" your program before you run it on the mill. You will learn how to verify that an CNC part program has been written correctly. You will perform a graphic verification to ensure that the part is machined according to your specifications.
CNC Program
To cut a part from a piece of stock, the mill must receive a set of instructions telling it what to do. These instructions are found in an CNC part program. Using information such as the workpiece origin, coordinates on the X, Y and Z-axes, and a set of special NC codes, the NC part program tells the mill where to move, how fast to move, and how fast to turn the spindle
It is imperative that you "check" an CNC program to ensure that it is error free before machining any parts.
Program verification is the only true test that the CNC program will run correctly on the mill. It is far more expensive and difficult to correct programming errors once production has started. Therefore, it is always best to verify the program before attempting to machine a part.
CNCBase enables you to perform a graphic verification to see what the finished workpiece will look like, without running the machine. This enables you to locate errors in the programming instructions, such as the tool being sent to the wrong position. When you perform a graphic verification,
CNCBase also checks the way your CNC code is written. If errors are found in the program code, an alert is displayed directing you to the error, and verification is stopped.
Defining the Workpiece and Tool for Verification
To verify an NC program, CNCBase must be told the dimensions of the part and the tool being used.
For a true verification, this information must match the actual hardware being used for machining. The verification settings are defined in the Verify Setup window. In this window, you can also define the way the workpiece is displayed in the Verify window.
Accessing the Verify Setup Window
The Verify Setup window can be displayed by:
Selecting Verify Settings from the Setup menu or by
Double-clicking in the Verify window.
The Verify Setup window has three tabs: View, Stock and
Options . These tabs enable you to define the workpiece dimensions, as well as the way the workpiece is displayed in the Verify window.
In the View tab of the Verify Setup window, you can define a variety of settings related to the way the workpiece is displayed in the Verify window.
For example, you can define the direction from which the workpiece is viewed and the amount of zoom. A preview of your selections is displayed in the Preview area of this tab.
Style Options
The Style options enable you to define the surface finish of the workpiece in the Verify window.
Solid view displays a solid, threedimensional workpiece, tool and tool path. In
Solid view, the workpiece in the Verify window looks identical to the real workpiece.
You will therefore be able to check if the tool being used produces the correct shape and finish. In Solid view, the tool selected for use in the control program affects the tool path that is displayed.
Centerline view displays a wire-frame outline of the workpiece and the centerline of the tool path. This option is best for ensuring that the tool path is correct, irrelevant of the tool used to machine the part.In Centerline view, the tool selected for use in the control program does not affect the tool path that is displayed.
pg. 20
Stock Settings
In the Stock tab of the Verify Setup window, you can define a variety of settings related to the size and shape of the workpiece and machining parameters for verification.
For example, you can define the dimensions of the workpiece and the position on the workpiece used as the point-of-origin.
Dimension Options
The Dimensions area settings enable you to define the length, width and height of the workpiece and the height of a spacer. For an accurate verification, the dimensions entered here must match the actual dimensions of the workpiece. You can also indicate if you will be using a spacer and its height. As you change a stock dimension, the stock displayed in the Preview area will update accordingly.
Verification Stock Settings
Initial Tool Position Options
The Initial Tool Position area settings enable you to define the position of the tool at the beginning of the program. Usually, the tool will begin the program from the workpiece origin or tool change position. However, if you are running multiple programs one after the other on the same workpiece, this option enables you to check that the program will execute correctly if the tool is found at a different position.
Origin Options
The Origin area settings enable you to define the point on the stock that is used as a reference position, relative to which all the other positions are defined.
The origin of most CNC programs is the top-front-left corner of the workpiece, at which the workpiece coordinates are (0, 0, 0).
To ensure that the correct Tool is used for verification, select Select Tool from the Tools menu.
The Select Tool for Use dialog box is displayed. From the Tool dropdown list, select the tool you installed in the spindle. A description of the tool is displayed on the right side of the dialog box.
Note: To modify the tool in the Tool Setup Library before selecting it. Click Select Tool . The tool you selected is registered and the Select Tool for Use dialog box is closed. In the Machine
Info window, check that the Tool field reports the correct tool is installed. pg. 21
Verifying the Program
Enlarge the Verify window.
Select Verify from the Program menu or click the
Verify icon on the toolbar.
The Verify Program window is displayed.
Ensure that the program is set to start at line 1.
Click Verify Program .
The program is run, and an example of the tool path that will be used to create the finished workpiece is displayed in the Verify window. The message
" Normal Program Stop " is displayed, indicating that the program completed successfully.
Click OK to close the message window.
Adjust the view of the workpiece so that you can clearly see the tool path.
Note: You can use the arrow icons on the Verify window toolbar to adjust the view of the workpiece.
Click the Centerline Verify icon from the Verify window toolbar to change the style to centerline. Note that:
The path that the centerline of the tool follows in the stock is shown as a solid blue line.
The path that the centerline of the tool follows above the workpiece is shown as a dashed black line.
The Estimate Runtime function enables you to estimate the length of time required for a program to run and the approximate distance the machine travels while machining the part. This is good to know if you are working on a tight schedule or if you need to calculate the number of jobs that can be scheduled in a short time.
The Estimate Runtime function also verifies the way your CNC program is written. If it finds an error in coding, the program will alert you and place the cursor near the error
Select Estimate Runtime from the Program menu.
CNCBase will begin estimating the amount of time required to run the program and check the code. The time estimated to run the program is displayed, along with the estimated distance that the tool will have to travel. pg. 22
Steps Required to Machine a Part
1 Write the program , or load an existing program.
2 Secure the workpiece in the vise (mounted on the cross-slide ), and define the workpiece in the control program.
3 Mount the tool in the spindle and define the tool in the control program.
4 Define the workpiece origin position.
5 Verify the program.
6 Perform a dry run of the program.
7 Run the program.
Running a Program
In the previous activities, you prepared the machining center to machine a part and verified a sample CNC part program. In this section, you will perform a dry run of the program before machining the part.
Dry Run
Before machining a part, you must check for any problems that may prevent the part from being machined correctly. In the previous activity, you performed a graphic verification of the program. This check locates any coding errors in the program and creates a sample of the finished part. The graphic verification enables you to confirm that the program code produces the correct part.
The final step in checking an CNC program is to perform a dry run . In a dry run, the mill executes the entire CNC part program above the "surface" of the workpiece. Running the program above the surface of the workpiece enables you to check for programming errors that do not show up in the graphic verification. These errors include:
Missing or incorrect machine commands, such as turning the spindle on and off at incorrect times in the program.
The tool striking the cross-slide or vise. (Destroying CNC mounts)!
The point-of-origin being incorrect.
How to Perform a Dry Run
A dry run is performed above the surface of the workpiece. To do this, after setting the point-oforigin (0, 0, 0) you will send the tool to a position directly above the point-of-origin (for example, you will send the tool to position 0, 0, 1). You will redefine this new position as the point-of-origin (0, 0, 0). pg. 23
By raising the point-of-origin on the Z-axis, you are telling the mill that the surface of the workpiece is higher than the surface is in reality. When the mill executes the program, the tool movements will take place above the workpiece.
You will be able to check that the tool is moving to the correct positions and is not in danger of striking the hardware. You will also be able to check that the spindle is turning on and off at the correct times.
To prevent the tool from accidentally machining the workpiece during the dry run, the height of the “new” point-of-origin should be set to at least the maximum depth of cut above the workpiece. For example, if your deepest cut is 0.2 inches, the lowest position that can be set as the new point-of-origin is position (0, 0, 0.2).
For maximum safety, the new point-of-origin is typically defined 1 inch above the workpiece surface.
Customizing the Run
To run a program, select Run/Continue from the Program menu, or click the Run icon on the toolbar. In the Run Program dialog box that is displayed you can select the program to be run and the block from which it should be run.
From the Run Program dialog box you can also access the:
Verify Settings window to confirm the stock dimensions and settings for the verifier.
Run Settings window to customize your program run, for example by stopping the program execution after each block to check each step of the milling operation.
Note: Always perform a graphic verification before the dry run to ensure that your program has not become corrupted.
Controlling the Spindle
You can operate the spindle automatically or manually. You can switch between these two states using the Spindle speed switch next to the Emergency Stop button on the machining center.
If the Spindle speed switch is set to CNC On , the spindle will turn on and off when commanded by the CNC part program and will rotate at the speed specified in the program.
If the Spindle speed switch is turned to a position between MIN and MAX , the spindle will turn on and off when the Spindle icon is clicked in the Outputs toolbar. The spindle will rotate at the speed selected with the dial.
Note: Before running a program or performing a dry run, ensure that the Spindle Mode switch is set to CNC. pg. 24
If you are satisfied with the program execution, continue to the next step. If there are any problems, make any necessary corrections and rerun the dry run until the program executes correctly.
Machine Info Window
When you are machining a part, the Machine Info window displays information related to the machine performance, including:
The current position of the tool.
The current feed rate and spindle speed.
The block currently being executed (highlighted in blue), as well as the previous and next program blocks.
The time for which the program has been running
Machining a Part
Select Go to Position from the Setup menu. The Go To
Position dialog box is displayed.
Enter the coordinates ( 0, 0, 0 ) and click GO . The tool is sent to the position currently defined as the point-of-origin. As required for the dry run, this position is 1 inch above the point of origin.
Select Set Position from the Setup menu. The Set Position dialog box is displayed.
Enter the coordinates ( 0, 0, 1 ) and click OK .
This resets the position to its true coordinates and restores the original point-of-origin. In the
Operator Panel window, set both the Spindle
Override and Feed Override to 100 %. This ensures that the spindle speed and feed rate will be exactly as defined in the CNC program
Select Run/Continue from the Program menu, or click the Run icon on the toolbar. The Run
Program dialog box is displayed. Click Run .
Confirm that the program executes correctly: pg. 25
Fundamentals of NC Programming
In this section, you will learn to command the mill where to move to machine the part. pg. 26
In order to cut a part from a piece of stock, the mill must have a set of instructions telling it what to do. These instructions are found in an CNC program. Using information such as the workpiece origin and coordinates on the X, Y and Z-axes, the NC program tells the mill: .
Where to move ( tool path ).
How fast to move ( feed rate ).
How fast to turn the spindle ( spindle speed ).
Tool Path
An CNC program tells the mill exactly where to cut the workpiece. You must therefore be able to visualize the movements of the tool cutting the workpiece before you can write the program.
The NC part program is a list of step-by-step movements the tool must make to complete a path from an initial point to a final point. The program can be compared to a set of directions you would give someone to get from the train station to your house. In the same way as you can only give the directions to your house after “seeing” the route in your mind’s eye, you cannot give the tool directions without seeing the tool path in your head.
NC programs are written in a language that can be understood by many CNC machining tools.
This language is called G&M code .
Developing an NC Program
In this activity you will begin to develop an NC part program to machine the “house” part shown. You will identify the coordinates of the positions through which the tool must pass to machine the part. You will then translate this information into G&M code, the language spoken by the control program and the milling machine.
Sketch the Part
Each of the tool movements is defined from one coordinate, or point on the workpiece, to another.
You can also determine the direction in which the tool must move to cut the part.
Once you have measured the distance and direction of each cut, you can combine that information to
write the NC program. Each movement requires an individual command. When the program is run, your commands will be followed, one-by-one, to move the tool along the tool path.
Overview of Programming Modes
Each motion of the tool in a machining operation is from the current tool position to an end position. Once you have located the points through which the tool must pass, there are two different programming modes you can use to indicate these points to the tool: absolute and incremental .
In absolute programming , the end position for a motion is always defined relative to the point-of-origin (0, 0, 0).
In incremental programming , the end position for a motion is defined relative to the position of the tool at the beginning of the motion.
Absolute Programming
When defining the end position for a motion using absolute programming, you should always be asking yourself to what position, relative to the program origin, should the tool be moved? Each of the positions in the program is defined relative to the point-of-origin. For example, if the tool is currently at point A and must get to point B, the start position for the movement is (1, 1), and the end position will be defined as (3, 2). Absolute programming is the easiest method of programming.
Absolute programming is recommended, especially for novice programmers, for the following reasons:
It is easier to locate the program positions when checking for errors because all the positions are referenced to the same fixed reference point.
If an error is made for one positioning point, only one movement will be incorrect.
Incremental Programming pg. 27
When defining the end position for a motion with incremental programming, you should be asking yourself how far from the current position you want to move the tool. Generally, each block in the part diagram is equal to one unit of movement. For example, if the tool is currently at point A, and must get to point B, the start position for the movement is (1, 1), and the end position will be defined as (2, 1). This instructs the tool to move two units along the X-axis, and
one unit along the Y-axis. Incremental programming is useful when a common pattern, such as a square or hole, is repeated several times on a workpiece, as the appropriate programming commands can simply be copied and pasted as necessary. However, when using incremental programming:
Any positioning error is continued and compounded through the rest of the program.
It is extremely difficult to detect a specific positioning error, especially in a long and complicated program.
At the start of the program, your tool is at position
(0, 0). On your part drawing, record the absolute X and Y coordinates for each of the points.
Hint: Remember that these coordinates must indicate how far the tool must travel along each of the axes from the point-of-origin (0, 0). For example, the absolute coordinates for P4 are (2.2,
1.0). By convention, the X value is placed before the Y value.
Answer the questions on the following pages to ensure that the coordinates you entered are correct.
Determining How to Cut the Part
Before you can write the CNC code, you must determine how you will go about cutting the part. This is a very logical process. You simply map-out each action of the tool by deciding where to start cutting, where to insert the tool, where to extract the tool, when to move to a new cutting position, and so on. When you have finished mapping out this sequence, it will be very easy to translate the information into CNC code.
Design Specifications
The design specifications require that after the initial plunge into the workpiece, the tool path be completed without lifting the tool or machining any lines twice. pg. 28
Address Characters
CNC words are divided into groups according to their purpose in the CNC program.
The address character at the beginning of a word indicates the group to which the word belongs.
An address character is a prefix of a single letter at the beginning of a word that tells the control software what to do with the numerical data that follows.
In this way, the address character indicates the type of word.
The following main types of NC words are used in most programs:
Preparatory (G) Codes: The address character “G" is used to identify preparatory codes that control the way the CNC machine moves, such as whether absolute or incremental coordinates are being used.
Miscellaneous (M) Codes: The address character “M” is used to identify words that command the
CNC machine to perform miscellaneous machine operations.
These operations range from turning the spindle on and off to repeating the NC program.
Machine Commands: Many address characters are used to indicate machine commands that determine tool operations, such as the position to which the tool must be moved and the spindle speed.
Coordinates
> X: Where to (absolute) or how far (incremental) to move the tool on the X-axis.
>Y: Where to (absolute) or how far (incremental) to move on the Y-axis.
> Z: Where to (absolute) or how far (incremental) to move on the Z-axis.
For example, if you are working with absolute programming, the X2 command tells the machine to move the tool to the coordinate 2 on the X-axis. If you are working with incremental programming, the X2 command tells the machine to move the tool 2 units in the positive direction from its current position on the X-axis. pg. 29
G90 – Absolute Programming
Activates absolute programming coordinates. When absolute coordinates are used, the tool will move to the points whose X, Y and Z coordinates are indicated.
For example, in absolute programming mode the following block should be used to move the tool from position (0.2, 0.6, 0.3) to a position one unit to the right on the X-axis (X=0.3), two units down on the Y-axis (Y=0.4), and the same position on the Z-axis:
G90 , X0.3 Y0.4 Z0.3
Note: The G90 code does not cause tool movement. Rather, it indicates that the next tool movement will make use of absolute coordinates.
G91 – Incremental Programming
Activates incremental programming coordinates. When incremental coordinates are used, the tool will move the distance indicated by the values of the X, Y and Z words.
For example, in incremental programming mode the following block should be used to move the tool from position (0.2, 0.6, 0.3) to a position one unit to the right on the X-axis (X=0.3), two units down on the Y-axis (Y=0.4), and the same position on the Z-axis:
G91 , X0.1 Y-0.2 Z0
Note: The G91 code does not cause tool movement. Rather, it indicates that the next tool movement will make use of incremental coordinates
Writing the Program
In the first block, enter a command to activate absolute programming mode (G90).
Once you activate absolute programming mode, it remains active until you enter a command to activate incremental programming mode.
In the second block, enter a command to move the tool to position (Z0.2).
This will move the tool slightly above the workpiece before it is sent to the first position, to ensure that no accidental cutting occurs.
In the next block, enter a command to move the tool to above the point-oforigin (X0 Y0 Z0.2).In the next block, enter a command to move the tool to above the first position (X0.5 Y0.5 Z0.2). pg. 30
In the next block, enter a command to plunge the tool 0.02 inches into the workpiece at the first position (X0.5 Y0.5 Z-0.02).
In the next block, enter a command to move the tool to the next position. The X and Y coordinates of this position will vary according to the tool path you defined. The Z coordinate will remain Z-0.02.
Enter commands to move the tool through all the required positions, in sequence.
Each block should contain a command to perform one movement.
When the tool has completed the tool path, enter a command to retract the tool to the rapid plane 0.2 inches above the workpiece.
Enter a command to move the tool to the point-of-origin. Save the program.
The program you have written cannot yet be run on a mill, as no commands to activate the spindle and determine machining parameters have been entered. However, you can verify that the tool path you entered is correct.
In the Verify Setup window:
Ensure that the workpiece as defined as 3 X 2 X 1.5.
Ensure that the origin is set as (0, 0, 0).
Ensure that the initial tool position is (0, 0, 0).
Ensure that Centerline view is selected.
Click the Verify icon on the toolbar.
The Verify Program window is displayed.
Ensure that the program is set to start at line 1.
Click Verify Program .
An example of the final workpiece is displayed in the
Verify window. If any errors are detected in the tool path, correct and save the program before verifying it a second time.
In the next activity, you will add commands to this program so that it can be run on the milling machine, such as switching on the spindle. pg. 31
Programming the House Example pg. 32
In the previous section, you began writing the CNC program for machining the house design. In this section, you will learn about additional CNC commands and incorporate them into your program.
Consider, however, what would happen if you were to command the mill to go from P3 to P4.
Movements would have to take place along both the X and Y-axes. In order for the tool to move in a perfectly straight line from P3 to P4, the movements along the X and Y-axes must be fully synchronized. This is done through interpolation.
Interpolation literally means estimating the points found between two points. In CNC, interpolation is used to move the tool from one point to another along a defined tool path at a programmed rate of travel.
During interpolation, a series of intermediate positions are calculated between two given points.
To generate a movement as close to the required path as possible, the tool moves through each of these positions on its way between the two points.
Linear interpolation moves the tool from one point to another along a straight line by creating many short, straight-line segments between the coordinate points. During linear interpolation, the control program will precisely and automatically calculate a series of positions along the path between the two points, to keep the tool as close to the programmed linear path as possible.
Linear interpolation can be performed along a two-dimensional or three-dimensional axis system. You must specify the start and end points for each movement. The end point of one movement is the start point of the next movement. Linear motion can be used any time a straight cutting movement is required, for example when drilling or milling a straight surface.
G-Code Review
The address character “G" is used to identify preparatory codes that control the way the
CNC machine generates axis movement.
These are words that tell the CNC machine what kind of cut to make and which programming mode to use. They control such functions as tool movement, for example interpolation, and absolute or incremental programming.
The majority of G-codes are standardized
and can be understood by all CNC machines. However, always consult the Operator's Manual to confirm the definitions for your machine.
G00 Linear Interpolation
Rapid traverse G00 moves to the indicated position at the machine’s fastest feed rate . This command is most often used when moving the tool from one position to another "above" the workpiece surface. For this reason, movements above the workpiece surface are known as movements in the rapid plane. As the tool will not be in contact with the part, the feed rate will not affect the finished part. The tool can therefore be moved as quickly as possible.
For example, once the program execution is complete, the tool should be returned to the pointof-origin in preparation for the next part. The block
G00 , X0 , Y0 will command the tool to move to the position with the coordinates (0, 0) as fast as possible.
G01 Linear Interpolation
Move to the indicated position at the defined feed rate. The G01 command is always used in conjunction with an F (feed rate) command. The value of the F command is the feed rate (in inches per minute) at which the tool will move.
For example, to plunge into the workpiece, the tool may be sent in a rapid traverse movement to the start position (X0.5, Y0.5, Z0.2).
G00 , X0.5
, Y0.5
, Z0.2
When above the start position, the tool is plunged into the workpiece at a feed rate of 8 inches per minute, to the cutting depth of -0.02 inches.
G01 , F8 , X0.5
, Y0.5
, Z-0.02
Add interpolation commands to the program as follows:
Add G00 commands at the beginning of blocks that command the tool to move in the rapid plane. For example, to get to P1 before beginning machining and to return to the point-of-origin after the part has been machined.
Add G01 commands at the beginning of the blocks that command the tool to machine the stock. pg. 33
M-Code
The address character “M” is used to identify words that command the CNC machine to perform miscellaneous machine operations. These operations range from turning the spindle on and off to repeating the CNC program.
Activate Spindle: M03
Turn on the spindle motor. The spindle motor should only be turned on when the tool is away from the workpiece. The spindle must be turned on in order for the tool to cut.
The M03 command is always used in conjunction with an S (spindle speed) command. The value of the S word specifies the speed at which the spindle will turn when switched on, in revolutions per minute
Deactivate Spindle: M05
Turn off the spindle motor. The spindle motor should only be turned off when the tool is away from the workpiece. For example, this command is useful to turn off the spindle before removing a workpiece or performing a tool change in the middle of a program.
The M05 command is most commonly placed in its own block. However, it can be placed at the end of a block commanding a tool movement. In this case, the command takes effect after the movement has been completed and remains in effect until the next M03 command is used.
M-Codes: Miscellaneous Operations
End Program: M02
Turn off the drive motors and the spindle motor after the program is complete. The M02 command is always the last command in a program.
The M02 command is most commonly placed in its own block, the final block in the program.
However, it can also be placed at the end of the block commanding the last movement in the program. In this case, the command takes effect and all the motors will be turned off after the final movement has been completed.
Feed Rate: F
The feed rate is the speed at which the tool moves across the workpiece. The F command is used in conjunction with the G01 command to specify the rate of movement when linear interpolation is in use. The parameter represents the speed in inches per minute.
If no feed rate is specified after a G01 command, the system will default the last known feed rate. pg. 34
The spindle speed is the speed at which the spindle rotates. The S command is used in conjunction with the M03 command to specify the rate at which the spindle will rotate when activated. The parameter defines the speed at which the spindle rotates in revolutions per minute
(RPM).
If no spindle speed is specified after an M03 command, the system will default the last known spindle speed.
Place the cursor at the end of the second line in your program, in which you move the tool away from the workpiece, and press Enter . An empty block is added.
In the new block, enter a command to activate the spindle ( M03 ) at a rate of 1500 revolutions per minute
( S1500 ).After each G01, add a command specifying the feed rate as 8 inches per minute (F8).
Note: Rapid interpolation moves are performed by default at the fastest speed of which the mill is capable.
Therefore, you do not need to specify a feed rate for
G00 commands.
Add an empty block after retracting the tool from the workpiece at the end of the program. The empty block should be before the final block in the program, in which the tool is returned to the home position.
In the new block, enter a command to deactivate the spindle ( M05 ).
Add an empty block after the final block in the program, and add a command to end the program ( M02 ). pg. 35
Multiple Address Characters
Only one word from each group can be used per block , with the exception of some G-codes.
For instance, you can place one G-code from the Interpolation group (G90 or G91) and one Gcode from the Programming Mode group (G00, G01, G02, G03) in the same block. However, you cannot place two G-codes from the same group in the same block.
For example, the block G01 , G90 , X2 , X2 is incorrect because it contains two X words.
Note that the use of two G-codes is correct because one G-code is from the Interpolation group
(G01 – linear interpolation) and the other is from the Programming Mode group (G90 – absolute programming.
N10 G01 G90 X2 X2; INCORRECT
N10 G01 G90 X2; CORRECT
Repetitious Codes
Some codes, particularly G-codes such as programming mode and interpolation commands, do not have to be repeated in every block. The program will use the same value until you change the value.
For example, consider the blocks
G01 , X0.5
, Y2 .
Y3.5
.
In the first block the tool is instructed to move in a straight line (G01 – linear interpolation) to position (0.5, 2). In the next block, the tool is instructed to move to position 3.5 on the Y-axis, but the linear interpolation command and X value remain the same as in the previous block. It is therefore not necessary to repeat that information.
The following codes do not need to be repeated:
G90: Once you activate absolute programming mode, it remains active until you enter a command to activate incremental programming mode.
G91: Once you activate incremental programming mode, it remains active until you enter a command to activate absolute programming mode.
G00: Once you activate rapid traverse, it remains active until you enter a command to activate a different interpolation mode.
G01: Once you activate linear interpolation, it remains active until you enter a command to activate a different interpolation mode.
F: If you do not specify a feed rate, the system will use the last specified feed rate. Therefore, if you are switching between rapid traverse and linear interpolation, you do not need to repeat the feed rate each time linear interpolation is reactivated. The system will automatically use the feed rate entered the first time linear interpolation was activated.
X, Y, Z: If the coordinates of a position on one of the axes has not changed (if you are moving the tool in a straight line). pg. 36
Comments
A semicolon, or comment code, enables you to attach comments or reminders, to each block of code. These reminders usually contain information about the words in the block. For example, a comment may tell you exactly what the function of the block is. Any characters that appear after a semicolon (on the same line) are considered a comment and are not acted upon by the machine.
Numbering
The address character “N” is used to identify words that number the blocks of code in the program. The first block in the program is numbered N0. The next block is numbered
N1, and so on.
The N word is always the first word in a block. A control program uses these words to indicate to the operator where an error has been found in an NC part program.
It is customary to number the blocks in a program in multiples of 10, so that additional blocks can be inserted at a later stage without having to renumber the entire program. pg. 37
Arc Programming
In the previous activities, you wrote CNC part programs that used straight lines to machine parts. In this activity, you will learn how to incorporate " circular " tool movements into your
CNC part programs.
Programming Interpolation Movements
When programming linear movements, you specified the start point and end point of the line.
For circular interpolation, you must specify the start point and end point of the arc (along the circumference of a circle), and the center point of that circle.
Example: Determining the Start and End Points
For example, consider the example shown. Your task is to machine the letter “b”. The coordinates of the following positions are required: .
The start point of the line (A or B).
The end point of the line (A or B).
The start point of the arc (C or D).
The end point of the arc (C or D).
Example: Determining the Start and End Points for the Line
The line can be machined from point A to point B or from point
B to point A. It makes no difference which point you use as the start point and which point you use as the end point. There is only one straight line between the two points. The tool will automatically move along this line. pg. 38
Circle Centers
There are an infinite number of circles between any two points. For this reason, when programming an arc you must indicate the center of the circle on whose circumference the arc lies. This center is midway along the circle diameter. If you are programming an arc, the center is midway along the diameter of the circle on whose circumference the arc is found.
Defining the Center of the Circle
For example, points C and D required for the letter “b” lie along the circumference of the circle whose center is at position (X1.95, Y0.65). However, these points also lie along the circumference of the circle whose center is at position (X1.45, Y0.65), and the circle whose center is at position (X1.70, Y0.65).
To ensure that the correct arc is machined, you must use the I and J words to specify the center of the specific circle on whose circumference the arc lies.
The coordinates of the circle center are specified as follows: .
I: The X coordinate of the center of the circle (in this example I1.95).
J: The Y coordinate of the center of the circle (in this example J0.65).
K: The Z coordinate of the center of the circle. The Z coordinate is not used in engraving operations. This coordinate is only specified when the circle is being machined in the XZ or YZ planes.
Programming Circular Interpolation Moves
To machine a circle or arc, the tool must move along a circular path from one point to another.
You must also determine the direction in which the tool will move between these points. This direction will determine the G-Code used to program the move: .
G02 commands the tool to move clockwise.
G03 commands the tool to move counterclockwise.
Example: Determining Direction
The arc required for the letter “b” can be machined from point C to point D, or from point D to point C. There are two arcs that connect these two points.
If the tool moves clockwise from point C to point D, the arc will be machined correctly for this part.
If the tool moves counterclockwise from point C to point D, the arc will not be machined correctly for this part.
If the tool moves counterclockwise from point D to point C, the arc will be machined correctly for this part.
If the tool moves clockwise from point D to point C, the arc will not be machined correctly for this part. pg. 39
An example of an CNC program employing circular interpolation mode in the clockwise direction (G02) and in the counterclockwise direction (G03) is shown in the figure.
Programming Your Curved Letter
Develop an CNC program that will inscribe a
"curved" letter into a piece of plastic stock. Use the end mill installed in the CNC machine. Machine the part at a feed rate of 10 inches per minute, a spindle speed of 2,000 revolutions per minute, and a cutting depth of no more than 0.02 inches.
Make sure to touch off the stock to define the pointof-origin as the top-front-left corner of the workpiece. ( See pg. 41 for Touching Off Stock ).
Use the Verify Setup to ensure:
Stock dimensions
Point-of-origin is defined as (0,0,0).
Initial tool position is (0,0,0).
Save and the Unlock.
Write your program using absolute programming coordinates.
Include commands to turn the spindle off and on.
Save then Verity your program.
Reset the point-of-origin to perform a dry run.
If Ok, then restore the point-of-origin. In the Operator Panel window, set both the Spindle
Override and Feed Override to 100% to ensure that the spindle speed and feed rate will be exactly as defined in the CNC program.
Run your program. pg. 40
Touching Off the Top of the Stock (Z=0)
From the View menu, select Jog Control . The Jog
Control window is displayed.
Double-click on the safety shield to open it.
Zoom in on the workpiece.
Using the options in the Jog Control window, carefully jog the tool down until you are just above the top of the workpiece until an impact error is displayed.
This error indicates that the tool has touched the top of the workpiece. To prevent accidental machining, the tool automatically moves one jog step away from the top of the workpiece.
Click OK to close the error message and switch to 0.001 inch steps.
Carefully jog the tool down until an impact error is displayed again. pg. 41
The tool automatically moves one jog step (in this case 0.001 inches) away from the top of the workpiece.
Click OK to close the error message.
From the Setup menu, select Set Axis to Zero . The Set Axis to Zero dialog box is displayed.
Select the Z radio button and set the offset to 0.
Click OK . The zero position on the Z-axis is set to the current position of the tool.
Verify in the Machine Info window that the Z value reads 0.000.
Touching Off the Front of the Stock (Y=0)
Jog the tool up, away from the surface of the workpiece. When you are a small distance away from the workpiece, switch to continuous movements and move the tool about half an inch above the workpiece. Hint: You can check the position of the tool relative to the workpiece in the Machine Info window. Carefully jog the tool along the Y-axis until it is about half an inch in front of the workpiece. Jog the tool down the Z-axis until about half the length of cut is alongside the front of the workpiece. Switch to 0.01 inch steps and jog the tool as close to the workpiece as you can without causing an impact. Switch to 0.001 inch steps. Carefully jog the tool down until an impact error is displayed. This error indicates that the tool has touched the side of the workpiece. The tool automatically moves one jog step (in this case 0.001 inches) away from the workpiece. Click OK to close the error message.
From the Setup menu, select Set Axis to Zero . The Set Axis to Zero dialog box is displayed.
In the Set Axis to Zero dialog box:
Select the Y radio button.
Select the middle graphic, as the back side of the tool (closest to the spindle column) is touching the stock.
Select the Use Tool Radius radio button. The distance from the centerline of the tool to the side of the workpiece on the Y-axis (0.0625 inches) is entered automatically. Click OK .
Touching Off the Left of the Stock (X=0)
Switch to continuous movements and jog the tool straight up the Z-axis and along the Y-axis, until the tool is half an inch above the workpiece.
Carefully jog the tool until it is about half an inch to the left of the workpiece.
Jog the tool down the Z-axis until about half the length of cut is alongside the side of the workpiece.
Switch to 0.01 inch steps, and jog the tool as close to the workpiece as you can.
Switch to 0.001 inch steps. Carefully jog the tool down until an impact error is displayed
Click OK to close the error message.
From the Setup menu, select Set Axis to Zero . The Set Axis to Zero dialog box is displayed
In the Set Axis to Zero dialog box:
Select the X radio button.
Select the middle graphic, as the right side of the tool is touching the stock.
Select the Use Tool Radius radio button. The distance from the centerline of the tool to the side of the workpiece on the X-axis (0.0625 inches) is entered automatically.
Verifying the Workpiece Origin
Switch to continuous movements and move the tool straight up the Z-axis until the tool is about
0.5 inches above the workpiece.
Select Go to Position from the Setup menu. The Go to Position dialog box is displayed.
Enter the following values in the Go to Position dialog box:
X = 0
Y = 0
Z = 0.059
Click OK .
Click GO to move to the specified position.
The tool should have moved to a position 0.05 inches above the workpiece origin. The X and Y edges of the stock should align with the centerline of the tool.
pg. 42