CHAPTER 2 The NC Programming Process Prepared by

CHAPTER 2 The NC Programming Process Prepared by: Ahmad Fairuz Bin Mansor Universiti Malaysia Perlis (Uni. MAP) 2017

Course Outcome 1 (CO 1) Ability to explain the concept and evaluate the requirements of NC machining operation such as workpiece zero setting, tool setting, etc.

Essential Questions • How does the computer turn the ideas from a blueprint to an NC program? • Why is off-line programming preferred over shop-floor programming? • What are the major methods for transferring files from the computer to a CNC machine tool?

Essential Questions (cont’d. ) • What are some different file formats and encoding schemes for data? • How do you safely test part programs off line and on the machine tool?

An NC Part Program • First: plan all points that the tool will have to pass through to create the desired shape. It is called as toolpath. Figure 3. 1 A simple toolpath to move the cutting tool to each point to produce a series of steps (left). We start the programming process by planning the toolpath and finding the coordinates of each point (right).

• The NC code for an entire part program can be somewhat complicated. Thus, we need to look at only the few blocks. Toolpath

An NC Part Program (cont’d. ) • To machine the slot: – First, position the end mill to point P 1 and plunge the tool to proper depth. – Move the end mill to each of the n e x t s i x points to produce the slot. – Finally, pull the tool out of the slot at P 7 and move the tool to an out-of-the-way position.

An NC Part Program (cont’d. ) • Origin: – Where the horizontal a x i s crosses the vertical Figure 3. 2 Crosshairs are used to indicate an origin. The coordinates of the origin are X 0. 000 and Y 0. 000. Table 3. 1 Cartesian Coordinates of Points 1 to 7

An NC Part Program (cont’d. ) • Move remaining points to machine the slot. • Pull the tool out of the slot and move it out of the way to a safe location. • Code can then be assembled into a complete and working NC part program.

To a safe location

Off-line Programming • Programming/ online programming: – Code is typed in at the control of the machine tool – Not very efficient to stand on the shop floor and key a program. • Off-line programming: – Code is typed on a PC, saved as a t e x t file, and then moved to the machine tool • More efficient • Te x t editor or word processor. Eg: Notepad.

Figure 3. 4 There also a number of specialized editors designed specifically for NC programming. These editors usually contain tools that make it easier to create and edit NC programs.

Figure 3. 3 NC part programs can be written off line on a desktop computer. Notepad (shown) is a simple text editor that ships with Windows and is adequate for editing NC code.

Testing and Debugging • A number of software programs test codes before sending to machine tool – Toolpath backplot: • Simple graphical representations of a toolpath made up of lines and arcs used to verify accuracy of an NC part program – Solids verification: • Software acts like the engine to produce the model. • It present the programmer with a fully rendered, threedimensional representation of the programmed toolpath and resulting workpiece. • Prevalent in the few last years as a result of advances in computer technology.

Testing and Debugging (cont’d) Toolpath backplot Solid verification

Transferring the Program to the Machine Tool • Accomplished through a serial communications port – Built in to most PCs CNC machine tools – Run communications program on PC – Set up control to interact with communications software • Requires that machine and computer be configured identically

Transferring the Program to the Machine Tool (cont’d) Serial communications between a PC and CNC machine tool

Transferring the Program to the Machine Tool (cont’d) A serial communications program allows us to transfer NC part programs between the desktop PC and the machine tool through a serial port.

Transferring the Program to the Machine Tool (cont’d) • A more sophisticated software is needed to perform advanced operation such as Distributed Numerical Control (DNC). • DNC is an architecture in which all program distribution is controlled by a central computer. • Drip feed is a technique used on CNC machines that do not have enough memory for extremely large, computer-generated NC part programs. • The communication program drips the NC program into the control one block at a time, and then the control discards each block once it has been executed.

Transferring the Program to the Machine Tool (cont’d) • Using Local Area Network (LAN) is 50 times faster than serial communication. • The natural evolution is to equip the CNC control with Ethernet card (sometime wireless), so that the computer can directly communicate with the network. • This is option when using many CNC machine tools.

Proving the NC Program on the Machine Tool • Steps: – Verify code on a PC • Backplotting or solid simulation software – Complete a program testing checklist – Load program onto machine tool – Run a graphical simulation (if available) – Perform a dry run • Enable the Single Block mode • Turn down the feed and rapid transverse rates • Set the workpiece Z-offset to a safe level above the workpiece. • Repeat the process with single block disabled. – Make a first cut

Proving the NC Program on the Machine Tool (cont’d) It is common practice during testing to set the Z-offset to a level above the top of the workpiece during a dry run.

Proving the NC Program on the Machine Tool (cont’d) Program and set up Checklist: 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. All rapid transverse moves are above the top of the workpiece. The tool numbers and offsets match. The tool in the machine match those listed on the setup sheet. All tools have been touched off, and the offset values are reasonable. Plunge cuts are performed with center-cutting tools. Speed and feeds are reasonable. The spindle is rotating in the correct direction. Coolant is initiated prior to cutting. Roughing operations are performed before finishing. Tools are at safe Z-level before moving to any new feature. Hole-making operations are performed in the proper order (i. e. , spot, drill, bore or tap, etc. ) 12. Fixtures are bolted down tightly and squarely. 13. Cutting tools are secured in their holders.

Proving the NC Program on the Machine Tool (cont’d) Mistake Result/Consequence Spindle was turned on before the cut Broken tool and ruined workpiece Tool was not returned to a safe position above the part before moving to the next pocket Scrapped workpiece Coolant was not turned on before the cut Tool was ruined Fixture or vise interfered with toolpath Broken tool and damaged fixture Toolpaths out of order Holes were tapped before they were drilled, resulting in a crash. Incorrect tool installed Part made to the wrong dimensions Wrong tool offset The tool will be too high or too low, which can result in a crash or incorrect dimension Improper speed or feed entered Burned or broken tool. Workpiece pulled from fixture

CNC Safety • Be sure to review program and setup checklist • Machining and CNC machining have inherent dangers associated with: – Rapidly moving machinery – Sharp edges – Hot flying chips • Minimize dangers by following safety rules

The End Q&A
- Slides: 26