Search This Blog

Sunday, November 16, 2014

"What is M-CODES M03, M04 & M05 (Spindle motion codes) used in CNC PROGAMMING "

M-COde M03 and M04 Spindle Motion M-codes:

M03 (Spindle ON Clockwise Direction):

M03 Is the M-code used in the CNC Program to activate the Spindle along the clockwise Direction with given Spindle speed Specified with the alphabet S.
Example: After the Tool change the spindle (Clockwise direction) is activated using the M03 code with the spindle speed of S1000 means spindle rotation at 1000 RPM.
N170 T6 M06
N171 G54 G90 G00 X10 Y10 Z50 M03 S1000

M04 (Spindle ON Counter Clockwise Direction):

M04 Is the M-code used in the CNC Program to activate the Spindle along the counter clockwise Direction with given Spindle speed Specified with the alphabet S.
Example: After the Tool change the spindle (Counter Clockwise direction) is activated using the M04 code with the spindle speed of S1000 means spindle rotation at 1000 RPM.
N170 T6 M06
N171 G54 G90 G00 X10 Y10 Z50 M04 S1000

Note: M04 is commonly used in the reverse helix tools. For example: Slot cutters with reverse direction of teeth

M05 (Spindle OFF):

M05 is the M-code Used in the CNC Program to stop the Spindle any point of time required on the Program. Remember that once M05 is called in your program see that the tool does not move in the material to take cut until M03 or M04 is called again, it may lead into tool breakage.
Example:
N170 G0Z50                (Retract to Safety)
N171 M05 M09           (Spindle OFF & Coolant OFF)
N172 G91 G28 Z0       (Retract to Z Home Position)

N173 M30                    (End of the Program)