Joke Collection Website - Mood Talk - Who can briefly talk about NC programming?

Who can briefly talk about NC programming?

Basic concepts of NC programming

NC programming is the main content in the preparation stage of NC machining, which usually includes analyzing parts drawings and determining machining technology. Calculating the tool path to obtain the tool position data; Write NC machining program; Manufacturing a control medium; Proofreading procedure and first article trial cutting. There are two methods: manual programming and automatic programming. In short, it is the whole process from part drawing to obtaining NC machining program.

NC programming is divided into manual programming and automatic programming. Manual programming means that all stages of programming are done manually. For parts with complex geometric shapes, it is necessary to write the source program of the parts in the specified NC language, and then generate the machining program after machining, which is called automatic programming.

With the development of numerical control technology, advanced numerical control system not only provides general preparation function and auxiliary function for user programming, but also provides a means to expand numerical control function for programming. The parameter programming of FANUC 6M CNC system is flexible and free in form. It has expressions, logical operations and program flow similar to computer high-level language, which makes the processing program concise and easy to understand, and realizes functions that are difficult to realize in ordinary programming.

Numerical control programming and computer programming have their own "language", but there is one thing that is different. Now computers have developed to occupy the global market with Microsoft's Windows as the absolute advantage. CNC machine tools are different, and have not developed to the point where they can be used with each other. In other words, their numerical control systems are not compatible with each other for the time being because of the hardware gap. Then, when I want to process a blank, what should I use first on our existing CNC machine tools?

Although the programming language of each CNC system is different, there are many similarities.

I. G code (preparation function)

1. 1 mechanical coordinate system and mechanical coordinate punctuation settings

CNC Lathe Huazhong Century Star Funak Siemens

The workpiece coordinate system is set to G50.

The fastest mobile G00 G00

1. 1 General machining (linear interpolation, circular interpolation, thread turning)

CNC Lathe Huazhong Century Star Funak Siemens

Linear interpolation G0 1 G0 1

Circular interpolation G02/G03 G02/G03

Thread G32

1.2 fixed period or compound period

CNC Lathe Huazhong Century Star Funak Siemens

G7 1 Cylindrical Rotating Pin Fixed Cycle

End rotating pin fixing cycle G90

Fixed period of threaded rotating pin

1.3 calling macro program

CNC Lathe Huazhong Century Star Funak Siemens

Two. M code (auxiliary function)

2. 1 Spindle forward, reverse and stop

CNC Lathe Huazhong Century Star Funak Siemens

Transverse axis z

Multi-axis x

The spindle rotates forward M3.

Spindle reversal M4

Spindle stop M5

2.2 Coolant switch

CNC Lathe Huazhong Century Star Funak Siemens

Coolant on M7

Coolant off M8

2.3 Call subroutine

M98 call subroutine

M99 subroutine ends

CNC Lathe Huazhong Century Star Funak Siemens

Cutter groove G75

Feed rate r

Cutting speed f

Three. Settings of f, s, t and t