# Main spindle

The main spindle can be programmed together with specific functions (e.g. thread tapping, gear changing, etc.) in conventional DIN syntax.

The main spindle is defined by assigning the parameter P-CHAN-00051. The logical axis number of one of the spindles which is configured in the channel parameters list is entered here. After the controller starts up, this spindle becomes the main spindle.

The NC command #MAIN spindle, see [PROG], can define any other spindle in the system into the main spindle.

The main spindle is assigned an axis name by the parameter P-CHAN-00053 (main_spindle_name) and this is used to address it in the subroutine. The main spindle is always called S. The axis names of the other spindles must also start with S but are otherwise freely selectable.

## Notice

Even if there is only one spindle in the system, it must be configured as the main spindle.

## Parameter

P-CHAN-00051 | Logical axis number of the main spindle
P-CHAN-00053 | Designation of the main spindle

## Example

Example data record

Example: spindle S1 is defined as the main spindle.

Initialising in the channel parameter list

main_spindle_ax_nr 10

main_spindle_name S

spindel[0].bezeichnung S1

spindel[0].log_achs_nr 10

spindel[1].bezeichnung S2

spindel[1].log_achs_nr 11

spindel[2].bezeichnung S3

spindel[2].log_achs_nr 12