# LinuxCNC M68 Analog Output, Immediate

Instructions · `M68 Analog Output, Immediate` · verification: source checked

M68 is a LinuxCNC G-code that sets an analog output immediately. It uses an E word for the output number and a Q word for the value, with Q set to 0 turning the output off. Because the output is applied immediately rather than queued with motion, it can break blending.

## Specification

| Property | Value |
|---|---|
| Language | gcode |
| Code | M68 |
| Group | Analog Output Control |
| Syntax | M68 E- Q- |
| Dialect | LinuxCNC |

### Parameters

| Name | Description |
|---|---|
| E | Output number ranging from 0 to 3; adjustable from the motmod argument num_aio. |
| Q | Value to set; set to 0 to turn the output off. |

## Safety

- Output number E ranges from 0 to 3, adjustable with the motmod argument num_aio.

## Study notes

- The document states that M68 functions the same as M64-M65.
- M68 output happens immediately as received by the motion controller and is not synchronized with movement.
- Immediate M68 output changes can break blending.
- M68 will not function unless the appropriate motion.analog-out-nn pins are connected in the HAL file to outputs.

## Sources

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

---

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