![]() | |
| 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
| |||
| |||
I'm fairly new to programming with G code and have a couple of things I need clarified. Using part of a program as an example: 14 M6 T16 15 S2500 M3 16 G0 G90 X0.75 Y-0.50 E1 17 H16 Z0.3 M8 18 G81 G99 R0+.5 Z-0.5 F8. X0.75 Y-0.5 E1 19 X2.75 20 X4.75 21 M5 M9 22 G90 G49 G0 23 M6 T14 etc Q1..Do lines 14 & 15 have to be separate lines? Q2..Are X, Y and E redundant on line 18 or can I delete them on line 16? Q3..Can someone explain R0? In the Fadal manual it infers that R means "retract" (except when it means "radius") but couldn't I just do that with a separate Z move? Can I just set it at "0" and ignore it? |
|
#2
| |||
| |||
Q3 next. Although not 100% familiar Fadal control, I believe they follow normal convention with drilling and boring cycles. In drilling and boring cycles, R is used to set a Retract plane to start cutting from and to return the tool to (depending on another G code in association with the cycle). Lets say that in amongst a number of holes to be drilled there existed a feature Z2.0 high above the surface to be drilled at Z0.0. In this case you would start the drilling operation from say Z2.5 (the initial plane), but you wouldn't want the cycle to be drilling through 2.5 of fresh air for each hole. In this case you could have an R value of say R0.1, which would have the tool move in Rapid Traverse speed to the R plane and commence cut feed from that point. If the Fadal structure is the same as Fanuc, commanding G99 before the drill cycle, or on any coordinate line following, the tool would retract to the R plane at the completion of the G81 cycle before moving to the next hole location. Using G98 instead of G99 will cause the tool to retarct to the Initial level, in this case Z2.5, before moving to the next hole. Accordingly, G98/G99 can be prudently used to move clear and over obstacles during the drilling operation. Q2.. The addresses in line 16 are modal, meaning they stay active until replaced by other like commands. The Initial level referred to in my reply to Q3 is established by moving the tool to a desired Z level prior to calling the drilling cycle, G81 in your example. Accordingly, moving the tool to the XY location of the first hole and then positioning the tool in Z is good practice. The XY in your G81 cycle is not required because the tool is already at that location prior to the cycle being called, however, including it in the cycle will not cause a problem. Regards, Bill Last edited by angelw; 10-17-2011 at 03:57 PM. |
|
#3
| |||
| |||
| q1 yes, i always put these on separate lines q2 no this is not redundant , it pre positions the head q3 R is retract my fadals don't do well with r for radius but work better with I and J for radius I work with Fadals (older machines) every day e-mail any time |
|
#4
| |||
| |||
| You have not given enough information to really answer your questions correctly. What machine/control are your programming for? Most machine controls will NOT accept more than one M-code per line. The X, Y values mentioned are not redundant (they are not even equal to the ones on line 16). You are implementing a Canned Drilling Cycle with G81. The word addresses (letters) used there are needed for this particular cycle.
__________________ http://www.kirkcon.com/ |
|
#5
| |||
| |||
| I highly recommend you just follow the instructions for programming in your machine manuals and not try to invent your own machining style. You obviously are not ready to experiment yet.
__________________ http://www.kirkcon.com/ |
| Sponsored Links |
|
#6
| |||
| |||
| Thanks guys, that helps. And, txcncman, I'm not trying to create my own style. If you've ever read a Fadal manual they do a horrible job of clarifying these kind of details and the only way to know what is acceptable is to ask the experts. FYI I'm a one-man-band and semi-retired so I don't have the luxury of having a mentor. My other CNC has conversational and it completely spoiled me but I'm gradually getting the hang of G code. Now, what the hell's that grinding noise....? |
|
#7
| |||
| |||
| Yes. I have been trying to decipher Fanuc manuals for 16 years. So, when the Fanuc manual says "do it this way", that is the way you should do it. If you are semi-retired, you should have time to read lots of books. Try Computer Numerical Control Concepts and Programming 4rh Edition by Warren S Seames and CNC Programming Handbook 3rd Edition by Peter Smid. Also try the Haas mill manual. Even though it is not Fanuc, many of the codes are similar. and unlike the Fanuc manuals, the Haas manual is almost understandable. You can download at: http://haascnc.com/pdf/96-8000.pdf
__________________ http://www.kirkcon.com/ |
|
#9
| |||
| |||
|
Yeah. You are right. I will quit answering questions like this and let them learn the long hard way instead of the short easy way. (8 weeks of mistakes and crashes versus 8 hours of reading?)
__________________ http://www.kirkcon.com/ |
|
#11
| |||
| |||
|
Yes, you're quite correct. I read the post quicky before answering and related it to line 15 and 16. There are a number of reasons for "why not", but the one that applies to most controls is the number of M functions allowed in the one block and then their function. Regards, Bill |
|
#12
| |||
| |||
| Although the order of the codes on a line is not supposed to matter... sometimes it does (despite what the manual may say!). It is best to code T1 M6 instead of M6 T1. The T code selects the tool and the M code loads it (or prompts the operator to load it). On some machines, M6 T1 will attempt a tool change (to whatever tool was previously selected by the last T code seen), then select tool 1 to be loaded by the next M6 code seen. For the ultimate in clarity, Put the T1 on one line. And the M6 on the next line (although you will even find a few machines that don't like that... they want T and M to be on the same line). Gotta love that industry wide non-standardazation of gcode. |
![]() |
| 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 |
| how to understanding basic g code? | eloid | DIY-CNC Router Table Machines | 5 | 12-19-2011 09:22 AM |
| CNC basic questions | A2fan | DIY-CNC Router Table Machines | 0 | 05-19-2010 03:25 PM |
| Basic questions - sorry | underdog | Phase Converters and VFD | 3 | 06-26-2009 05:17 AM |
| Some basic New Guy questions | seths442s | General Metal Working Machines | 1 | 10-10-2008 01:20 AM |
| Basic G-Code Question | Tazzer | G-Code Programing | 11 | 05-18-2008 09:21 PM |