{"id":"mcode-m07","model_id":"M7","name":"LinuxCNC M7","summary":"M7 is a LinuxCNC G-code M-code that turns mist coolant on. It drives the HAL pin iocontrol.0.coolant-mist, which must be connected in the HAL configuration before the command will control an output. The command may be issued regardless of the current coolant state, and M9 turns both mist (M7) and flood (M8) coolant off.","study_notes":["M7 controls the iocontrol.0.coolant-mist pin.","M8 controls flood coolant via iocontrol.0.coolant-flood; M9 turns both M7 and M8 off.","One or both coolant control pins must be connected in HAL before M7 or M8 will control an output.","M7 and M8 can be used to turn on any output via G-code.","Any of M7, M8 or M9 may be used regardless of the current coolant state.","Program end (M2/M30) turns coolant off like M9.","M70 saves mist (M7) and flood (M8) status as part of modal state; M72 restores it."],"safety_notes":["Coolant continues to flow during a tool change (M6) unless it has been turned off with M9."],"sources":[{"url":"https://linuxcnc.org/docs/html/gcode/m-code.html#mcode:m7-m8-m9","title":"M-Codes","accessed":"2026-10-26"}],"verification":{"status":"source_checked","checked_at":"2026-10-26","values":2,"method":"llm_source_check"},"updated_at":"2026-10-26","type":"instruction","spec":{"language":"gcode","code":"M7","group":"coolant control","parameters":[],"dialect":"LinuxCNC","related":[],"standards":[]},"url":"https://machineschema.com/instruction/mcode-m07","license":"https://creativecommons.org/licenses/by/4.0/"}