首页 > > 详细

讲解 MET 245 MANUFACTURING SYSTEMS PROJECT 3: CNC Project讲解 R编程

MET 245 MANUFACTURING SYSTEMS

LABS 9-14

PROJECT 3: CNC Project

Description

This document contains the following sections:

1.   Introduction

2.   Tools and Cutting Parameters Used for Machining

3.   Initials and Design

4.   Orientation of Sides with Initials and Design

5.   Summary

6.   Project Report

7.   Running Simulations in Vericut

8.   Running Vericut Through Software Remote

9.   Merging Two Programs in One

Also posted on Brightspace in the same folder are the following:

1) Zipped folder “met245_p3example_vericut91” contains files necessary to run Vericut, a leading  software  for  toolpath  simulation.  Vericut  software  is  accessed  through  Software Remote and all ECN labs. Besides the project, controller, machine, and tool files, which are necessary to run simulations, there are 3 sample programs in this folder:

“12rakita_R” program writes MET 245 with an underline. Circular interpolations (G02 and G03) are written with R as an argument (the arc radius).

“12rakita_G68” demonstrates rotation of the coordinate system. The code is identical to   12rakita_R with only one block inserted (G68 X1.25 Y.3 R180.)

“12rakita_IJ” writes the same features. Circular interpolations (G02 and G03) are given with I and J arguments (distance from the starting point of arc to the arc center). Otherwise, this program is identical to 12rakita_R.

All three programs are linked with the Vericut project file. Please  refer to Section 6 for short instructions on how to use Vericut software. Run the example programs,  and if they work then everything is OK and you can simulate your own code.

2) Zipped folder “MET245_hammer_vericut82” contains all 4 Vericut files and a blank program file. This bundle will work with Vericut version 8.0 and up (available at Purdue).

3) “haas_mill_short” is a portion of the manual that contains only G and M codes (to avoid confusion). Please not that all you need to know for this project is the following: G00, G01, G02 and/or G03, M03 (spindle start CW), M05 (spindle stop), M30 (program stop with rewind), and coordinates of the points. A detailed description of commands G00 through G03 are on pages numbered 131,  132 and 133 of that document.

4) Template document for the project report, but you are free to use your own format.

1. Introduction

In this project you will engrave your initials and a simple design on the hammer head you have made in the Hammer Project. For that reason, this project is to be executed on an individual basis, but still  the collaboration is between students is encouraged. Engraving will be done on a CNC machine and  you will write a G-code code for that job.

You will write a program in Notepad and save it as .txt file type. The file name should  be your last name preceded with the section number. If your section is a single-digit number, do not  put zero in front (examples: 1rakita, 2Rakita, 3RAKITA, 4rAKITA, etc.).

Start the project by planning the design and finding locations ofthe points that connect the lines. The working area is 2.5×0.6 inches, as illustrated below:

2.         Tools, Cutting Parameters, Setup

Coordinates of the program reference zero are saved in G56 directory.

Only two tools are to be used in this project:

1)   Tool number 18 (in G –code you call it and load in the spindle with T18 M06). It is a 1/16” diameter ball end mill. For this tool use:

•     Spindle speed 7,000 rpm (S7000),

•     Depth of cut 0.004” (commanded coordinate in Z-direction will be Z-.004)

•     Feed rate is 8.0 inch/minute (F8.).

2)   Tool number 17 (in G –code you call it and load in the spindle with T17 M06). It is a 1/32” diameter ball end mill. For this tool use:

•     Spindle speed 7,000 rpm (S7000),

•     Depth of cut 0.002” (commanded coordinate in Z-direction will be Z-.002), •     Feed rate in XY direction is 2.0 inch/minute (F2.).

For both tools, the rapid plane is 0.1” above the surface (Z.1).

Decimal points can be very important in CNC programming. On some CNC machines, a feed

rate without decimal point is divided by 10. On Haas machine that we use, F2 (no decimal point) is equal to F.0002. Also, put decimal point behind all whole numbers for the coordinates. For

example, put Z6. 6.0 (with decimal point) and not only Z6 (without decimal point). Note that you should not double the decimal point; X0.25. is a syntax error and will not work on any

macine.

Feed rates mentioned above (F2. and F8.) are for cutting in X and Y directions. Since we do straight plunge into the workpiece, it would be good if that this motion is done with lower feed rate. Make sure to take the assigned depth of cut (0.004” for T18 and 0.002” for T17) with feed rate of 2  inch/minute (F2.). The reason is that the cutting speed at the tool axis is zero, so the tool is not actually cutting at that point, but simply indenting into the workpiece. Hence, plunging into material  at a slower rate will add some life to the tool. (For T17, the plunging in the Z direction and cutting in the X and Y directions are the same, 2.0 inches per minute.)

You may have a design or initials with lines that are close to each other. In that case, knowing the line width can help choosing the tool. Although simulating toolpaths in Vericut gives a very accurate visuals of machined features and line widths, one may want to calculate the line widths beforehand.   For that, refer to sketch below. If D is the tool diameter (1/32 or 1/16 inches) and d is the depth of cut (0.002 for 1/32 inch mill, or 0.004 inches for 1/16 inch mill), the line width t is easy to calculate:

If necessary, you can decrease the depth of cut for the 1/16 tool in order to achieve desired line thickness. The depth of cut for the 1/32 tool is already small enough (0.002 inch), so it is not recommended to try smaller depths, or you may end up not cutting into the hammer head if the hammer head surfaces are not parallel enough. Again, Vericut will show you how your hammer head will look after machining.

3.         Initials and Design

Please refer to illustrations below. The two working areas are two flats you ground to 0.985±0.005 inches. The origin of the coordinate system is located in the lower left corner of those areas. Unless your design requires so, it would be good to limit your design between the border lines machined 0.1 inch distant from the edges  ofthe 2.5×0.6 inch working area limits. Hence, the actual area on which you will have your initials  and design is 2.3×0.4 inches.

The same applies to the second side:

The main requirements for both sides are:

•     The complete program (both sides) should have at least 100-120 command blocks (lines of code).

•     The complete program (both sides) should contain at least 16 circular interpolations (G02 and/or G03).

One side should contain your initials. Other side contains your original design and it is completely up to you to decide how your design will look like, as long as. Some hints are:

•     Do your initials first.

•     Based on the number of command blocks used for initials, plan the design side so the total number of command blocks is at least 100-120 for both sides.

•     Some initials can be written with few or even no G02/G03 commands. The design side should compensate for that, so the complete program contains at least 16 circular interpolations.

Two examples of very ambitious designs are shown here:

The 1966 Chevy truck alone contains more than 600 command blocks, while the Purdue train has 790 command blocks for both sides. Surprisingly, both projects went very smoothly and quickly. Nevertheless, they required a lot of time and determination. You are NOT encouraged to try something very complicated, as it may result in unnecessary stress, even unfinished project. It is better to start with something manageable and later on you can always add complexity if the coding is going well.

Some examples of designs that are intricate enough are given below. The most frequent themes in designs are: Purdue inspired; Dedicated to fraternities or sororities; Dedicated to the military;

Dedicated to the loved one(s); Inspiring motto or some message; Inspired by sports, music, video games, etc.; Pure artistic designs; Some designs that fulfill the project requirements.

Below are some examples of initials.

As can be noticed, even initials side can be fairly free form. Borders are not mandatory. The only important criterion is that the project is not too trivial. For that reason we have some rule of thumb that design and initials sides should have more than 16 circular commands (G02/G03), and the whole G-code should not be shorter than 120 command block (100 being the very limit).

Integrity

Please do not cheat and use G-codes from previous semesters. We have a library of all previous projects, and it is very easy to check if some G-code is identical to some previous work. You are not discouraged to have designs like those in examples given above. On contrary, we encourage you to   express your personal preferences, and the themes listed above are the most obvious choices. It will  just be very suspicious a G-code is very similar in formatting to some previous G-code, especially if X,Y,Z coordinates are the same. In that case, you will be called to demonstrate that you have written the code.

4.         Orientation of Sides with Initials and Design

Next illustration shows an example of text engraved on a hammer head. Notice coordinate system in  lower left corner of flat face. The machine has those coordinates stored in directory G56. Also notice the hole facing towards you.

Now we want to machine the same thing on the opposite face, as illustrated below. Note that the coordinate system stays at the same location while the hammer head is rotated. The same text is  machined with the same orientation as before:

Because the hammer head is rotated, this text is machined upside-down on the second face:

If the text for the second side is machined upside-down …

… the text will be properly oriented:

There are two methods to solve this situation:

1)  Not so elegant, sometimes tedious method: make your design upside-down, like below. It is not highly recommended although you are absolutely free to take this approach.

2)  This method is more elegant and hence recommended – simply insert this command block:

G68 X1.25 Y0.3 R180.

and everything after that block will be rotated upside down. This command block rotates subsequent blocks around the center of 2.5×0.6 area. See example in “12rakita_G68” or feel free to ask your TA to add these lines of code. Command G69 cancels rotation: all tool motions, hence etched lines, after G69 will be in the same orientation as designed.

5. Summary

To summarize:

1)   You will use the lower left corner of 2.5×0.6 area as a program reference zero. In the G-code you must tell the machine that location by calling G56. Mike has found X,Y,Z coordinates of that point and saved them in G56 memory location.

2)   If you decide to have a frame, you can do it as shown in sketches above. It is 0.1 inches away from the boundaries of the work area with radius  of 0.1 inch at each corner. You can make a frame. with different dimensions if that is going to enhance aesthetics, but carry in mind that you are limited to 2.5 × 0.6 inches envelope. If you do not like the frame, you can go without it.

3)   There should be at least 16 circular interpolations (G02 and/or G03) in your design. There are 8 of them already included in the corners ofthe two frames.

4)   Design your initials on one side of the hammer head. Write a G-code for that.

5)   Design anything you like on the other side. Write a G-code for engraving the design.

6)   Write your G-code using Notepad.

7)   All motions below Z0.1 are in feed-controlled mode of motion (G01, G02, G03), while all motions above Z0.1 or along that plane are in rapid motion mode (G00). A frequent mistake is to use slow motion (G01) to lift the tool from Z0.1 to Z6. or to descend the tool from Z6. to Z.1.

Try to avoid that mistake, because that motion alone would take 0.5 or 1.5 minutes, depending on the feed rate. These motions should be rapid (G00).

8)   The 1/16” ball end mill is tool number 18 (T18) and the 1/32” ball end mill is tool # 17 (T17). Only these two tool numbers are to be used.

9)   The tool tip touches the surface of the workpiece at Z0.0 and cuts the material when Z coordinates have negative values. The only permitted negative value of Z for 1/32 diameter ball end mill is Z-0.002. That is half the thickness of a standard paper sheet. Accounting for errors in finding the tool length and measuring the thickness of your hammer head, the actual depth of cut may be slightly higher or lower. Do not go deeper, as it may break the tool, and do not go shallower either, as the tool may not cut into the material.

10) The maximal negative of Z for 1/16 diameter ball end mill Z-0.004. If necessary, you can go with smaller depth of cut to decrease the line thickness. Do not go with the depth lower that 0.002    inches for the reason discussed above.

11) Pay attention that spindle is rotating (S7000 M03) before it starts cutting.

12) Pay attention that all cutting motions, G01/G02/G03, are with feed rates F2. or F8., depending on the tool size (F2. for T17 and F8. for T18). Going with G00 into material breaks the tool, or make even more serious outcome.


In order to prevent trivial designs:

•   Both sides should have at least 16 circular interpolations (G02 and/or G03 commands). Note  that if you do borderlines, they already contain 8 circular interpolations.

•   There must be at least 100-120 command blocks.

Also important are these things:

•     By the beginning of second week of the project, eventually, third week, you should have

ready at least a sketch/drawing of your initials and design. It is  suggested that you do them in any CAD program, rather than by hand. If you cannot use any  CAD software, manual calculation of coordinates is also welcome. Guessing the coordinates is  not welcome.

•     A lab engineer or professor must be present during the machining! Never attempt to run the program by yourself.

•     Before machining your code must be checked in Vericut by one of your instructors.

•     You are more than welcome to ask all the instructors any question during the process of writing and debugging the code.

•     Please use lab time for asking questions.

In most cases all the commands you will need are the following:

G00, G01, G02 and/or G03, G56, M03, M05, M30, T17, T18, S7000, F2., F8., Z-.002,

Z-.004, Z.1, Z6., X, Y, R (or I and J if you opt to use them instead). Please refer to has_mill_short for their  description. We can work together on rotation of the coordinate system, commands G68 and G69

***

For uniformity that helps operating the machine, please use the program template provided on the next page and insert your code where indicated. Note that comments are within (parenthesis). Please remove those comments, and in general try to have as few comments as possible in a version that will be checked by your instructor. You can comment extensively if that helps you, but it is easier for instructors to search the program and look for potential errors if there are no comments.

The following G-code template contains approaching and departing tool motions that will help an operator react in time and stop the machine if anything does not look right. For  example, after each  tool change the spindle starts rotating and the tool goes down to 6 inches above the workpiece. After that the tool continues horizontally to the point above the start  of cut and moves down to 0.1 inches above the surface. If the spindle does not start rotating during  the first “L” shaped motion, the operator will stop the machine because the tool must be spinning when  coming in contact with the workpiece. Also, if the tool goes immediately to Z.1 instead of Z6., the operator will stop the machine because the tool may hit the vise on its way to the starting point.


%

O1 (letter O, not zero 0. REMOVE THE COMMENTS)

G56 (PRZ)

G90 G20 G17 G40 G49 G69 G80 G98 (“safety block”)

T17 M06 (or T18 M06 — your choice)

G00 G43 Z6.0 S7000 M03 H17 (H17 for T17; H18 for T18)

X__ Y__ (starting point)

Z.1

G01 Z-.002 F2. (F2. for T17 and T18; Z-.002 for T17, Z-.004 for T18)

X__ Y__ F4. (assuming G01, or use G02/G03 with R or I and J arguments)

(F4. for T17; F8. for T18; decimal point mandatory)

(--> YOUR PROGRAM GOES HERE)

G00 G53 G90 Z0. M05

G53 X-15. Y0. (table moves towards you)

M00 (mandatory stop; this is where you flip the hammer head)

T18 M06 (or T17 M06; leave out if no tool change)

G00 G43 Z6.0 S7000 M03 H18 (H17 for T17; H18 for T18)

G68 X1.25 Y.3 R180. (ROTATION; center of rotation may vary)

(decimal point R180. mandatory)

G00 X__ Y__ (starting point)

G00 Z.1

G01 Z-.004 F2. (F2. for T17 and T18; Z-.002 for T17, Z-.004 for T18)

X__ Y__ F8. (assuming G01, or use G02/G03; e.g. G02 X__ Y__ R__ F8.)

(F2. for T17; F8. for T18; decimal point mandatory)

(--> YOUR PROGRAM GOES HERE)

G00 G53 G90 Z0. M05

G69 (don't forget to cancel rotation)

G53 X-15. Y0. (table moves towards you; without G69, it would move away from you)

M30 (program stop) %

NOTES:

1)  % sings are mandatory — the program starts and ends with %.

2)  Program number is mandatory (starts with the uppercase O and followed with up to 5 digits; e.g. O12345, O1, O245, or whatever).

3)  Tool length compensation is not mandatory. Use G43 H17 for tool 17 and G43 H18) for T18.

4)  Decimal point after feed rate is mandatory (F2.   F8.), or the machine will either cut 10 times slower or issue a warning.

5)  Decimal point after the rotation angle is mandatory (R180.)

6.         Project Report

This document provides the same information as the suggested template posted on  Blackboard. You can reformat that template according to your taste. Just keep in mind that the  report has to be easy to follow, and major results outlined clearly and to the point. Do not be  verbose. It is crucial to demonstrate that you are in control of results and of what you did during this project – your critical analysis is what we are looking for. The template contains the  following sections:

1.           Introduction

2.           Description of G-code Commands Used in This Project

3.           Design

4.           Machined Part

5.           Conclusion

You do not need to have the same sections in your report, or you do not have to have them organized in the same order. Since each section may be short, different section can start at the same page.

They do not have to start on separate pages as in this template.

What to Submit:

1)          This report. It can be in electronic form and uploaded on Blackboard.

2)          Successfully run G-code. It should be uploaded on Blackboard.

What follows is a brief description of each section listed in the template. The text is identical to descriptions written in red letters in that description.

Executive Summary

Executive summary is a brief statement of the purpose of this project, if you see any, and brief   list of what has been accomplished. Be technical and succinct. One paragraph is sufficient for the summary. The next section can start on the same page right after summary.

Description of Commands Used in this Project

Provide description of each command you used (G00, G01,…, M00, M03, M05, … , S, F, …).It is good to provide format in which they are used, example, and similar.

Be technical and succinct.

Toolpaths Design

Describe how you designed toolpaths on both sides of the hammer head: the initials and the design  side. Provide any visuals that show your design. Those can be screen captures from CAD software, drawings generated in CAD software, scanned sketches if you did hand drawings, or hand calculations (scanned or typed). Not all dimensions have to be included.

Be technical and succinct.

Coding and Machining

According to your experience, what practice would you recommend to someone in order to make a successful G-code? Was there anything that did not turn out well and what did you do to solve the  problem?

State whether or not the part has been machined, and provide a brief description of the process. Did anything go wrong, what was that, and what actions did you take to correct that?

If possible, take a picture of both sides of the machined hammer head.  Be technical and succinct.

Conclusion

This section is intended mainly for recommendations for future improvements according to your experience from this project. Report what was good, what was not so good, and what was bad. What are main takeaways from this project?

Be technical and succinct.

**

The report shall be short, showing the evidence of:

•   Both sides simulated in Vericut: 40 pts

•   All commands used are listed and briefly described, with description of the processes of design, coding, and machining): 10 points

•   Machining completed: 30 points

Submitted G-code (as a separate file) and screen captures of simulated toolpaths will show evidence of:

•   More than 16 circular motions: 10 pts

•   More than 120 command blocks (lines of code): 10 points The total number of points for this project is 100.



联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!