![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| G-Code Programing Discuss G-code programing and problems here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
We do some work with grinding wheels on our cnc mills. Basically we will dress the wheel in the machine on a hydraulic dresser and then cut a surface on a part. Then go back and dress the wheel again and cut the same part but taking more material off. I need a basic macro that will take into effect the decreasing wheel size and cut passes. And also after so many passes to go and dress the wheel. Thanks |
|
#2
| |||
| |||
| 080403-0938 EST USA mgb1974: You need to provide much more information. Do you use any cutting tools or is the machine dedicated to grinding? Is the grinding wheel mounted in a normal tool holder and run in the main spindle, or on some auxiliary spindle? I have no idea what a hydraulic dresser is. Does this in any way affect your basic question? I assume you are using cutter comp otherwise you have a major problem changing the tool diameter (wheel diameter) and working with profiles. When you dress the wheel you will know its new diameter based on whatever method you use with this dressing mechanism. I do not know the details of your control. On a HAAS or Fanuc control a G10 can be used to change the tool table diameter. Or you can directly write to a #-address. Without changing the definition of your finished part profile you can compensate for both the change in diameter of the grinding wheel and the offset of the cut from the finished size by the tool table diameter. To make the cut deeper make the tool table diameter smaller. To compensate for a smaller diameter tool make the tool table diameter smaller. So if you dressed the wheel that makes the wheel smaller, then you make the tool table diameter smaller by twice the linear motion of the CNC table used to dress the wheel, and if you also want to change the depth of cut at the same time, then twice this amount also needs to be subtracted from the tool table diameter. There is only one major problem with using cutter comp and that relates an inside arc where the arc radius is smaller than the cutter radius in the tool table. If you have an inside corner radius of 0.2500" as defined by a G02 or 03 and the cutter diameter in the tool table is defined as 0.550" for a rough cut with an actual 0.4990" tool, then you will get an error message on reaching this point in the program. . |
|
#3
| |||
| |||
| Let me clarify it a little more. It is a Haas mill. The grinding wheel will be mounted to the spindle in a tool holder. The grinding wheel then will go to a dresser motor that is mounted on the table. Will dress the wheel first starting at say 6" diameter, will dress it to say 5.995" diameter, then it will cut say .010 off the part in 10 passes(.001 per pass). Then it will go to the dresser and dress it to say 5.990" diameter. It will then go back to the part and cut the part and then repeat the cycle. Hope this helps. I am new to programming and I am pretty sure a marco is the way to go but not sure how to get there. thanks Matt |
|
#4
| |||
| |||
| 080405-1348 EST USA Matt: By some means you know the diameter is 5.9995. We will assume that the machine uses a diameter value in the tool table for cutter comp and that cutter comp is used. Thus, a diameter change of 0.001" produces a linear cutting offset of 0.000,5". This actual wheel diameter will be stored into variable #110. 110 as a variable choice is arbitrary,and can not be used for any other purpose. In the future we will describe how to determine and load the wheel diameter into its variable. So at this point we are starting with #110 = 5.9995 . The ..... below are to provide some degree of formatting here. These are invalid in HAAS. Assume you are using tool T2, and D2 for its diameter. I believe #2402 maps to D2. Thus, content of #110 must copied to #2402. I believe mapping is D1 #2401, D2 #2403, ... D15 #2415. The following loads the diameter to D2 #2402 = #110 Assume a tool path for your actual part finished profile is at line number N5001 and that no compensation is required during the 10 passes, then: Just following dressing and you are using only one tool, T2, and that has been previously selected as well as G54 and G90. .............................. you might change RPM here, coolant would be .............................. another consideration. G00 Z+4.0 ................ to provide some clearance. G00 X8.88 Y-7.998 ..... starting X,Y position G00 Z-1.25 ............... starting Z position #109 = 0.020. ............... initialize for 10/1000 offset for first cut N100 .............................. first we set the value into the tool table for diameter #2402 = #110 + #109 the #110 is actual wheel diameter and ............................... the #109 makes machine think wheel is bigger ............................... the #2402 is I believe the location for D2 T2 D2 M97 P5001 ............... local subroutine call .............................. return point from the subroutine #109 = #109 - 0.002 if (#109 GE 0) goto 100 .... this does a loop until after the finish cut with #109 = 0 ............................... here on done with this part G00 Z 4.0 ................. an adequate clearance point ............................... turn spindle off and move to an unload position M30 N5001. G41 or G42 for you desired cutter comp direction G01 to a location for the lead-in do your path and lead-out G40 to cancel cutter M99 to return Try getting someting like this to work first. Then we will go thru a means to do your dressing and changing #110 after dressing. Here we have assumed that the wheel does not change diameter during the 10 passes. If it does and I would expect that, then there could be compensation for an assumed constant value of this wear. I have not gone into some of the finer startup and end functions. This presentation was to try to describe the critical points. Obviously after dressing the wheel #110 will have a new value, nothing else will change. This assumes the grinding path is not altered because of a wheel diameter change. . |
|
#5
| ||||
| ||||
| I question your methods here. A Haas milling machine is not a long lasting tool in the first place, and by grinding on it, you're going to shorten the life of that tool CONSIDERABLY. The grit is going to destroy the guideways and ballscrews. This is what jig grinders were made for? Somebody correct my thinking here if it's out of whack. |
| Sponsored Links |
|
#8
| |||
| |||
| The cost of a jig grinding compared to a HAAS mill is alot. We can buy a few Haas mills to the cost of a jig grinder. The present programmer is difficult to work with and is not the best. I been go trained to do the programming just for our department(ace out the other programmer deal). Reason I am asking this question and why I wont get any help from the other programmer. Gar, Thanks alot for your help and time. I need to sit down and go through that and write a basic program complete. Last edited by mgb1974; 04-07-2008 at 06:52 AM. |
|
#9
| |||
| |||
| How does this look? If I understand your explanation, this is doing a .010 cut with a depth of cut .002 each time. -Line N32 does [#109 GE 0] have to be in brackets or ?? The wheel will only change marginal when cutting inbetween dress cycles. Thanks again Matt % O1111(PLAN#Grinding Test REV.A 4/7/08) N10 G40 G17 G90 G54 (cutter comp to the left) N14 T02 M06 (TOOL #2 6" GRINDING WHEEL) N18 G00 X-2.5 Y.95 D02 S4500 F 80.0 M03 (MOVE INTO POSITION X Y) N20 G43 Z6.1 H02 (MOVE INTO POSITION Z) N22 G01 X-2.6 Y1.0 Z6.0 M08 (STARTING POSITION) N24 #109=.020 (Initialize for 10/1000 offset for first cut) N26 #2402=#110+#109 (Set Tool size,#110= wheel dia.) N28 T2 D2 N30 M97 P5001 (CALL UP SUBROUTINE) N32 #109=#109-.002 if [#109 GE 0] goto 24 (loops unitl after the finish cut, depth of cut .002) N34 G00 Z 8.0 N36 M30 % N5001 (subroutine for cut path) N10 G41 N12 G01 X-2.6 Y1.0 Z6.0 (lead in) N14 G02 X-2.7005 Y-4.05 I-17.5303 J-2.257 (cut path) N16 G00 Z7.0 (lead out) |
|
#11
| |||
| |||
| 080409-0806 EST USA mgb1974: When one changes the tool diameter by 0.002" that only changes the depth of cut by 0.001". I believe most users setup their tool table based on tool diameter instead of radius. At line 32 the goto 24 should be goto 26. Subroutine 5001 --- you need to study the HAAS manual on cutter comp. Find out what lead-in and lead-out are for and their relationship to the G41 and G40 commands. 5001 needs work. In N24 by setting this to 20/1000 it will make the machine think the tool is larger than it actually is by 20/1000 in diameter. Therefore the cutting edge is 10/1000 away from your programmed path. At each loop pass thru N26 the specified tool diameter is reduced bu 2/1000 or a radial change of 1/1000 and thus the tool cuts 1/1000 closer to the final path. Cutting terminates after all of the initial 20/1000 initialization has been reduced to 0. Line 26 --- #110 is the true actual physical diameter of the tool (grinding wheel). This is assumed constant for one part. After dressing this actual diameter will change. So for each new part the value in #110 will be different. Because N5001 is an internal subroutine loaded with the main program you do not put a % after M30, but it should go after the end of the subroutine. I have to do other things now so make these changes and try to run in graphics mode. I have not analyzed lines 10 to 22, and you may have to adjust parameters and settings. . |
|
#12
| |||
| |||
| Sorry didnt get back sooner been swamped. I am still very much a newbie with macros and such. I didnt change much but let me know what you think. Ran it through similator and it graphed it out. % O1111(PLAN#Grinding Test REV.A 4/7/08) N10 G40 G17 G90 G54 (cutter comp to the left) N14 T02 M06 (TOOL #2 6" GRINDING WHEEL) N18 G00 X-2.5 Y.95 D02 S4500 F 80.0 M03 (MOVE INTO POSITION X Y) N20 G43 Z6.1 H02 (MOVE INTO POSITION Z) N22 G01 X-2.6 Y1.0 Z6.0 M08 (STARTING POSITION) N24 #109=.020 (Initialize for 10/1000 offset for first cut) N26 #2402=#110+#109 (Set Tool size,#110= wheel dia.) N28 T2 D2 N30 M97 P5001 (CALL UP SUBROUTINE) N32 #109=#109-.002 if [#109 GE 0] goto 26 (loops unitl after the finish cut, depth of cut .002) N34 G00 Z 8.0 N36 M30 N5001 (subroutine for cut path) N10 G41 N12 G01 X-2.6 Y1.0 Z6.0 (lead in) N14 G02 X-2.7005 Y-4.05 I-17.5303 J-2.257 (cut path) N16 G00 Z7.0 (lead out) % |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Convert Fanuc Macro to Fadal Macro | bfoster59 | Fadal | 1 | 11-08-2007 11:41 PM |
| g65 macro mx3 setting | firecat69 | General Metal Working Machines | 2 | 04-30-2007 09:16 AM |
| Setting z | bbergami | G-Code Programing | 4 | 10-01-2006 08:21 AM |
| Setting up VM5 | dneisler | Visual Mill | 6 | 03-12-2006 09:50 AM |
| Setting Zero | wjbzone | TurboCNC | 7 | 01-03-2004 04:25 PM |