![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| Fanuc Discuss Fanuc controllers here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
Since I am new to learning FANUC Lathe Programming but not nessisarily for Milling controls, I decided to move my adventure in learning FANUC here from the Lathe Offset thread. Thanks to all of those who have recently helped me out. I have recently been learing more about programming offsets for the "M" type control, tool length, work offsets. Thanks for the help there. Here is a sample of a FANUC program I ran across recently. O0001 N1 G00 G17 G90 G90 G40; N2 G92 X0. Y0. Z0. N3 X50. Y50. Z50. N4 G91 X-20 G90 Y30. F400 N5 G02 X50. G91 Y20. I20. N6 X20. Y-20. J20. G90 Z49. % What are we doing with this program? Thanks, Greg |
|
#3
| |||
| |||
| You can put what you like with your program example and it won't work as long as our collective backsides point to the ground. G codes are put into groups, and G codes from the same group can't be programmed together in the same block. As I've suggested to you in the past, obtain a book that explains the meaning and use of the various G and M codes, otherwise its going to take you a lifetime to get up to speed by Posting spaghetti code examples and have all that is wrong with it explained. "What are we doing with this program?" Having the machine go into an error condition and you scratching you head over what may be wrong because you have no reference material to relate back to. Following is a critique of the your example program. O0001 N1 G00 G17 G90 G90 G40; This line will work but the second G90 is redundant N2 G92 X0. Y0. Z0. If using G92 this is best applied with the slides at Reference Return, setting the Absolute coordinate system relative to X0 Y0 of the workpiece N3 X50. Y50. Z50. This line will move in rapid because of the modal G00 in the first line. However, if the G92 Z0.0 was launched with the Z slide at home ready for a tool change, the Z slide will run into Z+ overtravel N4 G91 X-20 G90 Y30. F400 This line will cause an error because G90 and G91 are from the same group. N5 G02 X50. G91 Y20. I20. The order of the G codes is flexible, but there are programming conventions that should be observed if you want to be more than a "spaghetti code" programmer. Whether this arc is executed in Absolute or Incremental mode the control will error because the arc center, and finish points are not compatible with the start. N6 X20. Y-20. J20. G90 Z49. Again, whether programmed in Absolute or Incremental this line will fail. Add to that the Z49.0, and unless the control has helical interpolation, it give the control another choice with regards to how to error. % No M02 M30 or M99 before the end of file marker will cause and error. All comments are offered constructively. You need to a list of G code and an explanation of their use. Although many feel that Fanuc manuals are hard to comprehend, they will give you a good handle on the fundamentals of programming. I'd strongly advise you to get hold of a Fanuc manual or a book on general CNC programming. Best regards, Bill Last edited by angelw; 12-01-2010 at 01:33 PM. |
|
#4
| |||
| |||
| Here is a good website that helps explain some of the G-code commands. CNC G Codes Definitions Examples Programs Programming Learning Training I also ass u me that this is on the control that you have geometry and wear offsets but no workcoordinates G54-G59? Stevo |
|
#5
| |||
| |||
| Well, ok, thank you Bill for your critique. It's an example I saw on this YouTube Video: YouTube - Fanuc_Programming.wmvI do have several books on CNC programming. You all were talking about programming refrences and your books in the Edit LSK 6T thread. I would like to see some DVD's or even YouTube videos like this one: YouTube - daewoo pumaon how to do various things on the FANUC. Books are nice but some people would I do have all of the manuals for the FANUC controls I own, which currently are: 0M Model C, 15M Model A, 18i-M Model A, 11M, and once it is finished, a 16MB. I did once have a 6MB but it sold this past year so I could build my 15. One of the books I use a lot is this one: An Introduction to Cnc Machining and Programming by ... - eBay (item 160413024593 end time Dec-07-10 14:39:05 PST) Greg |
| Sponsored Links |
|
#6
| ||||
| ||||
| Pick up a copy of CNC programming Handbook by Peter Smid. Very comprehensive. All his examples relate closely to Fanuc. Al.
__________________ CNC, Mechatronics Integration and Machine Design. “Logic will get you from A to B. Imagination will take you everywhere.” Albert E. |
|
#7
| |||
| |||
| Yeah, I have ordered one of his books from eBay. Oh yeah, incidentally I saw this on YouTube: YouTube - Pratt & Whitney Fanuc 0M CNC MILLand I have the same 0M-C CRT/MDI and the machine operator panel shown at about 1min 5sec to 1min 9sec. Both have the same small keyboard. although when I got the lower machine operator panel, it needed a new keysheet membrane. I also had to obtain a key for the protect switch. Mine does not have the XYZ portion under the "Program Source" and there is no division between the two sections. I do have a full keyboard 0M CRT/MDI unit with the that I'm gonna install when I have time.I think that one is one of the "HiFi" panels. Don't know what made it "HiFi" Today I copied down one of the programs in my 15MA that I started on. It's also one of the programs I have intended on redoing. I use a 3/8" HSS end mill in a 3/8" EM holder, CAT40, standard length. Workpiece is .3125 thick 7075-T6 Alcoa Aluminum. Stock size is 4"x6. First op is a .15625" deep pocket .75"x.75" at 1.125"x1.125" from part zero, X0 Y0. The radius corners of the pocket remains .1875" R and it starts out in Z about 1/2" to 1" from the part surface. Fixture is my Kurt D675 with one vise at X26.5" Y6.5" on the machine table, which is 13"x53". I have 8,000 to 10,000 RPM available, and the 10S servos. I have a work stop so that the part is centered in the vise to +/- .003" and up on paralells. i usually check to see where im at with my edge finder. It feeds over to the drill cycle and then drilling two .125" dia holes @ .19" x .19" from each corner of the right side of the part. Near the exact center of the part gets a #7 drill then tapped 1/4-20 through (Nachi HSS GH3 class). This fits a Now that I have a Bilz style tapping set up and a Tapmatic 50X, I use those too. There is some holes, empty line numbers since I never did really finish writing the program. But I knew I needed some space. T07 is my Albrecht C130J33 keyless with the #7 drill. T08 is an ER16 collet chuck, T09 is Jacobs 14N, T10=TG100/100TG collet chuck, T11=Criterion DBL202, T12= ER32 collet chuck T05=1/2" end mil holder Here it is: O0099 (PARTNO19374-2 FLEX MNT PLT) (KURTD675 6061T6 ALUM 3125 4x6) N1 G90 G80 G20 G17 G99 (inch mode, XY mode) N2 T04 M06 (TOOL 2FLSEM HSS 375) N3 M03 S1270 (START SPINDLE 1275RPM) N4 G00 X2.25 Y1.125 (Rapid to first op. location) N5 Z.5 N6 Z0 N7 G18 G02 X2.1 Z-.5 N8 N9 N10 N11 N12 N13 N14 T09 M6 (Change to 14N drill chuck) N15 G81 or G83? (This is a drill cycle for my 14N with a .125" HSS drill) N16 M05 G99 M30 M09 (Stop spindle, Return, Coolant Off, etc) % |
|
#8
| |||
| |||
I took a look at the YouTube video you referred to, and note that your transcription of the code as presented in your example is inaccurate. I still stand by my comments regarding multiple G codes from the same Group being programmed in the same line is a no no, and its clearly stated by Fanuc that should this be done, the G code specified last is effective. However, by looking at the position screen at the completion of each block in the YouTube video, the control clearly seems to move both incrementally and absolutely in the one block. Perhaps that's the purpose for the video, to show that what is logically impossible, actually works. The control is a Fanuc 6MB, a rather old vintage. I'd be surprised if the same would occur with later controls; I'll check that out. I used to cut internal, figure "8", oil grooves using a threading cycle in a turning center equipped with a 6TA control by virtually confusing the control. This exercise was deemed to be impossible, but it also worked. N5 G02 X50. G91 Y20. I20. Moved to the Absolute coordinate of X50. by virtue of the G90 that was modally effective form the previous block, and Incrementally 20mm in Y to finish at Y50.0 N6 X20. Y-20. J20. G90 Z49. This is how this line appeared in your posted example, and given that the control is in incremental mode from the previous block, this block is an impossible ask with a J20. value. The example in the YouTube video reads N6 X20. Y-20. J-20. G90 Z49. and in incremental mode will work and terminate at X70. Y30. Even though this YouTube example defies what Fanuc says, programming G90 and G91 in a single block makes for a program that's hard to read in my opinion, and unnecessary. Regards, Bill |
|
#9
| |||
| |||
| I'm sorry, it was late and I made a typographical error when copying it from the video. Here I have attached a couple pics of items I have gotten on eBay in the past 12 months. The two pics are my 0-M Full keyboard CRT/MDI and the FS0C full keyboard Machine Operator panel. They still need keysheets. The other is my latest panel which says it's a A02B-0092-C141 No. N0964 1990 02. The board is A16B-1310-0380/03B. Not nearly as nice as the full keyboard version but will do. I don't know if there is any special programming or parameter setting I will need to do in order to get the panel to work when it's installed. Greg |
![]() |
| 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 |
| Cnc Lathe Programming | millmonkey1 | Employment Opportunity | 5 | 02-04-2011 06:17 AM |
| Programming a bar puller in X2 on a lathe | bob1112 | Mastercam | 1 | 01-06-2009 10:05 AM |
| Lathe programming | mcm1961 | Haas Lathes | 2 | 07-19-2008 09:41 PM |
| c-axis programming lathe | pjmorand | G-Code Programing | 8 | 10-05-2007 03:44 PM |