![]() | |
| 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
| |||
| |||
Heres a bit of code thats making my machine do REALLY funny things. G00 Z.02 G00 X.625 G01 Z-.500 F.002 G01 G41 Z-.7183 F.002 G02 X.8125 Z-.8120 R.0938 F.002 G01 X.8500 G03 X1.3500 Z-1.0620 R.250 F.002 G01 G40 Z-.1550 F.002 G28 U0. W0. This is supposed to make a part with the following basic specs. .625 dia shank with a length up to a shoulder of .8120 (this shoulder has an inside radius of .0938 ) The part then goes up to 1.350 in diameter with an outside corner radius of .250. my starting point for the .0938 radius is x.625 z-.7183 end points for the radius are x.8125 and z-.8120 and of coarse an R value of .0938 the start points for the .250 radius is x.8500 z-.8120 end points for the G03 move are x1.3500 z-1.0620 and of coarse an R value of .250 I then send the tool with a G01 commmand to turn the 1.3500 diameter to a length of 1.550 (z-1.550) and then G28 it home. What is actually happening is: When the tool get to its z-.500 point it then starts traversing on the x and z (plunging into the .625 diameter up until it gets to the shoulder) It should cut a .625 diameter and then G02 a .0938 inside Rad , but it instead tapers down on the .625 dia to a .500 dia and THEN it G02's the proper inside diameter?????? I dont fricken get it. What am I missing here. When I run the graphic simulation..... it shows the proper part geometry being cut, but not when I run the program.??? On top of this, when it gets to its start point for the G03 radius move that will cut the .250 radius and end at the part major diameter of 1.3500 it does funny stuff as well. The tool goes to x.8500 on a G01 command and then should start its G03 move ( G03 x1.350 z-1.0620 R.250 F.002) It starts cutting a radius of .250, but doesnt cut a full radius ending at a 1.3500 diameter ( and its programmed end points for the radius). Instead it cuts a partial radius and the starts cutting on a tapered path ending at z-1.550. So the part ends up wrong, and it doesnt perform its G01 move at all. The really interesting thing is that, like I said earlier when I run the graphic simulation, it shows the proper part geometry. Can you see whats wrong with my code? Does it makes sense to you? Does the code look correct to you for the profile that I want to cut? I didnt want to call you and bother you on your day off, but if you check you email and get this.... let me know what your thougths are. Thanks Dennis |
|
#2
| |||
| |||
| Are you sure G41 is correct? Doesn't that tell the machine to compensate to the left of the programmed path? What happens if you change it to G42.?
__________________ An open mind is a virtue...so long as all the common sense has not leaked out. |
|
#3
| |||
| |||
| The fourth line of your code is: G01 G41 Z-.7183 F.002 G41 is for cutter radius compensation. It should be started with a X or Y move at least half the cutter diameter long. You may want to use a G43 for cutter length compensation here. |
|
#4
| |||
| |||
I did that move one line earlier. My destination point for the beginning of my G02 move is z-.7183. I went to z-.500 first in the previous line of code, and then proceeded to move to z-.7183 ( the move at least half of my cutter diameter), as needed for fanuc programming. I tried the G42 aswell, but it didnt work properly either. Still stumped Dennis |
|
#5
| |||
| |||
| You didn't specify what control or machine, I'll assume Fanuc and a lathe based on what you posted. As stated it almost certainly has to do with the G41 turning on cutter comp. There is not any D value specified. The chances that it is activating the correct offset is very low, and I think depends on your control parameters. A much better bet is to specify the D value to be sure. There are other possibilities why the offset is incorrect. Is it a theoretical point offset, or center point of the radius offset, and what orientation is the point? Read up on your machines cutter comp. |
| Sponsored Links |
|
#6
| |||
| |||
Hi Dpuch The machine is an Emco PC turn 120 lathe with a Fanuc O-TC series control. Im not aware of a D code for programming G02 or G03 moves with FANUC?? As far as I understand, you tell the machine to goto where the arc is to start from.... for example in my case x.625 z-.7183 ( with a move of at lease half of the cutter dia in advance, which I've done), and then you specify the x and z destinations with an R value for Radius and an F value for the feed rate. I also posted this request for help on practical machinist and Im just about to try some code that someone sent me.... as follows. It looks to me like this code will work.... your thoughts? G00 G42 Z.02 X.625 G01 Z-.7183 F.002 G02 X.8125 Z-.8120 R.0938 F.002 G01 X.8500 G03 X1.3500 Z-1.0620 R.250 F.002 G01 X1.355 Z-1.1 G01 G40 X1.5 Z-.1550 F.002 G28 U0. W0. I appreciate anyones help as Im a greenhorn with NC programming as I just recently purchased the machine for my shop. Thanks again Dennis |
|
#8
| ||||
| ||||
__________________ If you can ENVISION it I can make it |
|
#9
| |||
| |||
| Just a thought as I am still learning the fine art of G-code. He has a feed rate of F.002 I didn't think you could have a feed rate start out with a decimal point. Mike Unless he is programing feed of advance per rev?????
__________________ Warning: DIY CNC may cause extreme hair loss due to you pulling your hair out. |
|
#10
| |||
| |||
| I am less familiar with the lathes and how they setup g-code defaults for it. My feeling is that you need to read up on your machines tool offset features. It may be treated much like milling offsets, or have lathe specific features. The difference may drastically change the outcome of an offset cut. |
| Sponsored Links |
|
#12
| ||||
| ||||
| Your program... G00 Z.02 G00 X.625 G01 Z-.500 F.002 G01 G41 Z-.7183 F.002 G02 X.8125 Z-.8120 R.0938 F.002 G01 X.8500 G03 X1.3500 Z-1.0620 R.250 F.002 G01 G40 Z-.1550 F.002 G28 U0. W0. How I would write it... G20 (MATERIAL = 1.375 DIA) (CNGP-43.0 RADIUS IS 0.004) M01 T0101 (ROUGH OD TURN) G50 S2600 G97 S2400 M03 G00 G54 X1.500 Z1.0 G99 G00 X1.375 Z1.0 G01 X1.350 Z0.05 F0.02 M08 G71 P30 Q40 U0.004 W0.004 D0.020 F0.005 N30 G00 X-0.035 G01 X-0.02 Z0. G01 X0. Z0. G01 X0.625 Z0. G01 X0.625 Z-0.7182 G02 X0.8126 Z-0.812 R0.0938 F0.002 G01 X0.850 Z-0.812 G03 X1.350 Z-1.0626 R0.250 F0.002 G01 X1.350 Z-1.550 N40 G01 X1.350 G00 X2.0 Z1.0 M09 G30 U0 W0 M01 T0101 (FINISH PASS OD TURN) G50 S2600 G97 S2400 M03 G00 G54 X1.500 Z1.0 G99 G00 X1.375 Z1.0 G01 X1.350 Z0.05 F0.02 M08 G70 P30 Q40 F0.003 G00 X2.0 Z1.0 M09 G30 U0 W0 M30 Here's a brief explanation about my program. I'm using canned cycles. Why you ask? Simple... by using canned cycles, I can rerun the program on only the finish OD pass without cutting a lot of air. This is important if you have to take a little bit off to bring it into tolerance. Just start from the finish tool point of the program and that's it. The G71 line is thus explained... G71 P30 Q40 U0.004 W0.004 D0.020 F0.005 G71 = LINEAR TRAVEL DIRECTION P30 = BEGINNING OF THE PART PROFILE Q40 = END OF THE PART PROFILE U = AMOUNT TO BE LEFT IN 'X' W = AMOUNT TO BE LEFT IN 'Z' D = THE DEPTH OF CUT IN THOUSANDTHS F = THE OVERALL FEEDRATE OF THE LAP CYCLE Here's the most likely question you're going to ask. 'Why is there a feedrate within the lap if there's one at the beginning?' Answer: Because I can override that feedrate with another so long as I call it out on the line where I want it to be performed. I do this on any radius especially when I want a nice, clean surface, free of tool marks. The G70 line on the finish tool pass just calls up the same part profile contained in the 'P' and 'Q' lines from directly above. ***NOTE*** Never use the same 'P' or 'Q' values in the program. Always give them different assignments. Example: P10 Q20, P30 Q40, P50 Q60, etc. If you fail to take this caution, you may run another part profile and it could result in a crash and severe machine damage. ***NOTE*** Have fun! Any questions... feel free to ask. Patrick |
![]() |
| 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 |
| Need Help!- How can make New M code in ladder | Osmanselim | G-Code Programing | 4 | 09-05-2008 03:54 PM |
| Need Instruction On Properly Lifting A KMB-1 | jalessi | HURCO | 0 | 07-31-2008 02:28 AM |
| How to Properly Knurl this Part | Crashmaster | General Metalwork Discussion | 26 | 06-11-2007 02:23 PM |
| Can you make G-Code With Corel | Biggermens | General CAM Discussion | 6 | 10-29-2005 10:15 PM |
| Trying to make this work- G code | WOODKNACK | TurboCNC | 17 | 06-10-2003 12:00 PM |