M30 – End The Program And Rewind
This command ends the program and rewinds back to the first line of the G-code file.
Syntax & Parameters
M30Lvalue – When added toM30, the program repeats for the specified number of cyclesL10runs the G-code 10 times before rewinding and stoppingL0causes the program to rewind and repeat in an infinite loop
Example Program
N10 G00 X0 Y0 N20 G00 X10 N30 M30 N40 G00 Y10
N10: Moves both the X and Y axes to position 0.00
N20: Moves the X axis to position 10
N30: Ends the program and rewinds to line N10
Pressing Cycle Start will restart the program from line N10
Infinite Loop Example
N10 G00 X0 Y0 N20 G00 X10 N30 M30 L0
This program executes lines N10 to N30, then rewinds to N10 and starts again automatically.
It will continue until manually stopped.
Repeat 20 Times Example
N10 G00 X0 Y0 N20 G00 X10 N30 M30 L20
This program executes lines N10 to N30, then rewinds and repeats until 20 cycles are completed.
After the final cycle, the program rewinds to N10 and stops.
Spanish
French
German
Simplified Chinese