M66 - Wait for Input

INFORMATION: M66 feature is available on the MASSO G3 and MASSO touch using v5.01 or higher and is not available to users at present.



This command is used to monitor an auxiliary input.

MASSO will stop executing Gcode until the input condition is met or the timeout expires.

If the condition is met MASSO will skip the specified number of lines of Gcode and continue the program.

If the timeout expires before the input condition is met the Program will move to the next line of Gcode and continue execution of the program.


Syntax & Parameters


  • M66 followed by P, L, Q & S values
  • P Value - Auxiliary input number 1 - 16
  • L Value - Condition and action 1, 2, 3 or 4
  • L1 - Wait for input to change from Low to High. If this input is already High it will need to cycle to Low and back to High to be a valid input
  • L2 - Wait for input to change from High to Low. If this input is already Low it will need to cycle to High and back to Low to be a valid input
  • L3 - Wait for input to be High. If the input is already High the Program will continue immediately
  • L4 - Wait for input to be Low. If the input is already Low the Program will continue immediately
  • Q Value - Timeout in milliseconds.  Minimum timeout is 1mS
  • S Value -  skip the next number of lines if the input is received.




Example


This example could be starting a dust collector and at the same time the same signal opens the the blast gate which has a switch on it to indicate it is open


N10 M64 P2
N20 M66 P4 L3 Q1000 S3
N30 MSG Blast Gate closed
N40 M00
N50 MSG
N60 G1 X10
N70 
N80


In this example Auxiliary output 2 is turned on to start dust collector and open the Blast gate

MASSO looks at auxiliary input 4 to see if blast gate is open

If the input is already high it will immediately skip the next 3 lines and move to line N60 G1 X10

If the input is Low it will wait 10 seconds for the input to change to High and if it goes high in that time it will skip the next 3 lines and move to line N60 G1 X10

If the input remains low for 10 seconds MASSO will put message "Blast Gate closed" on the screen and wait for cycle start

After the problem is corrected and the user wishes to continue, cycle start is pressed, the message is removed and the program continues on line N60 G1 X10


If you require that the program execution stops when it encounters an input error please use a M00 to halt operation.

The user can manually press feed hold to end program execution.