Introduction to CNC Code
Overview
Computer Numerical Control (CNC) is the process of having a machine controller manage the operation of a machine. This would include the table motions, the spindle speed, and various other machining functions. This is all accomplished by a program that is written using NC code. These coded instructions are carefully arranged by using letters (A,B,C,....Z), numbers (1,2,3...9) and symbols(+,-,/...etc.) to create a program. These instructions can range from a few lines for a simple part to many thousand of lines for a complex part. If the cumulative instructions (program) are written correctly it will provide specific guidance on exactly what functions you want the machine to perform, resulting in the production of a quality part. On the other hand, a poorly written program can have disastrous results... scraping parts, destroying tools, and possibly damaging the machine. In extreme cases the operator's own personal safety may be in jeopardy
The NC codes are the "language" that is recognized and understood by the CNC machine'scontroller. This language, like any language, has a specific structure to insure accurate communication. The NC code structure consists of characters, words, blocks, and programs.There are 9 charter types used in CNC programming:
- letters A thru Z
- a number or combination of numbers 0 thru 9
- + plus sign
- - minus sign
- . decimal or period
- : colon
- ; semi-colon
- / slash
- % percent
A Word
A NC word is a series of characters arranged in a specified order that provides a specific command to the machine. A word consists of a address (discussed later) followed by numbers and/or symbols. Here are some examples - but not all - of the typical words: | ||||||||||||||||||||||||||||||||||||
A Block A block is a series of words that defines a single instruction. A block can be a single word or a combination of words. A block is terminated by an end of block character (EOB). In some instances the EOB is visible and in some instances it is not. Some examples of blocks are provided below without a visible EOB: N89 M30 (two word block) N11 T01 M06 (three word block) N05 G80 G90 G17 (four word block) N9 G01 X3.0 Y1.7 F40 (five word block) Here are two examples of blocks that show an EOB: N400 G0 X0.2; (three word block with ";" used as an EOB) N5005 G90 G1 F20 X5 Y2 Z4$ (seven word block with "$" used as an EOB) A Program A program is a series of blocks and normally contains a complete set of coded instructions required to completely machine a part or a predetermined portion of a part. A program can be as short as a few blocks or as long as many thousand blocks for complex parts. The program contains all the instructions and information necessary for the computer to command the machine to perform specified functions, ultimately resulting the complete machining of a part. A program and all of its parts, can be equated to the English language as follows:
Address Words The Address code is the single letter character (A-Z) at the beginning of each word that defines what the computer should do with the numerical data that follows. A list of the Addresses codes is shown here: (Note that a few of the Address codes have multiple definitions) Although these are the most commonly used Address code definitions for milling and turning, it is possible that definitions may vary for different computer controllers. Always consult the operator's manual for the\ specific controller being used. Two of the Address codes are considered major codes. The two major codes are G-codes G Words G words, commonly called G codes, are major address codes for preparatory functions which involves tool movement and material removal. These include rapidmoves, lineal & circular feed moves,dwell, and canned cycles. Through the years many of the G-codes have been standardized, but others are unique to a particular controller. The commonly used G-codes are briefly summarized below: There are many other special feature and advanced machining G-codes that aren't commonly used, and therefore not discussed in this basic module. See the"G" glossasy listing for explanations of all of the G-codes Note: always consult the operator's manual for the G-code definitions for your specific controller. M Words
M words, commonly called M-codes, are major address codes for miscellaneous functions that perform
the instructions that do not involve tool movement.
These include spindle on and off, tool changes, coolant on and off, and other similar related functions. Most M-codes have been standardized, but there are a few that have a unique function for a particular controller. Many of the more common M-codes are described below: Similar to the G-codes there are many other special feature and advanced machining M-codes that aren't commonly used, and therefore not discussed in this basic module. Note: always consult the operator's manual for the M-code definitions for your specific controller. Article resource : www.jjjtrain.com |
I think that with the influx of CNC mills into the cycling market that novelty will start to fade away and people will begin to realize that this is just an cnc precision machining over-glorification of functionality.
ReplyDeletewww.uzkarmakina.com cnc işlemleriniz için tıklayın. For Lathe CNC
ReplyDelete