cnc machine language

20
CNC Machine Language

Upload: abra-daniel

Post on 31-Dec-2015

23 views

Category:

Documents


3 download

DESCRIPTION

CNC Machine Language. گرد آورنده: بابک دلخون. [email protected]. CNC Machine Language. G-Code. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: CNC  Machine  Language

CNC Machine Language

Page 2: CNC  Machine  Language

CNC Machine Language

Page 3: CNC  Machine  Language

G-Code G-Code is one of a number of computer

code languages that are used to instruct CNC machining devices what motions they need to perform such as work coordinates, canned cycles, and multiple repetitive cycles. Industry has standardized on G-Code as its basic set of CNC machine codes.

Page 4: CNC  Machine  Language

G-Code is the most popular programming language used for programming CNC machinery. Some G words alter the state of the machine so that it changes from cutting straight lines to cutting arcs. Other G words cause the interpretation of numbers as millimeters rather than inches. Some G words set or remove tool length

or diameter offsets .

Page 5: CNC  Machine  Language

There are other codes; the type codes can be thought of like regiester in a computer

X absolute position Y absolute position Z absolute position

A position (rotary around X)B position (rotary around Y) C position (rotary around Z) U Relative axis parallel to X(

Page 6: CNC  Machine  Language

V Relative axis parallel to Y W Relative axis parallel to Z

M code (another "action" register or Machine code(*))(otherwise referred to as a

"Miscellaneous" function "F feed rate

S spindle speedN line number

R Arc radius or optional word passed to a subprogram/canned cycle

P Dwell time or optional word passed to a subprogram/canned

Page 7: CNC  Machine  Language

T Tool selection I Arc data X axis J Arc data Y axis .

K Arc data Z axis, or optional word passed to a subprogram/canned cycle

D Cutter diameter/radius offset H Tool length offset

Page 8: CNC  Machine  Language

Below is a complete listing of current codes

G00Rapid Linear InterpolationG01Linear Interpolation

G02Clockwise Circular InterpolationG03Counter Clockwise Circular

InterpolationG04Dwell

G05High Speed Machining ModeG10Offset Input By Program

Page 9: CNC  Machine  Language

G12Clockwise Circle With Entrance And Exit Arcs

G13Counter Clockwise Circle With Entrance And Exit Arcs

G17X-Y Plane Selection G18Z-X Plane SelectionG19Y-Z Plane Selection

G28Return To Reference PointG34Special Fixed Cycle (Bolt Hole Circle)

Page 10: CNC  Machine  Language

G35Special Fixed Cycle (Line At Angle)G36Special Fixed Cycle (Arc)

G37Special Fixed Cycle (Grid) G40Tool Radius Compensation Cancel

G41Tool Radius Compensation LeftG42Tool Radius Compensation Right

G43Tool Length Compensation

Page 11: CNC  Machine  Language

G44Tool Length Compensation CancelG45Tool Offset IncreaseG46Tool Offset Decrease

G50.1Programmed Mirror Image CancelG51.1Programmed Mirror Image

OnG52Local Coordinate Setting G54 - G59Work Coordinate Registers 1

Thru 6G60Unidirectional Positioning

G61Exact Stop Check Mode

Page 12: CNC  Machine  Language

G65Macro Call (Non Modal)G66Macro Call (Modal)

G68Programmed Coordinate Rotation G69Coordinate Rotation Cancel

G73Fixed Cycle (Step) G74Fixed Cycle (Reverse Tapping)

G76Fixed Cycle (Fine Boring)G80Fixed Cycle Cancel

G81Fixed Cycle (Drilling / Spot Drilling)G82Fixed Cycle (Drilling / Counter Boring)

G83Fixed Cycle (Deep Hole Drilling)G84Fixed Cycle (Tapping)

G85Fixed Cycle (Boring)

Page 13: CNC  Machine  Language

G86Fixed Cycle (Boring) G87Fixed Cycle (Back Boring)

G88Fixed Cycle (Boring)G89Fixed Cycle (Boring)

G90Absolute Value Command G91Incremental Value Command

G92Work Offset Set

Page 14: CNC  Machine  Language

G107User macro 1 (sine) sinG108User macro 1 (cosine) cos

G109User macro 1 (arc tangent) tanG110User macro (square root)

G200User macro 1 (unconditional branch)G201User macro 1 (zero condition

branch)G202User macro (negative condition

branch)

Page 15: CNC  Machine  Language

Basic ISO CNC CodeM03, M04, M05 Spindle CW, Spindle

CCW, Spindle Stop M08, M09 Coolant/lubricant On,

Coolant/lubricant Off M02 Program Stop

M30 Program end, rewind M98 Subprogram call

M99 Return to call program

Page 16: CNC  Machine  Language

M00, M01 Program stop, optional stop G96, G97 Constant surface speed,

Constant Spindle speed G50 Maximum spindle speed

G95, G94 Feed mm per revolution, feed mm/min

G00, G01 rapid movement, Linear Interpolation (cutting in a straight line)

F Feed S Spindle Speed

Page 17: CNC  Machine  Language

Example

This is a generic program that demonstrates the use of G-Code to turn a 1" diameter X 1" long part. Assume that a bar of material is in the machine and that the bar is slightly oversized in length and diameter and that the bar protrudes by more than 1" from the face of the chuck. (Caution: This is generic, it might not work on any real machine! Pay particular attention to point 5 below.)

Page 18: CNC  Machine  Language

Line Code

N01 M216N02 G00 X20 Z20N03 G50 S2000N04 M01N05 T0303 M6N06 G96 S854 M42 M03 M08N07 G00 X1.1 Z1.1N08 G01 Z1.0 F.05

Page 19: CNC  Machine  Language

Line Code

N09 X0.0N10 G00 Z1.1N11 X1.0N12G01 Z0.0N13 M05 M09N14 G28 G91 X0N15 M215N16 M30

Page 20: CNC  Machine  Language

) ::مهندس كامپيوتري عددي كنترل ماشينهاي منابع( لطفي محسن

ماشينهاي جامع نويسي ) cncبرنامه مهندسبصارتي( سايت ™CNCezPROوب سايت Tesko laserوب

: تحصیلی سال لخون د بابک کننده 88-87ارائه

Email : [email protected]