Bird
0
0
CNC Programmingscripting~10 mins

Tool numbering and selection (T word) in CNC Programming - Step-by-Step Execution

Choose your learning style9 modes available
Concept Flow - Tool numbering and selection (T word)
Start Program
Select Tool Number (T#)
Call Tool Change Command (M6)
Wait for Tool Change Completion
Execute Machining with Selected Tool
End Program
The CNC program starts by selecting a tool number using the T word, then calls the tool change command M6, waits for the tool to change, and proceeds with machining using the selected tool.
Execution Sample
CNC Programming
N10 T02 M06
N20 G00 X0 Y0
N30 M03 S1500
N40 G01 X50 Y50 F100
N50 M05
N60 M30
This CNC code selects tool 2, changes to it, moves to start position, starts spindle, cuts a line, stops spindle, and ends the program.
Execution Table
StepCode LineActionTool SelectedSpindle StatusPositionOutput
1N10 T02 M06Select tool 2 and execute tool change2Off(0,0)Tool 2 loaded
2N20 G00 X0 Y0Rapid move to X0 Y02Off(0,0)Position set
3N30 M03 S1500Start spindle at 1500 RPM2On(0,0)Spindle running
4N40 G01 X50 Y50 F100Linear cut to X50 Y50 at feed 1002On(50,50)Cutting path
5N50 M05Stop spindle2Off(50,50)Spindle stopped
6N60 M30End program2Off(50,50)Program ended
💡 Program ends after line N60 with M30 command
Variable Tracker
VariableStartAfter Step 1After Step 2After Step 3After Step 4After Step 5Final
Tool NumberNone222222
Spindle StatusOffOffOffOnOnOffOff
Position(0,0)(0,0)(0,0)(0,0)(50,50)(50,50)(50,50)
Key Moments - 3 Insights
Why do we need to use the T word before M06?
The T word tells the machine which tool number to select. M06 then triggers the tool change to that selected tool. Without T, the machine won't know which tool to load (see execution_table step 1).
What happens if we try to move before the tool change completes?
The machine waits for the tool change to finish before moving. This ensures the correct tool is in place for machining (see execution_table step 2 after tool change).
Does the spindle start automatically after tool change?
No, spindle start is a separate command (M03). Tool change only loads the tool; spindle must be started explicitly (see execution_table step 3).
Visual Quiz - 3 Questions
Test your understanding
Look at the execution table, what tool is selected after step 1?
ATool 1
BTool 2
CNo tool selected
DTool 3
💡 Hint
Check the 'Tool Selected' column in execution_table row for step 1
At which step does the spindle start running?
AStep 3
BStep 2
CStep 4
DStep 5
💡 Hint
Look at the 'Spindle Status' column in execution_table to find when it changes to 'On'
If we change T02 to T03 in line N10, what changes in the execution table?
APosition changes at step 2
BSpindle starts earlier
CTool Selected changes to 3 at step 1
DProgram ends earlier
💡 Hint
Focus on the 'Tool Selected' column in execution_table step 1
Concept Snapshot
Tool numbering uses T followed by a number (e.g., T02) to select a tool.
M06 command triggers the tool change to the selected tool.
Tool change must complete before machining moves start.
Spindle start (M03) is separate from tool change.
Program ends with M30.
Always select tool before machining commands.
Full Transcript
In CNC programming, the T word followed by a number selects the tool to use. The M06 command tells the machine to change to that tool. The program waits for the tool change to finish before moving or starting the spindle. Spindle start is done with M03 and speed set by S command. The example program selects tool 2 with T02, changes tool with M06, moves to start position, starts spindle, cuts a line, stops spindle, and ends the program with M30. Variables like tool number, spindle status, and position change step by step as shown in the execution table. Key points are to always select the tool before M06, wait for tool change completion, and start spindle separately. The visual quiz tests understanding of tool selection, spindle start timing, and effects of changing tool number.