Fanuc
M07The code takes no arguments. What it does depends entirely on the machine PLC: it can be mapped to mist, to air, to an auxiliary output or to nothing. In the ISO standard the pair is M07 coolant number 2 and M08 coolant number 1.
We use technical and security cookies and, only if you accept, analytics with no cross-site tracking. More in the Cookie policy and Privacy policy.
We use first-party cookies and technical storage to make the site work, Google reCAPTCHA security technology and, only if you accept, Vercel analytics (no cookies, no cross-site tracking). You can accept or reject analytics; both options are equivalent and you can change your choice at any time. More info: Cookie policy, Privacy policy, Legal notice and Terms and conditions.
M07 switches on the machine's secondary coolant output, which in most cases is mist or air with a touch of lubricant, and it is shut off with M09 just like flood. The important part is in most cases: M07 is one of those functions every builder maps into the PLC however it likes, so on one machine it puts out mist, on another compressed air, on another a chip wash and on another nothing at all.
For reference only: syntax changes with the control, the post-processor and the machine parameters. Check the official manual and run a simulation before cutting. Legal notice.
Fanuc
M07The code takes no arguments. What it does depends entirely on the machine PLC: it can be mapped to mist, to air, to an auxiliary output or to nothing. In the ISO standard the pair is M07 coolant number 2 and M08 coolant number 1.
Haas
M07On Haas it usually matches an installed option, such as mist or the chip wash. If the machine does not have that option, the code does nothing or alarms. Through-spindle coolant is another matter and goes with M88 and M89.
Siemens 840D / 828D
M7M7 and M8 are reserved for the two coolant outputs, but what they really mean is decided by the machine builder in the PLC. They are written with no leading zero.
Heidenhain TNC (Klartext)
M7Same as on Siemens: M7 corresponds to the second coolant circuit and its actual function is defined by the builder. On many TNCs you can also tie the coolant to the tool call from the table.
| Letter | What it sets | Unit |
|---|---|---|
| No address letters | M07 goes alone in its block or alongside a move. It takes no arguments: pressure, flow and nozzle are set on the machine, not in the program. | no units |
| M08 | The other output, normally flood. On some machines they run together and on others they exclude each other: switching one on turns the other off. It depends on the PLC. | no units |
| M09 | Shuts the coolant off. It is the only off code: there is no specific shutdown for M07, so M09 turns both outputs off at once. | no units |
| G04 P (associated dwell) | It is not part of M07, but it is used with it: a short dwell after opening the mist gives the line time to charge so the nozzle is already delivering before the tool goes in. | ms on Fanuc, seconds with decimals on Haas |
Slotting an aluminum plate with a three flute cutter and mist lubrication. The mist takes a couple of seconds to reach the nozzle, so the program opens it before coming down and waits. At the end, the M09 shuts off every coolant output on the machine, mist included, because there is no code of its own to close just the M07.
O0007 (RANURA EN ALUMINIO CON NIEBLA) | ( Program header. ) |
G21 G17 G40 G49 G80 | ( Millimeters, XY plane and a clean state. ) |
G91 G28 Z0. | ( Z to the reference point in incremental before the change. ) |
T2 M06 (FRESA D8 DE 3 FILOS) | ( Three flute cutter for aluminum. ) |
G90 G54 G00 X10. Y25. S9000 M03 | ( Absolute, work offset, positioning over the start of the slot and spindle on. ) |
G43 H02 Z50. | ( T2 length offset. ) |
M07 | ( Opens the mist output. The first time, check it dry with the door closed: on some machines this same code puts out air only and on others it does nothing. ) |
G04 P2000 | ( A two second dwell so the line charges. On Fanuc the P is in milliseconds, so P2000 is 2 s; on Haas you would write P2. because it counts in seconds. ) |
G00 Z2. | ( Approach, with the nozzle already delivering. ) |
G01 Z-3. F400 | ( Feeds down to the depth of the slot. ) |
G01 X110. F1800 | ( Slot along the plate. In aluminum, mist is mostly there to keep the chip from welding to the edge. ) |
G00 Z50. | ( Retract in Z. ) |
M09 | ( Shuts the coolant off. M09 turns off every output on the machine: there is no separate code to close only the mist. ) |
G91 G28 Z0. M05 | ( Z to the reference point and spindle stop. ) |
G90 M30 | ( Back to absolute and end. ) |
In the standard, M07 is coolant number 2 and M08 number 1. What sits behind that number 2 is decided by the machine builder when the PLC is written, and that is why the honest answer to what M07 does is it depends. The commonest mappings are mist or minimum quantity lubrication, compressed air through the nozzle, a second pump at another pressure or an auxiliary wash circuit. There are machines where M07 and M08 run together and machines where switching one on turns the other off. The only thing common to all of them is that M09 turns them off.
Mist shines where the problem is sticking and not heat: aluminum, brass, saws and slitting cutters, tapping small parts, finish passes where flood would push the chip against the wall. Also on machines without good sealing or on jobs where you do not want to soak the part. Flood is still better when you have to get chips out of a deep hole, genuinely cool a roughing pass in steel or hold a stable temperature for a tight tolerance. And there is a third criterion, health: mist is breathed in and needs an enclosed machine and extraction.
Three checks that take a minute and save a wasted program. The first, the M code list in the builder's manual, which is the only reliable source. The second, running it in manual or MDI with the door closed and watching what comes out where. The third, the PLC output diagnostic screen, if the machine has one, where you see the signal switching on. And one rule: do not copy a block with M07 from one machine in the shop to another without repeating that check, even if they are from the same builder and look identical.
M08 is the main output, which on almost every machine is the flood of cutting fluid. M07 is the secondary one, most often mist or air with lubricant. The real difference is defined by the builder in the PLC, so the machine next door may not match. Both are turned off with M09.
Look at the M code list in the builder's manual, not the generic Fanuc or Haas one, and then run it in MDI with the door closed to see what comes out. If the machine has an output diagnostic screen, the signal shows up there. What does not work is assuming it from what another machine does.
On some machines yes and on others no: there are PLCs where the two outputs coexist and others where switching one on turns the other off automatically. It is a builder decision. Try it dry before counting on it in a production program.
Normally not. Coolant through the spindle usually has its own codes: on Haas they are M88 to open and M89 to close, and other builders use different numbers. Mixing the two up leaves a long drill working without the internal flow it needs.
Not with M07: the code is a switch with no arguments. Flow, pressure and nozzle aim are set on the machine's own equipment. Some machines with advanced coolant systems have their own M codes to change pressure level, and that is a builder matter.
CNC IDE: editing with G/M tooltips, line inspector, conversion between controls and 2D/3D toolpath.
CNC Alarms and Solutions Guide. Enter the error code or symptom to find the cause and how to repair it at the machine.
Estimate CNC turning and milling cycle time from G-code. Calculate parts per hour with a breakdown of cutting, rapids, canned cycles and tool changes.