Coordinate setting and subroutine call of machining center

This article through the example, analyzed the machining center machine tool coordinate setting and the subroutine application problem, explained the automatic programming and the manual programming combination, used the G92 position setting function and the subroutine call cooperation, simplified the programming, the optimization procedure method. In practical work, you should get more effective.

With the rapid development of numerical control technology and the extensive application of CAD/CAM technology, numerical control processing increasingly depends on the automatic programming of software, and manual programming is gradually in a secondary position. However, if the combination of automatic programming and manual programming is used in actual machining, the use of the G92 position setting function and the subroutine call will be able to simplify the programming, optimize the program, and facilitate the modification and repeated calling of the program.

The following takes the example of the vertical machining center of SABRE-1000 Acramatic 850SX system in the United States and discusses the problems of coordinate setting (position setting) and subprogram calling.

The machine coordinate system is a machine-specific coordinate system that is set by the machine manufacturer. Workpiece coordinate system is a coordinate system determined by the programmer according to a fixed point on the part drawing when programming the machining program. The unification between the two coordinate systems is achieved by preparing the position setting function of the function code G92.

The G92 position setting function allows the operator or programmer to assign new coordinate values ​​to the current axis and the table does not move. 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 the NC program) is located by the operator during the installation of the workpiece. The programmer can program the program without regard to the physical position and installation accuracy of the workpiece mounted on the machine tool, and use the origin offset function of the numerical control system to compensate the workpiece clamping error by offsetting the origin of the workpiece. The offset value is input to 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 performs processing according to the coordinate value of the workpiece determined by the machine coordinate system. However, it would be more convenient if the G92 were programmed directly into the program without using the method of inputting the offset value to the numerical control device.

For example, a mold has six identical cores. If only automatic programming is used without manual editing, each core needs to be completely drawn and programmed. The workload is large, the program size is larger, and it is not easy to check. program.

If manual programming is combined with automatic programming, and CAD/CAM software is used for automatic programming, only one core needs to be drawn to create a program for processing one core. Then according to the positional relationship between the cores, through the G92 setting and subroutine call, you can get a simple and clear program. Moreover, if the tool is worn during the machining process, after the tool is changed, the program can be easily modified to continue the machining of the next core.

:G71G90 ":" is the program start identifier
T16M6 Tool for No. 16 Location
G00X519.8Y254.4Z77.929 The center position of the workpiece in the machine coordinate system (also the workpiece origin of core 1)
(CLS,L10) Call a subroutine to process a core
G00X664.8Y254.4Z77.929 Workpiece origin position of core 2 reached in machine coordinate system
(CLS,L10) calls the same subroutine
G00X809.8Y254.4Z77.929 Workpiece origin position of core 3 in the machine coordinate system
(CLS, L10)
G00X809.8Y484.4Z77.929 Workpiece origin position of core 4 in the machine coordinate system
(CLS, L10)
G00X664.8Y484.4Z77.929 Workpiece origin position (CLS, L10) of core 5 reached in the machine coordinate system
G00X519.8Y484.4Z77.929 Workpiece origin position of core 6 reached in machine coordinate system
(CLS, L10)
(DFS,L10) Define a subroutine to process a core
G92X0Y0Z0 Assigns the current coordinate axis to the new coordinate value (0,0,0) in front of the subroutine
G01X-145.Y-115.M03S350M08F2000
Z-38F100
. . . . . . Processing a core program
Y-115.
G00Z100 Raise the spindle quickly to the position where Z is 100 in the workpiece coordinate system
X0Y0 Back to workpiece coordinate system XY plane zero point
G99 cancels the G92 position setting and returns the workpiece coordinate system to the machine coordinate system
(ENS) End of subroutine
In the actual work of the M30 program, the Z coordinate of the workpiece coordinate system is the zero point on the workpiece surface (even lower than the workpiece surface). If you really let the tool reach the origin of the workpiece, it is bound to collide with the workpiece. In order to improve safety, when the tool is accurately reached the workpiece origin, the tool does not actually touch the workpiece. The Z value of the workpiece origin in the machine coordinate system should be raised by a certain distance (such as the distance a), and correspondingly, in the G92 When setting the Z height value, 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
Such as: raise the tool 100mm, can be changed into:
G00X519.8Y254.4Z77.929+100
G92X0Y0Z0+100

The end face of the tool is 100mm higher than the surface of the workpiece, and the origin of the workpiece is still virtually unchanged on the surface of the workpiece. In this way, it is safer and more flexible during program processing.

If you need to debug the program after clamping the workpiece, we must raise the tool away from the surface of the workpiece. In this case, you only need to subtract the value of Z from G92 in G92 (a height value required to raise the Z direction). The end surface is a distance higher than the workpiece surface (workpiece origin).

During the machining process, it is necessary to increase the depth temporarily. In this case, it is only necessary to add Z to the value of Z in G92 (a is the depth required to decrease in Z direction), so that the tool end face is lower than the workpiece surface (workpiece origin). distance.

This way, you can quickly and safely achieve the goal by simply changing the Z coordinate settings in G92 without changing the rest of the program.

G00X__Y__Z__
G92X0Y0Z0+a (or G92X0Y0Z0-a)
E.g:
Reduce the Z direction by 5mm for the following procedure:
G00X519.8Y254.4Z77.929+100
G92X0Y0Z0+100
Can be changed to:
G00X519.8Y254.4Z77.929+100
G92X0Y0Z0+100+5

If you add a to the Z value of the workpiece origin in the machine coordinate system, and the Z value in the G92 block does not change, the tool face can also be increased by a distance from the workpiece surface (workpiece origin). Or, subtract a from the Z value of the workpiece origin in the machine coordinate system, and the Z value in the G92 program segment does not change the tool end face by a distance from the workpiece surface (workpiece origin). The effect is the same as changing the Z coordinate setting in G92.

G00X__Y__Z__-a (or G00X__Y__Z__+a)
G92X0Y0Z0
For example, the following procedure requires a 5mm drop in the Z direction:
G00X519.8Y254.4Z77.929
G92X0Y0Z0
Can be changed to:
G00X519.8Y254.4Z77.929+100-5
G92X0Y0Z0+100

Using the above principle, when using the machining center machine to sharpen the workpiece, due to the large loss of the grinding wheel, a grinding process needs to be performed to grind the primary grinding wheel (the value of Z must be reduced). If programming separately, the process needs to be changed repeatedly. Very inconvenient. The following example program can be easily achieved through the G92 settings, call the grinding wheel grinding program, in the course of the process to easily modify the program, grinding wheel grinding and grinding of the workpiece, in order to improve processing efficiency.

:G71
T12M6
G00X541.52Y254.8Z170+100S3000M03M08 The workpiece origin position reached in the machine coordinate system
X60.0Y302.3 The origin of the grinding wheel in the machine coordinate system (in the X-Y plane)
Z167.0+100F50 The position of the zero point in the Z direction of the grinding wheel in the machine coordinate system. Changing this value can dress the grinding wheel.
(CLS,L10) Calling grinding wheel subroutine
G92X0Y0Z0+100 New coordinate value assigned to the current axis (0,0,100)
G01X43.677Y4F2000S5000
Z79.4F1000
Z73.5F100 The Z value in the workpiece coordinate system is modified corresponding to the height of the grinding wheel during grinding. . . . . . Grinding the workpiece program
G00Z150 Raise the spindle to position 150 in the workpiece coordinate system quickly
X0Y0
G99 Cancels the position setting and returns the workpiece coordinate system to the machine coordinate system
(DFS,L10) Definition of a grinding wheel program
G92X0Y0Z0+100 Sets the current position of the axis in front of the subroutine to (0,0,100)
G01X10Z-10F100
X0Z0
G99 cancels the position setting and returns the workpiece coordinate system of the grinding wheel to the machine coordinate system
G00Z270 Raise the spindle quickly to the position where the Z is 270 in the machine coordinate system
X541.52Y254.8 Workpiece center position in machine coordinate system
(ENS) End of grinding wheel dressing procedure
M30

When setting the position of G92, please note: When G92 is included in the program, if G92 position setting is no longer needed, you must use the position setting cancel instruction (such as G99, different machine tools have different instructions), otherwise it may cause artifacts. , tools, machine tools are damaged or even cause personal injury accidents.


7x7 Stainless Steel Wire Rope

Adjustable Wire Rope,Twisted Steel Cable ,Non Spin Wire Rope,6Mm Galvanised Wire

Xinghua City Tianli Stainless Steel Products Co., Ltd. , https://www.tlsteels.com