CNC Machining Programming Skills
Folding Program Structure
A program segment is a continuous group of words that can be processed as a unit, and it is actually a section of a program in a CNC machining program. The main body of the part processing program is composed of several program segments. Most program segments are used to instruct the machine tool to complete or execute a certain action. The block is composed of size words, non-size words and block end instructions. When writing and printing, each block generally occupies one line, and the same is true when the program is displayed on the screen.
Folding Program Format
The conventional processing program is composed of start character (single row), program name (single row), program body and program end instruction (generally single row). There is a program end character at the end of the program. The program start character and the program end character are the same character:% in ISO code, ER in EIA code. The program end instruction can be M02 (program end) or M30 (paper tape end). Nowadays CNC machine tools generally use stored programs to run. At this time, the common point of M02 and M30 is: After completing all other instructions in the program segment, it is used to stop the spindle, coolant and feed, and reset the control system.
M02 and M30 are completely equivalent when used on some machine tools (systems), but the following differences are used on other machine tools (systems): When the program is ended with M02, the cursor stops at the end of the program after the automatic operation ends; and When using M3O to end the program operation, the cursor and screen display can automatically return to the beginning of the program after the automatic operation ends, and the program can be run again by pressing the start button. Although M02 and M30 are allowed to share a block with other program words, it is better to list them in a single block, or share a block with the sequence number only.
The program name is located before the main body of the program and after the start of the program, and it usually occupies a line on its own. The program name has two forms: one is composed of a prescribed English character (usually O), followed by a number of digits. The maximum allowable number of digits is stipulated by the manual, and the two common ones are two digits and four digits. This form of program name can also be called a program number. Another form is that the program name is composed of English characters, numbers or a mixture of English and numbers, and a "-" sign can be added in the middle.
This form allows users to name the program more flexibly. For example, the program for the third process of machining the flange with the part drawing number 215 on the LC30 CNC lathe can be named LC30-FIANGE-215-3, which can be used and stored And retrieval, etc. bring great convenience. The form of the program name is determined by the CNC system.