Go to Post It's not about the equipment, it's about the program. - Taylor [more]
Home
Go Back   Chief Delphi > Technical > Technical Discussion
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Spotlight this post!  
Unread 20-12-2009, 23:52
sanddrag sanddrag is offline
On to my 16th year in FRC
FRC #0696 (Circuit Breakers)
Team Role: Teacher
 
Join Date: Jul 2002
Rookie Year: 2002
Location: Glendale, CA
Posts: 8,510
sanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond repute
Re: G Code with a Mill

First, welcome to the world of CNC! It is SO much fun. There are a few problems in your code; let me try to help.

There is no need to move to the center of the circle before making the circular interpolation. The line that reads "G01 X5 Y5 //Put to center of circle, 5,5" can be eliminated.

Your next line to position the machine at the start of the arc is fine, however usually this would be a "rapid" G0 (or G00) move through air rather than a G01 "feed" move that is usually used for cutting the material.

Your G02 (clockwise circular interpolation) line should read:

G02 X9. Y5. I4. J0

The I and J coordinates are the incremental distances from the starting point to the center of the arc, not the coordinates of the center itself. The coordinates of the center itself never actually appear in the code. So if you are starting at 1,5 the center (at 5,5) is located at an incremental/additional 4 in the X (I), and 0 in the Y (J) directions (since you are sitting directly to the left of your intended center).

The code revised as listed above will yield a semi-circle (half circle). If you wanted a full circle, you would leave out the X and Y coordinates, and the end point would be the same as the start point, resulting in a full circle.

Also, not sure about yours, but many machines are very particular about leaving decimal points off of a number. For example, on a HAAS machine, "F4" does not mean the same thing as "F4." Oh, and that's the the other thing. You are missing feed rates all around. The units of feed rates are in inches per minute. To start out, I'd keep the feeds under 10 IPM.

Also, in your first line (the G90 absolute line) I would add G0 X0 Y0 Z1 to make it do what you say in the comment.

Finally, many CAM programs such as MasterCAM really make coding for the CNC a piece of cake. You should investigate these.

If you wish to improve your understanding of G-code and the machine's interpretation of it, you will find this manual very helpful: http://coestudentshop.engr.wisc.edu/...llWorkbook.pdf
__________________
Teacher/Engineer/Machinist - Team 696 Circuit Breakers, 2011 - Present
Mentor/Engineer/Machinist, Team 968 RAWC, 2007-2010
Technical Mentor, Team 696 Circuit Breakers, 2005-2007
Student Mechanical Leader and Driver, Team 696 Circuit Breakers, 2002-2004

Last edited by sanddrag : 21-12-2009 at 11:47.
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Drill/Mill or Lathe/Mill attachment for small shop area Coach Norm General Forum 22 16-09-2009 15:59
[FTC]: Problem with Code or Problem with Bluetooth? VeedotJaydot FIRST Tech Challenge 3 27-01-2009 18:22
pic: Me with our mill Lowfategg Extra Discussion 1 10-01-2009 15:49
problems using gyro/adc code with camera default code tanstaafl Programming 7 22-01-2006 23:09


All times are GMT -5. The time now is 16:15.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi