LinuxCNC M67

M67 is a LinuxCNC G-code M-code that sets an analog output value synchronized with machine motion. The output number is given by the E word (0 to 3 by default) and the value by the Q word, with Q set to 0 turning the output off. The change is queued and takes effect at the beginning of the next motion command, so a motion command such as G0 or G1 should follow it.

Source checked7/7 values · 2026-10-26

Specification

1 source
Languagegcode
CodeM67
GroupAnalog Output Control
SyntaxM67 E- Q-
DialectLinuxCNC

Parameters

NameDescription
EOutput number ranging from 0 to 3 (adjustable from motmod argument num aio).
QValue to set (set to 0 to turn off).

Study notes

  • The change of the specified output happens at the beginning of the next motion command; if no motion command follows, the queued change does not happen.
  • Because the output change is queued, a motion G-code (G0, G1, etc.) should always be programmed right after M67.
  • M67 functions the same way as the queued digital output commands M62 and M63.
  • The immediate (non-synchronized) counterpart is M68, which sets the analog output as soon as the command is received.
  • The number of analog I/O can be increased with the num_aio parameter (and digital I/O with num_dio) when loading the motion controller.
  • M67 will not function unless the appropriate motion.analog-out-nn pins are connected in the HAL file to outputs.

Safety

  • The E-word output number ranges from 0 to 3 by default; the count is adjustable with the motmod num_aio argument.
↑↓ navigate↵ openesc close