{"id":"mcode-m65","model_id":"M65","name":"LinuxCNC M65","summary":"M65 is a LinuxCNC M-code that turns off a digital output immediately. It acts as soon as the motion controller receives it, so it is not synchronized with axis movement. The output to switch is given by the P word.","study_notes":["M65 is paired with M64 (turn on digital output immediately); M62/M63 are the motion-synchronized equivalents.","The P word specifies the digital output number and ranges from 0 to a default maximum of 3.","The number of digital I/O can be increased with the num_dio parameter when loading the motion controller.","M65 requires the corresponding motion.digital-out-nn HAL pin to be connected to an output in the HAL file, otherwise it does not function."],"safety_notes":["M64 and M65 take effect immediately as received by the motion controller; they are not synchronized with movement and will break blending."],"sources":[{"url":"https://linuxcnc.org/docs/html/gcode/m-code.html#mcode:m62-m65","title":"M-Codes","accessed":"2026-10-26"}],"verification":{"status":"source_checked","checked_at":"2026-10-26","values":5,"method":"llm_source_check"},"updated_at":"2026-10-26","type":"instruction","spec":{"language":"gcode","code":"M65","group":"Digital Output Control","syntax":"M65 P-","parameters":[{"name":"P","description":"Digital output number to turn off; range 0 to a default of 3, extendable with num_dio."}],"dialect":"LinuxCNC","related":[],"standards":[]},"url":"https://machineschema.com/instruction/mcode-m65","license":"https://creativecommons.org/licenses/by/4.0/"}