Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
1Activity
0 of .
Results for:
No results containing your search query
P. 1
CNC-Basics-of-G.pdf

CNC-Basics-of-G.pdf

Ratings: (0)|Views: 98 |Likes:
Published by ALi
CNC-Basics-of-G.pdf
CNC-Basics-of-G.pdf

More info:

Published by: ALi on Jan 08, 2013
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

01/08/2013

pdf

text

original

 
Visit our CNC ShopNC Programming FAQ for students, computer programmers, prospective CNC programmers,liberal arts majors, systems administrators working with CNC applications, and managers.“I am in much dismay at having got into so amazing a quagmire & botheration with theseNumbers” – Augusta Ada Byron, later Countess of Lovelace, arguably the world’s firsttechnical writer.1. What is CNC, anyway?2. What is a G-code?3. Can I get a bit more on G-codes?4. What is DNC?5. What is/are “Serial Communications”? Don’t bore me.6. What is/are “Serial Communications”? I need details.7. What is XModem?8. How are CNC machines programmed?9. What is APT?10. What is a CL file?11. What is a postprocessor?12. What is “Dumb APT”?13. Why am I confused by the letters I, J, and K?14. What is an inverse-time feedrate?CNC stands for Computer Numerical Control and refers to the operation of a machine toolvia motors, switches, and so on, with a computer controlling the whole shebang. The toolitself may be as small as a benchtop lathe or as large as the gantry mills used to machineairplane wing spars. If you really needed an answer to this question, then you probablywon’t be very interested in the rest of this.CNC programs are usually made up of word addresses. These start with a letter and areusually followed by a numeric value. A word is usually referred to by its letter, hence theword X3.5 (specifying an X axis position) would be called an “X-word” and the word F15.0(specifying a feedrate) would be called an “F-word” (really!). “G-words” specify thingscalled Preparatory Function Codes and have come to be called “G-codes”. (Do not refer to“G-words” in earshot of a CNC programmer. “F-words” are generally ok to use.) G-codesoften trigger machine movement – actually to be technically proper, they often triggerslide or axis movement. However, improperly used they sometimes cause machinemovement.)Think of these as 26 counters labeled A through Z inside the CNC controller.
 
G0 is generally used to denote a rapid traverse. For example, the command G0 X5.0 Z3.5would cause the tool to move to an X position on 5.0 and a Z position of 3.5 as quickly aspossible.G1 is used to move the tool in a straight line at a feedrate you specify. This is a bit morecomplicated than it might first appear since moving from point A to point B at a specificrate often involves moving 3 machine axes at three different rates. G1 is usually calledlinear interpolation. The command G1 X4.5 Y3.0 Z-2.5 F20.0 would cause the tool to moveto the specified XYZ position at a rate of 20 inches or millimeters per minute.G2 is where things can start to get more complicated. It’s always used to make an arc,moving clockwise at a rate you specify. The G2 format you’ll see most creates an arc in theXY plane and specifies the arc center incrementally – for example G2 X-0.26 Y1.14 I0.5J0.0 means “Starting from where the tool is now, move clockwise in an arc. The center of the arc has an X value 0.5 greater than the current position (from I0.5) and the same Yvalue as the current position (J0.0). Stop when you get to X-0.26 and Y1.14. Travel atwhatever feedrate I last specified.”Things get more complex if you need an arc that’s not parallel to the XY plane. Somemachines allow G2 commands in the YZ and ZX planes, in which case Z axis centerreferences are handled by the K-word. Some machines will create a helix with a G2. Somewill create a circle with one G2, others may be limited to less than 90 degrees.You can usually assume that a controller’s G2 command makes a clockwise arc, but notthat it will be specified as described above. Some controllers require absolute centercoordinates rather than relative, and some require an arc radius rather than a center, andsome use all of these methods in various combinations. The EIA standards specifyincremental centers but early lobbying by some folks (the Postprocessor Writer’s Guild?)appears to have created a situation whereby there are actually several ways to define acircle center.G3 is like a G2, just think counterclockwise.G4 is like some folks we’ve all worked with. It does nothing for a specified time. It justdwells – you’ll have to check your controller manual to see what follows the G4. Some useX, F, or P words in milliseconds, some allow an S word to specify spindle revolutions, andsome allow nothing at all and default to about a half second.G5 thru G89 will be dealt with as time permits. For now, the important ones to look upsomewhere else are G17, G18, and G19. These have a dramatic effect on G2 and G3. Also,G53 thru G59 can transform your whole program (pun intended) and those in the G80range can make a “hole” lot of difference.G90 indicates that programmed values are to be treated as absolute, or actual coordinatevalues. If the programs issues a G1 X5.0 Z 2.0 , then the tool moves to that position. A
 
venerable German tool maker once told us how he remembers that G90 means absolute –he said that the German word for absolute is obsolute and that the “o” looks like the “0″ inG90. Actually, the German word for absolute starts with an “a”, so either he couldn’t spell(possible) or we misunderstood (likely). Either way, it’s a good way to remember.G91 indicates that programmed values are to be treated as incremental, or relativecoordinate values. If the programs issues a G1 X5.0 Z 2.0 , then the tool moves five units inthe positive X direction and two in the positive Z direction. The same tool maker (see G90)said that the “i” in the German inkrement looked like the “1″ in G91.As usual, there’s more than one answer – even for the abbreviation. Some say it’s DirectNumerical Control (the original wording) and some say Distributed Numerical Control. Alldefinitions include computer to machine tool communication, or what could be termed“tape elimination”. Then they differ based on including or excluding some or all of thefollowing capabilities:* Drip feeding a controller* Accepting data from a controller* Storing and organizing libraries of CNC programs* Operating as a networkOriginally, “DNC” defined an ambitious approach that involved controlling multiple machinetools directly from a central computer. This was during the “NC” days prior to CNC and wasreally a kind of hybrid CNC/DNC approach. The central computer was connected directly tomachine servos. Eventually, as more and more tape elimination systems were developed,“DNC” was adopted to describe them instead, especially since the central computerapproach was not very successful.The short answer, which you probably don’t really care to know, is that serialcommunications is a bit by bit data transfer method. In a computer, each character is madeup of a group of “bits”, an abbreviation for binary digits. In most computers, eachcharacter contains 8 bits. When communicating via a serial link, a couple of additional bitsare tacked on for various reasons. If a computer is transferring data to a CNC controller ata speed of 9600bps (bits per second) and each character requires 10 bits to transfer, then960 characters per second can be sent down the wire. Seven bit character codes are alsowidely used, so the “divide by 10″ method is slightly pessimistic for these. This is differentfrom parallel communications, where each bit in a character has its own data path and thewhole character gets sent in one shot. On PC’s, printer ports use parallel methods andcomm ports use serial methods.The long answer, which you may well need to know, is complicated enough that we gave itit’s own page – see the table of contents.Back to TopXModems are used to transfer “X Files”. (See serial communications)

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->