Program structure The NC program consists of the program number, the program content, and the end of the program. E.g: (1) Program number The program number and address code are used to distinguish the programs in the memory. The program numbers and address codes of different CNC systems are different. For example, the Japanese FANUC6 CNC system uses o as the program number address code; the US AB8400 CNC system uses P as the program number address code; Germany's SMK8M CNC The system uses % as the program number address code. (2) Program content The program content part is the core of the whole program. It consists of several program segments. Each program segment consists of one or more instruction words. Each instruction word consists of an address character and a number, which represents a position or an action of the machine tool. The end of each block is marked with a ";". (3) End of program The program end instruction M02 or M30 is used as the symbol for the end of the entire program. 2. Block format Each block is composed of a block number, several commands (function words) and a block end symbol. N, G, X, Z, F are address codes, "-" is a symbol (negative sign) 64.0 is a data word N - the block address code, used to formulate the block number; G——Prepare the function address code, G01 is the linear interpolation command; X, Z - the coordinate axis address code, the data word following it indicates the distance the tool should move in the direction of the coordinate axis; F——feed speed address code, the data word after it indicates the tool feed speed value, and F100 indicates the feed speed is 100mm/min. ;——The block end code is equivalent to the meanings of “NLâ€, “LF†or “CRâ€, “*â€, etc. Different CNC systems have different block terminators. Table 1 Common block format Note: The instruction format of CNC machine tools has many standards in the world and is not completely consistent. With the development of CNC machine tools, continuous improvement and innovation, its system functions are more powerful and easy to use. There are certain differences in the program format between different CNC systems. Therefore, when programming a certain CNC machine, Carefully understand the programming format of the CNC system, refer to the CNC machine programming manual. Next page Medical Caster(Twin Wheel) Medical Caster(Twin Wheel) Medical Caster(Twin Wheel) Ningbo Mywin Caster Co., Ltd. , https://www.mywin-caster.com
Program Number: 001
Program content: N001 G92 X40.0 Y30.0;
N002 G90 G00 X28.0 T01 S800 M03 ;
N003 G01 X-8.0 Y8.0 F200 ;
N004 X0 Y0 ;
N005 X28.0 Y30.0;
N006 G00 X40.0 ;
End of program: N007 M02;