Due to the processing characteristics of the CNC machining center, before writing the processing program, you must first pay attention to the application of the tool change program.
Different machining centers have different tool changing processes. Usually, tool selection and tool change can be performed separately. After the tool change is completed and the spindle is started, the machining content of the following block can be carried out. The tool selection action can coincide with the machining of the machine tool, that is, the cutting time is used to select the tool.
Most machining centers have a fixed position of the tool change point. Only when the moving parts move to this position can the tool change action be started.
The XH714 machining center is equipped with a disc-shaped tool magazine, which realizes tool change through the mutual movement of the spindle and the tool magazine. The tool change process is described by a subprogram, and the program number is usually O9000. The tool change subroutine is as follows:
- O9000
- N10 G90 //Select absolute method
- N20 G53 Z-124.8 //The spindle moves to the tool change point in the Z direction (ie corresponding to the tool magazine in the Z direction)
- N30 M06 //The tool magazine rotates until its empty tool position is aligned with the spindle, and the spindle stops exactly
- N40 M28 //The tool magazine moves forward so that the upper tool holder of the empty tool position clamps the upper tool holder of the spindle
- N50 M11 //Spindle loosening tool holder
- N60 G53 Z-9.3 //Spindle Z direction upwards, return to the set safe position (the spindle is separated from the tool holder)
- N70 M32 //Tool magazine rotation, select the tool to be replaced
- N80 G53 Z-124.8 //Spindle Z direction down to the tool change point position (the tool holder is inserted into the spindle hole)
- N90 M10 //Spindle clamping tool holder
- N100 M29 //The tool magazine moves backward
- N110 M99 //The tool change subroutine ends and returns to the main program.
It should be noted that, in order to prevent the tool change subroutine from being arbitrarily changed to ensure the safety of the tool change, the equipment manager can hide the program. When the tool needs to be changed in the processing program, call the O9000 subroutine. The calling program segment can be written as follows:
N~ T~ M98 P9000
Among them: after N is the program sequence number; after T is the tool number, generally 2 digits; M98 is calling the tool change subroutine; P9000 is the tool change subroutine number.
The programming method of the machining center is basically the same as that of the CNC milling machine, and the setting method of the machining coordinate system is also the same.