शुक्रवार, 17 मई 2019

Programming Systems | CNC programming Basics | G-Code | M-Code | Incremental and Absolute Programming System | Interpolation | Linear Interpolation | Circular Interpolation

Two types of programming modes, the incremental system and the absolute system, are used for CNC. Both systems have applications in CNC programming, and no system is either right or wrong all the time. Most controls on machine tools today are capable of handling either incremental or absolute programming.


Incremental program locations are always given as the distance and direction from the immediately preceding point

• A “X plus” (X+) command will cause the cutting tool to be located to the right of the last point.
• A “X minus” (X-) command will cause the cutting tool to be located to the left of the last point.
• A “Y plus” (Y+) command will cause the cutting tool to be located toward the column.
• A “Y minus” (Y-) will cause the cutting tool to be located away from the column.
• A “Z plus” (Z+) command will cause the cutting tool or spindle to move up or away from the workpiece.
• A “Z minus” (Z-) moves the cutting tool down or into the workpiece.
In incremental programming, the G91 command indicates to the computer and MCU (Machine Control Unit) that programming is in the incremental mode.
Absolute program locations are always given from a single fixed zero or origin point. The zero or origin point may be a position on the machine table, such as the corner of the worktable or at any specific point on the workpiece. In absolute dimensioning and programming, each point or location on the workpiece is given as a certain distance from the zero or reference point.

• A “X plus” (X+) command will cause the cutting tool to be located to the right of the zero or origin point.
• A “X minus” (X-) command will cause the cutting tool to be located to the left of the zero or origin point.
• A “Y plus” (Y+) command will cause the cutting tool to be located toward the column.
• A “Y minus” (Y-) command will cause the cutting tool to be located away from the column.
In absolute programming, the G90 command indicates to the computer and MCU that the programming is in the absolute mode.

Interpolation
The method by which contouring machine tools move from one programmed point to the next is called interpolation. This ability to merge individual axis points into a predefined tool path is built into most of today’s MCUs.
There are five methods of interpolation:
• linear
• circular
• helical
• parabolic
• cubic
All contouring controls provide linear interpolation, and most controls are capable of both
linear and circular interpolation. Helical, parabolic, and cubic interpolation are used by industries that manufacture parts which have complex shapes, such as aerospace parts and dies for car bodies.
Linear Interpolation
Linear Interpolation consists of any programmed points linked together by straight lines, whether the points are close together or far apart
Curves can be produced with linear interpolation by breaking them into short, straight-line segments. This method has limitations, because a very large number of points would have to be programmed to describe the curve in order to produce a contour shape. A contour programmed in linear interpolation requires the coordinate positions (XY positions in two-axis work) for the start and finish of each line segment. Therefore, the end point of one line or segment becomes the start point for the next segment, and so on, throughout the entire program.

Circular Interpolation
The development of MCUs capable of circular interpolation has greatly simplified the process of programming arcs and circles. To program an arc, the MCU requires only the coordinate positions (the XY axes) of the circle center, the radius of the circle, the start point and end point of the arc being cut, and the direction in which the arc is to be cut (clockwise or counterclockwise)
Codes:
The most common codes used when programming CNC machines tools are
• G-codes (preparatory functions), and
• M codes (miscellaneous functions).
Other codes such as F, S, D, and T are used for machine functions such as feed, speed, cutter diameter offset, tool number, etc.
G-Code
G-codes are sometimes called cycle codes because they refer to some action occurring on the X, Y, and/or Z axis of a machine tool.

Group Code Function
01 G00 Rapid Positioning
01 G01 Linear Interpolation
01 G02 Circular Interpolation clockwise (CW)
01 G03 Circular Interpolation Counter clockwise (CCW)
06 G20* Inch input (in.)
06 G21* Metric Input (mm)
G24 Radius Programming (**)
00 G28 Return to Reference Point
00 G29 Return from Reference Point
G32 Thread Cutting (**)
07 G40 Cutter Compensation Cancel
07 G41 Cutter Compensation Left
07 G42 Cutter Compensation Right
08 G43 Tool length compensation positive
08 G44 Tool length compensation minus
08 G49 Tool Length Compensation Cancel
G84 Canned Turning Cycle (**)
03 G90 Absolute Programming
03 G91 Incremental Programming
(*) – on some machines and controls, these may be G70 (inch) and G71 (metric)
(**) – refers only to CNC lathes and turning centers.
M-CODE:
M or miscellaneous codes are used to either turn ON or OFF different functions which control certain machine tool operations.

Code Function
M00 Program stop
M02 End of program
M03 Spindle start (forward CW)
M04 Spindle start (reverse CCW)
M05 Spindle stop
M06 Tool change
M08 Coolant on
M09 Coolant off
M10 Chuck – clamping (**)
M11 Chuck – unclamping (**)
M12 Tailstock spindle out (**)
M13 Tailstock spindle in (**)
M17 Tool post rotation normal (**)
M18 Tool post rotation reverse (**)
M30 End of tape and rewind
M98 Transfer

utkarsh-shukla.blogspot.com

कोई टिप्पणी नहीं:

एक टिप्पणी भेजें

thanks for visit my blog