Skip to main content

M-Code Commands

Current MCode Commands Supported by SwordFish

M CommandsUse
M0-M1Unconditional stop
M3Spindle on, CW
M4Spindle on, CCW
M5Spindle stop
M7Coolant - Mist
M9Coolant off
M12Coolant air
M20List SD card
M21Initialise SD card
M22Release SD card
M23Select SD file
M24Start or resume SD program
M25Pause SD program
M26Set SD position
M27Report SD program status
M28Start SD write
M29Stop SD write
M30Delete SD file
M31Program time
M32Select and start
M33Get long path
M34SD card sorting
M92Set Axis Steps-Per-Unit
M111Set Debug Level; (S1) Echo, (S2) Info, (S4) Errors, (S128) VFD Commmunication Debug
M115Read Firmware Version
M119Retrieve endstop status
M120Enable Hardware Endstops
M121Disable Hardware Endstops
M211Software Endstops (Soft Limits) toggle with S0 or S1
M500Save Settings
M503Retrieve Hardware Settings
M997Restart into firmware update mode. This will open a USB drive and wait for you to copy and paste the new firmware file into the drive. See here for SwordFish firmware.