#
# M-codes for mazak

  M      Function

  0      program stop

  1      optional stop

  2      end of program

  3      spindle start c.w.

  4      spindle start c.c.w.

  5      spindle stop

  6      tool change

  7      mist coolant

  8      liquid coolant

  9      coolant off

  10     clamp tool on spindle

  11     unclamp tool

  15     magazine cover closed

  16     magazine cover open

  19     spindle orientation

  23     error detection valid

  24     error detection invalid

  30     end of program (re-wind)

  33     tool length measurement unit advance

  34     tool length measurement unit retract

  35     detection of tool breakage

  36     selection of spindle speed (low)

  37     selection of spindle speed (low/medium)

  38     selection of spindle speed (low/medium/medium/high)

  39     selection of spindle speed (high)
 
  40     selection of spindle speed (neutral)

  42     reverse rotation indexing table

  43     external command of M-code 3

  44     external command of M-code 4

  45     external command of M-code 5

  48     spindle speed and feed correction valid

  49     spindle speed and feed correction invalid

  50     air blast

  51     spindle thru coolant

  52     tapping coolant

  58     check of tool life for spare-tool managment

  64     pallet door closed

  65     pallet door opened

  68     clamping of pallet
 
  69     unclamping of pallet
 
  71     selection of pallet 1

  72     selection of pallet 2

  73     selection of pallet 3

  74     selection of pallet 4

  75     selection of pallet 5

  76     selection of pallet 6

  98     call subprogram

  99     end of subprogram

  100    external command of M-code 1

  101    external command of M-code 2

  122    gap eliminator valid

  123    gap eliminator invalid

  130    niagara coolant

  131    high pressure coolant on

  132    spindle through air blast
