# Default M functions

## Channel M functions

In compliance with DIN 66025, the following M functions are assigned fixed defaults as CNC commands. Unless specified accordingly in the channel parameter list, they are neither output nor synchronised.

M function | Meaning
M00 | Programmed stop
M01 | Optional stop
M02, M30 | Main program end
M17, M29 | Subroutine end

## Notice

The parameter P-CHAN-00041 must be assigned to the channel- or axis-specific output.

## Spindle M functions

As defined in DIN 66025, the following M functions are fixed defaults for spindle control. A synchronisation method is not specified as for other M functions but for each spindle under the special parameters in the channel parameter list [CHAN] (except M40 - M45).

M function | Meaning
M03 | Endless clockwise spindle rotation
M04 | Endless counter-clockwise spindle rotation
M05 | Stop spindle
M19 | Positioning spindle
M40 - M45 | Exception: Gear speed selection for the main spindle

## Programing Example

Default M functions

Spindle output

spindel[0].m3_synch 0x00020002 PLC_INFO, MVS_SVS

spindel[0].m4_synch 0x00020004 PLC_INFO, MVS_SNS

Channel output

m_synch[3] 0x00000002 Channel output