Back to the Gcode Dictionary
M577: Wait until endstop is triggered
M577 - RepRapFirmware 2.x and earlier
- Snnn Desired endstop level
- Xnnn Select X axis endstop
- Ynnn Select Y axis endstop
- Znnn Select Z axis endstop
- Ennn Select extruder drive endstop
- M577 E0 S1
Wait for an endstop switch to be pressed. The example above will wait until the first extruder endstop is triggered.
The following trigger types may be used using the 'S' parameter:
0: Endstop not hit
1: Low endstop hit
2: High endstop hit
3: Near endstop (only Z probe)
M577 - RepRapFirmware 3.0 up to 3.01RC1
- P"nnn" Specifies one or more pin names, see Pin Names
- M577 P"!xstop+!e0stop"
In RRF3, use the P parameter to specify one or more pin names. The pin(s) do not need to be exclusively used by M577; for example, it is permitted to specify the name of a pin that has already been declared as used by an endstop switch in a M574 command.
The command waits for a high input level. To wait for a low input level, invert the pin name by prefixing "!".
Example - old code (RRF2.x):
M577 X E0 S0 ; wait until the X and E0 endstop inputs are both low
New code (RRF3):
M577 P"!xstop+!e0stop" ; wait until the X and E0 endstop inputs are both low
M577 - RepRapFirmware 3.01RC2 and later
- Sn Desired endstop or input level: 1 = triggered/active (default), 0 =not triggered/inactive
- X, Y, Z, U, V, W, A, B, C, D Axis endstop to wait for
- Pnnn Input pin number to wait for (see M950 with J parameter)
- M577 X S0 ; wait until X endstop is not triggered
- M577 P2 ; wait
Wait for an endstop switch to be triggered or an input to become active.