H is the compensation number, similar to radius compensation, the tool length value is stored in the address specified after H.
When performing length compensation, the tool must move on the z-axis: the actual position of the tool under different commands, among which the "G90 G54(XIZ0;" statement will cause a serious accident if there is no G43 command under the condition of length compensation. In general programs The program word during compilation is a constant, and a program can only describe one geometric shape, so it lacks flexibility and versatility. In some cases, the machine tool needs to act according to certain rules, such as in the drilling cycle, the user should be able to determine the cutting parameters according to the situation. It is required that the general program cannot be achieved. When the automatic measurement is performed, the human or the machine tool must process the measurement data. These data are stored in the variable, and the general program cannot be processed. In response to this situation, the CNC machine tool provides another programming method, namely Macro programming.
Variables are used in the program, and the function of the program is achieved by assigning and processing the variables. This kind of program with variables is called a macro program. Macro program format The macro program format is the same as the subprogram, and M99 is used at the end to return to the main program.
