Share this

Key Points for Using Interrupt Instructions and Macro Program Insertion in the Mitsubishi M64 CNC System

2026-04-06 05:41:54 · · #1
This article, written by Huang Feng of the Wuhan Mitsubishi Industrial Control Technology Center, describes a method for using the interrupt function of the Mitsubishi M64 CNC system to achieve both rotational and positioning of an NC axis. It outlines the key points of PLC and machining program development, as well as precautions for parameter settings. Most shaft-type heat treatment machine tools require one axis holding the workpiece to rotate during heating and then be positioned at a specific location after heating for the next process. The author encountered this requirement from the manufacturer when applying the Mitsubishi M64 CNC system to a drum-type crankshaft heat treatment machine. Essentially, this requirement demands that the NC servo axis perform rotational movement in one segment and positioning movement in another. After analysis and experimentation, the author decided to use the interrupt instructions and macro program insertion function of the Mitsubishi M64 CNC system to achieve this. The Mitsubishi M64 CNC system's PLC interface includes an interrupt interface, Y22D. When Y22D is set to ON in the PLC program, the interrupt function becomes active. When the interrupt function is activated, the running machining program will immediately stop and switch to executing a pre-compiled "interrupt macro program". After the "interrupt macro program" finishes executing, the main machining program will continue to execute. As shown in Figure 1. [IMG=Figure 1 Interrupt Program Action]/uploadpic/THESIS/2007/11/20071114140049939510D.jpg[/IMG] Figure 1 Interrupt Program Action The main machining program I initially wrote for the roller-type crankshaft heat treatment machine tool is as follows: Program No.: 57710 N10M96P1000;—————— (Interrupt allowed. P1000 is the interrupt program number.) ……… N20G90G0X190. N30G90G1Y99999.F600 ―― (Y-axis rotation) N40G04X5; N50G91G1Y290.F1000;――― (Y-axis positioning) …………… N60M97――――― (End interrupt) M30 In the program segment “N30G90G1Y99999.F600” The Y-axis rotates. Since the Mitsubishi M64 CNC system specifies a maximum travel of 99999 mm for each axis, and the process requires a rotational speed of 60 RPM during heating, assuming a pitch of 10 mm, the specified operating speed is F600. If the specified travel is 99999 mm, the operating time is T = 99999/600 = 166.665 minutes. Since the heating time for each part of the workpiece is within 10 minutes, the setting "N30G90G1Y99999.F600" ensures that the Y-axis can rotate for heating. (The author ran the following programs on the system: “N30G90G1Y99999.F600 “N40G90G1Y99999.F600 “N50G90G1Y99999.F600 “N60G90G1Y99999.F600 “N70G90G1Y99999.F600”. Even after exceeding the maximum stroke, the NC axis can still continue to run, but the position coordinates are no longer displayed on the screen.) Figure 2 When the heating process is completed, the heating process completion signal drives the interrupt interface Y22D in the PLC program. When Y22D is driven, the currently executing program segment “N30G90G1Y99999.F600” immediately ends and enters the interrupt program. When Y22D is activated, whether to immediately terminate the current program segment and jump to the interrupt routine, or to complete the current program segment and then jump to the interrupt routine, can be selected via parameters. Setting #1113 = 0 immediately terminates the current program segment and jumps to the interrupt routine. Setting #1113 = 1 completes the current program segment and then jumps to the interrupt routine. Another interrupt-related parameter is #1112, which determines whether the interrupt routine executes once or repeatedly when Y22D is ON. For example, in program 57710, when #1112 = 0, upon encountering the rising edge of Y22D from OFF to ON, the interrupt routine specified by M96 (program number 1000 in this example) is executed immediately, and only once. When #1112 = 1... If Y22D = ON and remains ON, the interrupt routine specified by M96 (program number 1000 in this example) will be repeatedly executed until Y22D = OFF. After executing the current interrupt routine, it returns to the main program segment specified by the interrupt routine. Another parameter related to interrupts is #1229. When the BIT0 bit of #1229 is set to 0, the interrupt routine is a macro program type, the same as calling a macro program with G65. When the BIT0 bit of #1229 is set to 1, the interrupt routine is a subroutine type, the same as calling a subroutine with M98. M96 and M97 are special M instructions specified by Mitsubishi NC. M96 enables "interrupt macro program insertion," while M97 disables it. This means that "interrupt macro program insertion" is effective within the machining program segment specified by M96 and M97. Taking program 57710 as an example: it is effective within program segments N10... to N60. In developing actual machining programs, to ensure program safety, the effective interruption range must be strictly limited. Taking program 57710 as an example: the machining process requires that interruptions are only allowed during the rotary heating process (N30G90G1Y99999.F600, Y-axis heating rotation). Even if an interrupt command signal (Y22D=ON) appears in other machining program segments, the interrupt program will not be executed. Therefore, program 57710 should be modified as follows: Program 57720 ……… N20G90G0X190. N25M96P1000;—————— (Interruption allowed. P1000 is the interrupt program number.) N30G90G1Y99999.F600 ―― (Y-axis heating rotation) N35M97――――― (End interrupt) N40G04X5; N50G91G1Y290.F1000;――― (Y-axis positioning) …………… The actual machining program for M30 is written in this way. (Proceedings of the 2nd and 3rd Servo and Motion Control Forums)
Read next

CATDOLL Katya Hybrid Silicone Head

The hybrid silicone head is crafted using a soft silicone base combined with a reinforced scalp section, allowing durab...

Articles 2026-02-22