CNC Programming 

30.08.22 12:54 PM By Sumit Kumar

In a previous blog we discussed some applications of CNC and DNC. Now in this blog we will discuss programming which we used in the CNC.Manufacturers use CNC programming (Computer Numerical Drive Programming) to develop computer programme instructions that control machine tools.The programme refers to a set of instructions sent to the CNC to operate the machine. In simple terms When a computer is attached to a mill along with electrical drives and sensors for a full system, CNC programmers generate instructions for the CNC machines. The axis of the machine is moved by this computer.


A program is a set of commands that is given to the CNC to operate the machine. A CAD file generally contains information about the geometry, motion statements for moving the cutting tool, feeding speed, and auxiliary functions such as coolant on/off and spindle direction. These machines are controlled by CNC programmers who create the instructions for a computer, electrical drives, and sensors attached to the mill. This computer controls the motion of the machine axis.

Structure of CNC programs

There are four basic terms used in CNC programming:

  • Character: Character is the smallest unit of a CNC program. It can have Digit/ letter/ Symbol

  • Word: Word is a combination of alphanumeric characters. This creates a single instruction to the CNC machine. Each word begin with a capital letter followed by a numeral. These are used to represent axes positions, federate, speed, preparatory commands, and miscellaneous functions.

  • Block: A program block may contain multiple words, sequenced in a logical order of processing.

  • Program: The Program comprises multiple lines instructions, blocks‟which will be executed by the machine control unit (MCU).


Fixed Zero

 There is always an origin on the M/C table (usually in the southwest corner/lower left-hand corner), and all tool locations are defined based on this origin.

Floating Zero

  • Nowadays, CNC machines are very common.

  • M/C table zero point can be set at any convenient position by the operator.

  • A coordinate system is aware of a work coordinate system (WCS).

Modal and Non modal commands

  • NC commands may remain in effect indefinitely (until explicitly cancelled or changed by another command), or they may be only effective one time.

  • These are referred to as Model commands. A few examples are the selection of feed rate and the selection of coolant.

  • Non-modal commands are those that are effective only when sent and whose effects are lost with subsequent commands.

  • Non-modal commands include dwell commands, which instruct a tool to remain in a particular configuration for a given period of time.

Structure of an NC part program

  • The NC part program consists of serial commands that are input to the MCU.

  • The MCU interprets these commands and generates the necessary signals to each of the drive units of the machine to accomplish the required action.

  • The NC software must adhere to a specified syntax and have a specific structure that the controller can understand.

  • Commands are inputs into the controller in units called blocks or statements.

  • Each block is made up of one or more machine commands.

  • A block of information is used for each operation since, generally speaking, multiple commands are put together to complete a particular machining operation.

  • Each command provides a particular piece of control information, like a dimension or feed rate. A word is another name for each command found within a block.

  • The way in which words are arranged within the block is called block format.

  • Three different block formats are commonly used ( Fixed sequential format, Tab sequential format and Word address format).


Each element of an NC programme is identified by a sequence number, which also offers a way to quickly retrieve NC commands. The number is the programme line. Each block's number should be increased by 5 to 10 to allow for the possibility of future adjustments requiring the addition of more blocks.


Preparatory Word, used as a communication device to prepare the MCU . The G-code indicates that a given control function such as G01, linear interpolation, is to be requested.


These give the coordinate positions of the tool.


Feed code. The F-Code specifies the feed in the machining operation.


Spindle speed. The S code specifies the cutting speed of the machining process.


 Tool selection. The T code specifies which tool is to be used in a specific operation.



Miscellaneous function. The M code is used to designate a particular mode of operation for the NC machine tool.


They specify the centre of arc coordinates from starting.


As I previously mentioned, CNC machines make our work easy. You can perform several tasks with the help of CNC like: mills, drills, boring machines, punch presses.  As a mechanical engineer If you want your work to be easy. I would prefer you to learn  CNC programming. CNC Programmers are in great demand since they are generally employed in almost every industry related to manufacturing. They improve automation and flexibility .If you want to learn more about CNC .Abhyaz offers training on CNC which will help you in your job. Abhyaz offers a skill development program as well as an internship program where you can obtain more hands-on experience.


Q1.What is the main importance of CNC?

Ans. One of the finest ways to ensure that communications equipment is made precisely is through CNC machining.

Q2. Is CNC operator a good career?

Ans. Employers are seeking additional machinists with experience in CNC machining as technology advances in the manufacturing sector. It is obvious that CNC machining is a terrific career due to the rising demand and the rewarding role.

Q3.What is  NC- code?

Ans. It is a sequence code.

Q4. Does the Abhyaz platform provide training for digital manufacturing tools?

Ans. Yes, Abhyaz provides training as well as internships to obtain more

experience.To join as an intern visit and you can apply there.