M-code reference

M66 M-Code: Wait for Input (LinuxCNC)

Wait for Input (LinuxCNC) — LinuxCNC: waits for a digital or analog input to reach a state, with an optional timeout. Lets programs wait for a clamp, door or sensor.

By cnccode · Updated
PropertyValue
CodeM66
FunctionWait for Input (LinuxCNC)
Used onMilling machines

What does M66 do?

LinuxCNC: waits for a digital or analog input to reach a state, with an optional timeout. Lets programs wait for a clamp, door or sensor.

M66 example

Example
M66 P0 L3 Q5 (wait up to 5 s for input 0 high)

Tips

  • Check #5399 for the result after a timeout.

M-codes vary between machine builders. Codes from M00 to M09, M30 and M98/M99 are nearly universal; most others are defined by the machine builder. Always check the M-code list in your machine manual.

Most-used M-codes

CodeFunction
M00Program Stop
M01Optional Stop
M03Spindle On Clockwise
M04Spindle On Counter-Clockwise
M05Spindle Stop
M06Tool Change
M08Flood Coolant On
M09Coolant Off
M30Program End and Rewind
M98Subprogram Call
M99Subprogram Return / Loop

Frequently asked questions

What does M66 mean on a CNC machine?
M66 is Wait for Input (LinuxCNC). LinuxCNC: waits for a digital or analog input to reach a state, with an optional timeout. Lets programs wait for a clamp, door or sensor.