# LinuxCNC M64

Instructions · `M64` · verification: source checked

M64 is a LinuxCNC G-code M instruction that turns on a specified digital output immediately. The P word selects the output number, with a default range of 0 to 3 and possible expansion through num_dio. It is not synchronized with motion and can break blending.

## Specification

| Property | Value |
|---|---|
| Language | gcode |
| Code | M64 |
| Group | Digital Output Control |
| Syntax | M64 P- |
| Dialect | LinuxCNC |

### Parameters

| Name | Description |
|---|---|
| P | Specifies the digital output number. The P-word ranges from 0 to a default value of 3; num_dio can be used to increase the number of digital I/O when loading the motion controller. |

## Study notes

- M64 is one of four commands in the M62-M65 digital output group; M62/M63 are synchronized with motion and queued, while M64/M65 act immediately.
- M64 is not synchronized with movement and will break blending.
- M62-M65 will not function unless the appropriate motion.digital-out-nn pins are connected in the HAL file.
- The number of digital I/O can be increased with the num_dio parameter when loading the motion controller.

## Sources

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

---

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