# Spindle programming

Spindle programming is performed in accordance with the standard syntax defined in ISO and ISO + extensions. This is required in particular for compatibility reasons and owing to certain standard functionalities such as turning, tapping and gear changing etc.

In order to comply with the requirements of new machine concepts and production technologies in flexible spindle programming, each spindle present on the channel also features the additional option of axis-specific programming.

This syntax allows several spindles to be addressed independently in multi-spindle systems in one NC block simultaneously (P-CHAN-00082, [6]-8.8). In this case, it must be noted that only one spindle can be programmed at a time, the so-called "main spindle”, both in the standard syntax and in the spindle-specific syntax.

All other spindles can be addressed only using the spindle-specific syntax (Section Spindle override in DIN syntax (G167)).

Correct use of DIN syntax and spindle-specific syntax

The spindles and the main spindle are defined in the channel parameter list [1]-3. This configuration is available after controller start-up. The main spindle can be changed in the NC program by means of an NC command (#MAIN SPINDLE, see Section Programmable spindle override).

The table below shows what NC commands must be used only in the DIN syntax in conjunction with spindle programming and what NC commands are also permitted within the extended spindle-specific syntax.

## Overview of spindle commands

Description | DIN syntax | Spindle-specific syntax
Spindle M functions | M3, M4, M5, M19 | M3, M4, M5, M19
Speed | W | REV
Position | S.POS | POS
User-specific M/H functions | Mxx/Hxx | Mxx/Hxx
Gear change (mechanical) | M40-M45 |
Thread cutting | G33 |
Tapping | G63 |
Turning | G95, G96, G97, G196 |
C axis | #CAX |
Gear change (new data) | G112 |
Homing | G74 | G74
Override 100% | G167 | G167
Explicit request for a spindle axis |  | CALLAX
Explicit release of a spindle axis |  | PUTAX
Adopt tool dynamic data |  | GET_DYNAMIK_DATA
Feedforward control |  | G135, G136, G137
Feed linking |  | FEED_LINK

## Additional information

- Parameterising spindles
- Programming in DIN syntax
- Programming in spindle-specific syntax
- Changing the main spindle (#MAIN SPINDLE)
- Synchronous spindle operation
- Cross-block synchronisation (Late Sync)
- Synchronisation of spindle M functions
- PLCopen programming