CNCzone.com-The Largest Machinist Community on the net!



Home Page Mark Forums Read Today's Posts My Replies Classifieds Reviews Photo Gallery Web Links Share Files Advertise With Us Ad List
Go Back   CNCzone.com-The Largest Machinist Community on the net! > Machine Controllers Software and Solutions > Fanuc


Fanuc Discuss Fanuc controllers here!


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 11-30-2010, 09:56 PM
 
Join Date: Mar 2005
Location: United States
Age: 34
Posts: 657
gbowne1 is on a distinguished road
FANUC Milling & Lathe Programming

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
Reply With Quote

  #2   Ban this user!
Old 12-01-2010, 02:28 AM
HAR THA's Avatar  
Join Date: Nov 2008
Location: myanmar
Posts: 12
HAR THA is on a distinguished road

You can try this program by entering G 30 G 54 M3 or M13 M5 M9 M30 code. But you need to learn about this code.
Reply With Quote

  #3   Ban this user!
Old 12-01-2010, 04:27 AM
 
Join Date: Sep 2010
Location: Australia
Posts: 733
angelw is on a distinguished road

Originally Posted by gbowne1 View Post

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
Hi Greg,
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.
Reply With Quote

  #4   Ban this user!
Old 12-01-2010, 09:36 AM
 
Join Date: Jun 2008
Location: United States
Posts: 1,507
stevo1 is on a distinguished road

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
Reply With Quote

  #5   Ban this user!
Old 12-01-2010, 09:53 PM
 
Join Date: Mar 2005
Location: United States
Age: 34
Posts: 657
gbowne1 is on a distinguished road

Well, ok, thank you Bill for your critique.

It's an example I saw on this YouTube Video:

YouTube - Fanuc_Programming.wmv
I 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 puma
on 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
Reply With Quote

Sponsored Links
  #6  
Old 12-01-2010, 10:06 PM
Al_The_Man's Avatar
Community Moderator
 
Join Date: Dec 2003
Location: Canada
Posts: 16,539
Al_The_Man is on a distinguished road
Buy me a Beer?

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.
Reply With Quote

  #7   Ban this user!
Old 12-02-2010, 12:44 AM
 
Join Date: Mar 2005
Location: United States
Age: 34
Posts: 657
gbowne1 is on a distinguished road

Yeah, I have ordered one of his books from eBay.

Oh yeah, incidentally I saw this on YouTube:

YouTube - Pratt & Whitney Fanuc 0M CNC MILL
and 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)
%
Reply With Quote

  #8   Ban this user!
Old 12-02-2010, 02:21 AM
 
Join Date: Sep 2010
Location: Australia
Posts: 733
angelw is on a distinguished road

Originally Posted by gbowne1 View Post
Well, ok, thank you Bill for your critique.

It's an example I saw on this YouTube Video:

YouTube - Fanuc_Programming.wmv

Greg
Greg,
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
Reply With Quote

  #9   Ban this user!
Old 12-02-2010, 07:17 PM
 
Join Date: Mar 2005
Location: United States
Age: 34
Posts: 657
gbowne1 is on a distinguished road

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
Attached Thumbnails
Click image for larger version

Name:	P1010016.jpg‎
Views:	34
Size:	131.7 KB
ID:	120524   Click image for larger version

Name:	P1010018.jpg‎
Views:	31
Size:	83.0 KB
ID:	120525  
Reply With Quote

Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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




All times are GMT -5. The time now is 09:31 PM.





Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO
Template-Modifications by TMS

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361