---
title: M3, M4, M5, M90 - M97 (Spindle/Tool head Control)
slug: m3-m4-m5-m90-m97-spindletool-head-control
docTags: 
createdAt: 2023-04-17T12:39:34.000Z
---

To start the spindle turning clockwise at the currently programmed speed, program `M3`.

To start the spindle turning counterclockwise at the currently programmed speed, program `M4`.

To stop the spindle from turning, program `M5`.

`M3` or `M4` can be used if the spindle speed is set to zero. If this is done (or if the speed override switch is enabled and set to zero), the spindle will not start turning. If, later, the spindle speed is set above zero (or the override switch is turned up), the spindle will start turning. It is OK to use `M3` or `M4` when the spindle is already turning or to use `M5` when the spindle is already stopped.

If there is more than one spindle in your machine, or if you have a mounted touch probe on the Z slide or a camera you can select the offset/IO you want

- `M90` standard spindle
- `M91` alternate 2nd spindle
- `M92` alternate 3rd spindle
- `M93` alternate 4th spindle
- `M95` touch probe
- `M97` Camera

Each spindle is connected to a different set of outputs and has different parameters.

Alternate spindles 1 and 2 may have defined offsets for X, Y, and Z.

Because this option is rarely used by customers, it is required to perform the settings yourself by editing the cnc.ini file.

There are 5 sets of parameters for each spindle configuration. For the 2nd 3rd 4th and 5th spindle configuration you can set the axis offsets with respect to the 1st spindle. Note that the 5th and 6th spindle configuration is used for a touch probe and camera.

Example system:

- Main Spindle,
- Tangential knife
- Oscillating tangential knife
- Touch probe

