{"id":"mcode-m67","model_id":"M67","name":"LinuxCNC M67","summary":"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.","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_notes":["The E-word output number ranges from 0 to 3 by default; the count is adjustable with the motmod num_aio argument."],"sources":[{"url":"https://linuxcnc.org/docs/html/gcode/m-code.html#mcode:m67","title":"M-Codes","accessed":"2026-10-26"}],"verification":{"status":"source_checked","checked_at":"2026-10-26","values":7,"method":"llm_source_check"},"updated_at":"2026-10-26","type":"instruction","spec":{"language":"gcode","code":"M67","group":"Analog Output Control","syntax":"M67 E- Q-","parameters":[{"name":"E","description":"Output number ranging from 0 to 3 (adjustable from motmod argument num_aio)."},{"name":"Q","description":"Value to set (set to 0 to turn off)."}],"dialect":"LinuxCNC","related":["gcode-g01"],"standards":[]},"url":"https://machineschema.com/instruction/mcode-m67","license":"https://creativecommons.org/licenses/by/4.0/"}