GlossaryKind of term: Manufacturing termNC program
What is an NC program?
An NC program is the set of instructions a CNC machine's control executes: axis moves, feed, spindle speed, tool changes and auxiliary functions.
The control runs the file block by block; each block states which axis moves to which position, at what feed and spindle speed, with which tool, and when spindle, coolant and other auxiliary functions switch on or off. The program usually consists of G and M codes and is often generated from CAM through a postprocessor. It can also be written by hand, or entered at the machine in the control's conversational language.
What does the standard say about the NC program?
The basic structure with address words such as G, M, F, S and T is set out in ISO 6983-1; in German-language documentation the same base appears as DIN 66025. Control manufacturers extend that base with their own cycles, parameters and syntax, and the meaning of some codes differs per control and per machine configuration. In practice a program is therefore tied to one control and often to one machine. ISO 14649 (STEP-NC) describes an alternative that records operations rather than axis moves; it is rare in everyday shop practice.
How does the NC program work in practice?
When you quote, there is usually no program yet, and machining time is an estimate from the process plan. Once the program exists, CAM or the control's simulation gives a calculated run time; it often leaves out acceleration, tool changes, probing or override, and remains a prediction. Only the time the machine records while running is a measurement. How many programs a part has varies: one per setup, one main program with subprograms, one program for main and sub-spindle, or on a multi-channel machine one program per channel, synchronised with each other. When a repeat order moves to another machine, the program usually has to be posted again and proved out again.
What is the NC program often confused with?
An NC program is not the CAM project: CAM is where the paths are made, the NC program is the output for one control. Nor is a program's calculated run time the actual cycle time; that only comes from the machine.
Frequently asked questions
Can the run time from the NC program go into the quote as cycle time?
Not as it stands. A calculated run time often misses probing, tool changes, acceleration, and loading and unloading; add what is missing. Record in the estimate whether a time is estimated, calculated from the program or measured.
My repeat order is moving to another machine. Can the program go with it?
The paths in CAM can; the code usually cannot as it stands. A different control or machine configuration needs a different postprocessor and a new first piece. That programming and setup time belongs in the estimate for that order.
What is the difference between G-code and a conversational program?
G-code describes moves and functions with address words to ISO 6983-1, extended per control. A conversational program is entered at the machine through input screens and fixed cycles per feature, and the control generates the moves. Both are NC programs.