We've built a CNC like machine using GRBL 0.9c (https://github.com/grbl/grbl/wiki) which is programmed into our Arduino UNO microcontroller board.
We have the 'Cycle Start/Resume' Uno pin connected to a pushbutton (green for us), and have set the 'Auto-Start' variable $14 to off ($14=0) (https://github.com/grbl/grbl/wiki/Configuring-Grbl-v0.8#14---auto-start-bool). This allows us to load an entire file of gcode command and have the machine not move until we press our green button, which is very nice.
Our problem is that it only works for programs with only G01, G02, G03 commands but not M4, M5 commands that we use to turn our spindle on/off. When the GRBL interpreter hits our M4 or M5 commands it waits for another green button press (low signal on 'Cycle Start/Resume' Uno pin).
Here is some gcode which runs fine, i.e. one green button press is enough to execute the entire program:
g90
f100000
g01 x0 y0 z0
g01 x150 y130 z0
g01 x-150 y130 z0
g01 x-150 y-130 z0
g01 x150 y-130 z0
g01 x150 y130 z0
g01 x0 y0 z0
And here some gcode which stops after every M4 or M5 command:
g90
f100000
g01 x0 y0 z0
g01 x150 y130 z0 m4
g01 x-150 y130 z0 m5
g01 x-150 y-130 z0 m4
g01 x150 y-130 z0 m5
g01 x150 y130 z0
g01 x0 y0 z0
It does not matter if the M4 and M5's are on separate lines.
Anyone know how to make the GRBL interpreter not wait for the spindle on/off (M4/M5) commands?