# LinuxCNC M71 Invalidate Stored Modal State

Instructions · `M71` · verification: source checked

M71 is a LinuxCNC M-code that invalidates modal state saved at the current call level by M70 or M73. After M71, that saved state cannot be restored, and a later M72 at the same call level will fail. If M71 is used in a subroutine protected by M73, a subsequent return or endsub will not restore modal state.

## Specification

| Property | Value |
|---|---|
| Language | gcode |
| Code | M71 |
| Group | modal state |
| Syntax | M71 |
| Dialect | LinuxCNC |

## Study notes

- M71 operates at the current call level.
- It invalidates modal state saved with M70 or by M73 at that level.
- If a subroutine uses M73 and executes M71, a subsequent return or endsub will not restore modal state.
- The document says the usefulness of M71 is dubious and it should not be relied upon because it might go away.

## Sources

1. [M-Codes](https://linuxcnc.org/docs/html/gcode/m-code.html#mcode:m71) (accessed 2026-10-26)

---

Source page: https://machineschema.com/instruction/mcode-m71  
JSON: https://machineschema.com/instruction/mcode-m71.json  
License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Cite Machine Schema and the original sources.
