8
M30
;
"□□□" means times of calling subprogram, "OOOO" means program number. Subprogram is called only one
time when you do not rule times. The subprogram which is called by main program is the first subprogram. The
structure is as follows.
Fig.2-1
2.6 End of Program
If system detects the end of the program code: M02, M30 or M99, program will over in the process of
running program.
If M02 code, the program ends but not return to the beginning. If M30, the program will return the beginning
(automatic mode).
If M99, M02 and M30 are at the end of the subprogram, system will returned to the program which calls
subprogram and continue running the next block. If at the end of the subroutine, system will returned to the
calling subprogram in the program.
In order to meet the requirements of processing, we can inserts pause in the block. When running M00 code,
program will pause, and press cycle start to continue the next line. M01 for selecting stop, the function the same
as the M00, but only M01 is effective when the switch on the operation panel is fully open.
3 Programming Basics
3.1 Control Shaft
3.1.1 Number of Control Shaft
Table 3-1 Axis Milling Machine Control System
Basic controlled axes
3-axis
(
X
、
Y
、
Z
)
Substantially simultaneously controlled axes
6-axis
(
X
、
Y
、
Z
)
3.1.2 Axis Name
Name three basic axes X, Y, and Z. Provisions parallel to the spindle (transfer cutting forces) of the tool axis
as the Z axis motion, take the tool away from the workpiece in the direction is positive (+ Z). X-axis is horizontal
and perpendicular to the Z axis and parallel to the clamping surface of the workpiece. When the Z-axis is
horizontal, the workpiece viewed in the direction along the rear end of the tool spindle, the right direction is
positive X's. The positive direction of the tool relative to the workpiece movement is concerned. In determining
the X, Z-axis positive direction, the right-handed rectangular Cartesian coordinate system can determine the
positive direction of Y-axis, That is in the ZX plane, from the + Z to + X, the right screw should move forward
along the + Y direction. Right-handed Cartesian coordinate system shown in Fig. 3-1: