CNC Machinist Calculator Ultra

Home › M-codes › LinuxCNC Tormach › M66

M66 Wait on input

LinuxCNC Tormach M-code · Mill and lathe

Waits for a digital input P or analog input E to meet condition L, up to Q seconds. Result goes to parameter 5399.

Format

M66 P or E [L] [Q]

Addresses

AddressWhat it does
PDigital input number
EAnalog input number
LMode, 0 immediate, 1 rise, 2 fall, 3 high, 4 low
QTimeout in seconds

How it works

Non modal.

Example program

M64 P1 (CLOSE VISE)
M66 P0 L3 Q5 (WAIT UP TO 5 SEC FOR CLAMP SWITCH)
(DEBUG, CLAMP RESULT #5399)
G0 X1 Y1

Example is in inch. Check offsets and clearances first.

Watch out for

Related codes

M64 · M62

M66 on other controls

The same number can mean something different on another control.

ControlMeaning
Haas NGCBuilt in M code relay 6 off
Doosan (Fanuc)Chucking low pressure
DMG Mori MAPPS (Fanuc)Tool skip ON
Mazak (EIA)C-axis clamp
FadalMP-12 probe active

Every M-code for LinuxCNC Tormach in your pocket. The app has the full example programs, search by number or shop word, a line decoder and calculators for tapping, threading and drilling.

Open M66 in the app All LinuxCNC Tormach M-codes

App Store Google Play