Coordinate setting and subroutine calling of machining center
this paper analyzes the application of coordinate setting and subroutine of machining center through examples, and explains the method of combining automatic programming with manual programming, using G92 position setting function and subroutine calling to simplify programming and optimize program. In practical work, changing the performance index of the spring of the car seat mainly includes changing the stiffness and fatigue life to get twice the result with half the effort
with the rapid development of numerical control technology and the wide application of cad/cam technology, numerical control machining increasingly depends on automatic programming of software, and manual programming is gradually in a secondary position. However, in actual processing, if automatic programming is combined with manual programming, and G92 position setting function is combined with subroutine call, programming can be simplified and the program can be optimized, which is conducive to program modification and repeated call
the following takes the American sabre-1000 acramatic 850sx system vertical machining center machine tool as an example to discuss the coordinate setting (position setting) and subroutine call
the coordinate system of the machine tool is the inherent coordinate system of the machine tool, which is set by the machine tool manufacturer. The workpiece coordinate system is the coordinate system determined by the programmer according to a fixed point on the part drawing as the origin when preparing the machining program. The unification between the two coordinate systems is achieved by preparing the position setting function of function code G92
g92 position setting function allows operators or programmers to assign new coordinate values to the current coordinate axis without the workbench moving. G92 offsets the machine coordinate system to match the coordinate value of the workpiece coordinate system in the NC program
the workpiece origin (zero point of NC program) is located by the operator during the installation of the workpiece. When programming, programmers can use the origin offset function of the NC system to compensate the clamping error of the workpiece through the origin offset of the workpiece, regardless of the physical position and installation accuracy of the workpiece installed on the machine tool. Input the offset value into the numerical control device before processing, and the offset value can be automatically added to the workpiece coordinate system during processing, so that the numerical control system can process according to the coordinate value of the workpiece determined by the machine tool coordinate to speed up the lack of competitive capacity exit system. However, it will be more convenient to program G92 directly instead of inputting the offset value into the numerical control device
as shown in Figure 1, the mold has six identical cores. If only automatic programming is used instead of manual programming, each core needs to be completely drawn and programmed. The workload is large, the amount of programs is larger, and it is not convenient to check the program
if you combine manual programming with automatic programming and use cad/cam software to program automatically, you only need to draw a core and generate a program for processing a core. Then, according to the position relationship between the cores, through G92 setting and subroutine call, a concise and clear program can be obtained. Moreover, if the tool has been worn in the process of processing, after changing the tool, it is also convenient to modify the program and continue the processing of the next core
:g71g90 ":" is the program start identifier
t16m6. Install the tool on the 16th tool position
g00x519.8y254.4z77.929. The workpiece center position in the machine coordinate system (also the workpiece origin of core 1)
(CLS, L10) calls the subroutine for processing a core
g00x664.8y254.4z77.929 to reach the workpiece origin position of core 2 in the machine coordinate system
(CLS, L10)the Call the same subroutine
g00x809.8y254.4z77.929 to reach the workpiece origin position of medium core 3 in the machine coordinate system
(CLS, L10)
g00x809.8y484.4z77.929 to reach the workpiece origin position of medium core 4 in the machine coordinate system
(CLS, L10)
g00x664.8y484.4z77.929 to reach the workpiece origin position of medium core 5 in the machine coordinate system
(CLS, L10)
g00x519.8y484.4z77.929 arrive at the workpiece origin position of core 6 in the machine coordinate system
(CLS, L10)
(DFS, L10) define the subroutine for machining a core
g92x0y0z0 assign the current coordinate axis in front of the subroutine to a new coordinate value (0, 0, 0)
g01x-145 Y-115. M03s350m08f2000
z-38f100
... Procedure for processing a core
y-115
g00z100 quickly lift the spindle to the position where Z is 100 in the workpiece coordinate system
x0y0 return to the zero point of the X-Y plane of the workpiece coordinate system
g99 cancel the G92 position setting, and let the workpiece coordinate system return to the machine coordinate system
(ENS) subroutine end
m30 program end
in actual work, the Z direction of the workpiece coordinate system takes the workpiece surface (even lower than the workpiece surface) as the zero point. If the tool really reaches the workpiece origin, it is bound to collide with the workpiece. In order to improve safety, when the tool accurately reaches the workpiece origin, the tool does not really contact the workpiece. The Z value of the workpiece origin in the machine coordinate system should be raised by a certain distance (such as distance a). Accordingly, when setting the Z height value in G92, the Z value also adds the same distance a
G00X__ Y__ Z__+ A
g92x0y0z0+a
for example, set the program for the following G92:
g00x519.8y254.4z77.929
g92x0y0z0
if the tool is raised by 100mm, it can be changed to:
g00x519.8y254.4z77.929+100
g92x0y0z0+100
the end face of the tool is 100mm high from the surface of the workpiece, and the workpiece origin is actually still unchanged on the workpiece surface. In this way, it is much safer and more flexible in the process of program processing
if we need to debug the program after clamping the workpiece, we must raise the tool to run away from the workpiece surface. At this time, we only need to subtract a from the Z value in G92 (a is the height value required to be raised in the Z direction), so that the distance between the end face of the tool and the workpiece surface (workpiece origin) is a distance higher
in the process of machining, it is necessary to temporarily increase the depth. At this time, it is only necessary to add a to the Z value in G92 (a is the depth value required to decline in the Z direction), so that the distance between the tool end face and the workpiece surface (workpiece origin) is a distance lower
in this way, the goal can be achieved quickly and safely by changing the setting of Z coordinate in G92 without changing other parts of the program
G00X__ Y__ Z__
g92x0y0z0+a (or g92x0y aims at supplying 0z0-a of high-end aluminum profile products in the fields of automobile, aerospace, consumer electronics, power equipment, rail transit equipment, etc.)
for example:
for the following procedure, it is required to decrease the Z direction by 5mm:
g00x519.8y254.4z77.929+100
g92x0y0z0 + 100
can be changed to:
g00x519.8y254.4z77.929 + 100
g92x0y0z0 + 100 + 5
if the Z value of the workpiece origin in the machine coordinate system is added with a, and G92 if the Z value in the program section remains unchanged, the distance a between the tool end face and the workpiece surface (workpiece origin) can also be increased. Alternatively, subtract a from the Z value of the workpiece origin in the machine coordinate system, and keep the Z value in the G92 program section unchanged, so that the distance between the tool end face and the workpiece surface (workpiece origin) is reduced by a distance. The effect is the same as changing the setting of Z coordinate in G92
G00X__ Y__ Z__- A (or g00x_y_z_ _ +a)
g92x0y0z0
for example, for the following procedure, the Z direction is required to drop 5mm:
g00x519.8y254.4z77.929
g92x0y0z0
it can be changed to:
g00x519.8y254.4z77.929+
g92x0y0z0+100
using the above principle, when grinding the workpiece with the machine tool of the machining center, due to the large loss of the grinding wheel, the grinding wheel needs to be polished once (the Z value must be reduced), If you program separately, you need to change the program repeatedly during processing, which is very inconvenient. The following example program can easily call the grinding wheel grinding program through the setting of G92, and conveniently modify the program in the processing process to carry out grinding wheel grinding and workpiece grinding, so as to improve the processing efficiency
:g71
t12m6
g00x541.52y254.8z170+100s3000m03m08 reach the workpiece origin position in the machine coordinate system
x60.0y302.3 the position of the grinding wheel origin in the machine coordinate system (in the X-Y plane)
z167.0+100f50 the position of the grinding wheel Z direction zero point in the machine coordinate system, By changing this value, you can repair the grinding wheel
(CLS, L10) call the grinding wheel repair subroutine
g92x0y0z0+100, and assign a new coordinate value to the current coordinate axis (0, 0, 1 plastic packaging materials for food need to be vigilant against colorant discoloration 00)
g01x43.677y4f2000s5000
z79.4f1000
z73.5f100 Z value in the workpiece coordinate system, Modify
... Grinding workpiece program
g00z150 corresponding to the height lowered during grinding of the grinding wheel. Quickly lift the spindle to the position where Z is 150 in the workpiece coordinate system
x0y0
g99. Cancel the position setting and let the workpiece coordinate system return to the machine coordinate system
(DFS, L10) define the grinding wheel program
g92x0y0z0+100 will be in front of the subroutine, The current position of the axis is set to (0, 0100)
g01x10z-10f100
x0z0
g99 cancel the position setting, Let the workpiece coordinate system of the grinding wheel return to the machine coordinate system
g00z270 quickly lift the spindle to the position where Z is 270 in the machine coordinate system
x541.52y254.8 the workpiece center position in the machine coordinate system
(ENS) the end of the grinding wheel grinding subroutine
m30
when setting the position of G92, it should be noted that when G92 is included in the program, if G92 position setting is no longer required, Be sure to use the position setting cancellation command (such as G99, different machine tools have different commands), otherwise the workpiece, tool, machine tool may be damaged or even personal injury accidents may occur. (end)
LINK
Copyright © 2011 JIN SHI