M66 – Wait for Input
This command monitors an auxiliary input.
MASSO will stop executing G-code until the input condition is met or the timeout expires.
If the condition is met, MASSO skips the specified number of lines and continues the program.
If the timeout expires before the condition is met, the program moves to the next line and continues execution.
Syntax & Parameters
M66followed byP,L,Q, andSvaluesP value – Auxiliary input number (1 to 16)
L value – Condition and action (1, 2, 3, or 4)
L1– Wait for input to change from Low to High.
If already High, it must cycle Low to High to be valid.L2– Wait for input to change from High to Low.
If already Low, it must cycle High to Low to be valid.L3– Wait for input to be High.
If already High, the program continues immediately.L4– Wait for input to be Low.
If already Low, the program continues immediately.
Q value – Timeout in milliseconds. Must be 1 or higher.
S value – Number of lines to skip if the input condition is met.
Example
This example starts a dust collector. The same signal opens a blast gate that has a switch indicating it is open.
N10 M64 P2 N20 MSG Checking Blast Gate Open N30 M66 P4 L3 Q1000 S2 N40 MSG Blast Gate closed N50 M00 N60 MSG N70 G1 X10 N80 N90
N10: Auxiliary output 2 turns ON to start the dust collector and open the blast gate.
N20: Displays message: "Checking Blast Gate Open".
N30: MASSO checks auxiliary input 4 to confirm the blast gate is open.
If the input is already High:
The next 2 lines are skipped.
The program moves to N60, clears the message, and continues.
If the input is Low:
MASSO waits for the timeout period for the input to go High.
If it goes High within that time, it skips 2 lines and continues from N60.
If the input remains Low until timeout:
The message "Blast Gate closed" is displayed.
The program waits for Cycle Start.
After correcting the issue, press Cycle Start.
The message is cleared and the program continues.
If you require the program to stop when an input error occurs, use M00.
The user can manually press Feed Hold to pause execution.
It is recommended to display a message when using long delays so the operator understands why the program is waiting.
If you want M66 to trigger the end of the program, use M02.
Spanish
French
German
Simplified Chinese