Need to pause a carve? Grbl Feed Hold/Cycle Start

Got a carve running and you need to make a quick change? Don’t want to start over, just stop for a while?

Grbl provides a method for pausing a G-code job without losing machine position.

The pause function is called “feed hold”. You can issue a software command to Grbl to invoke the feed hold function or you can use a hardware switch to invoke feed hold. Both methods are an immediate command to Grbl to execute a controlled stop without losing machine position. It is an immediate soft stop.

To resume a job that has been paused using the feed hold command you issue a “cycle start” command either with a software immediate command or using a hardware switch. When this function is invoked, Grbl will resume the job from the point that the feed hold was issued.

The Grbl software command for feed hold is ! (exclamation point) and the software command for cycle start is ~ (tilde).

NOTE: Universal G-code Sender does not support Grbl Immediate commands in the Command Tab.

However, in the File tab UGCS has a “Pause” button that issues the feed hold command. Once in feed hold mode the button changes to “Resume”. The “Resume” button issues the cycle start command.

In order to use the hardware switches for feed hold and cycle start you have to connect two switches (usually momentary contact switches) to the Arduino.

Feed hold uses pin A1 and cycle start uses pin A2. Connect one side of each switch to the appropriate pin for each function and connect the other pin of each switch to Arduino ground. These two pins are configured as inputs with internal pull-up resistors active so you don’t need any other components for this to work.

Then, when you want to pause, just press the feed hold switch. To resume, press the cycle start switch.

6 Likes

This works very well, I used these buttons and drew power from the 24v power supply to have illuminated buttons for Feed Hold, Cycle Start and Reset.

A2 - Cycle Start
A1 - Feed Hold
A0 - Reset/Abort

excellent info! however, i have been using the software pause button in UGCS with full success. the cancel button takes a few seconds to register. I suppose that it is issuing the command at the end of the string already issued to the machine.

@AbearDesign I’m using UGCS version 1.0.9 and I don’t see a software pause button anywhere. My comment was based on the Commands Tab. If you enter one of the “immediate” Grbl commands, nothing happens.

What version are you using?

i’m using the 2.0 nightly build. its located under file mode.

@AbearDesign Can you look in the console window and tell me what code gets generated when you press the software pause button?, the Cancel button?

Thanks…

here is what was reported, It doesn’t look like it is revealing the command sent, even in verbose mode.

[verbose]Hold,MPos:47.289,11.749,-21.940,WPos:47.289,11.749,-2.540

**** Resuming file transfer. ****

ok
X2.3865Y0.1459
[verbose]Run,MPos:48.064,11.999,-21.940,WPos:48.064,11.999,-2.540
ok

X2.4098Y0.1361
[verbose]Run,MPos:49.240,12.300,-21.940,WPos:49.240,12.300,-2.540
ok
X2.4424Y0.1271
[verbose]Run,MPos:50.440,12.525,-21.940,WPos:50.440,12.525,-2.540
ok
X2.4747Y0.1225
[verbose]Run,MPos:51.691,12.676,-21.940,WPos:51.691,12.676,-2.540

**** Pausing file transfer. ****

[verbose]Hold,MPos:52.466,12.676,-21.940,WPos:52.466,12.676,-2.540
[verbose]Hold,MPos:52.466,12.676,-21.940,WPos:52.466,12.676,-2.540
[verbose]Hold,MPos:52.466,12.676,-21.940,WPos:52.466,12.676,-2.540
[verbose]Hold,MPos:52.466,12.676,-21.940,WPos:52.466,12.676,-2.540
[verbose]Hold,MPos:52.466,12.676,-21.940,WPos:52.466,12.676,-2.540
[verbose]Hold,MPos:52.466,12.676,-21.940,WPos:52.466,12.676,-2.540
**** Connection closed ****

Ok, thanks for the heads up. I modified the original post to include the version number. It seems that UGCS may not be using the feed hold/cycle start, but just pausing the sending of the G-code stream. If that’s the case then that might be what’s causing the cancel delay.

If you use the Grbl immediate commands through a terminal program the result is, indeed, immediate in both the stop and restart.

[Edit] Oops. Just noticed that the grbl state is “hold” so now I don’t know why you are getting a delay on the cancel.

I agree. It does seem to cancel differently each time as though it is completing a string. however, pause is immediate every time somehow.

I will be looking into those switches or something of the like. I’d rather have a piece of hardware I can press when things go wrong. I tell you what though; I use a tablet with a wireless keyboard to control the machine and it makes it very nice to be able to interact directly with the screen as well as have a keyboard to control the machine from anywhere. makes it a bit closer to like working on the pro machines i used to operate.

I normally don’t use the development tree versions but stick to the “official” releases. I may have to load UGCS 2.0 on a different machine to see if I can figure out why that pause/resume doesn’t work like I think it should.

Again, thanks for the new info.
Larry

1 Like

Well, you don’t have to use just switches. That’s just the easy way. You can have computer control of the feed hold and cycle start inputs to the Arduino.

indeed, however, i’d like to have that tactile feel for when in that OH $$$$ moment when caveman hands take over

by the way, I’ve read a lot of your post and have gained a lot of knowledge and help from them. thanks for posting them!

Like everyone else, I’m learning this stuff. Glad to pass along what I find out.

Once UGCS issues the feed hold it has nothing to do, so the OS may put it on the back burner and when you press cancel the OS has to wake up the UGCS task to resume. That would explain the random nature of the start up.

The 24v on the illuminated switches are completely isolated from the NO, NC and C connectors on the switch.

I added a terminal strip to bring out the different voltages from the power supply, the Arudino and the AC. So the connectors to the switch are 24v and ground from the power supply for the light and Arduino Pin A0, A1 or A2 and Arduino ground to the NO and C connector on the switch.

NO - normally open
NC - normally closed
C - common

Top drawer! Great write up! :clap:

@AbearDesign

I did some more checking and found that although UGCS does not support the immediate commands on the Command Tab. It does have a provision for sending the feed hold and cycle start commands on the File Tab.

The file tab has a “Pause” button which issues the feed hold command. During feed hold the button changes to “Resume”. Pressing the “Resume” button issues the cycle start command.

The reason that the cancel button is not immediate is that G-code commands get buffered up and a cancel operation most likely allows the queue to empty, which would account for a random cancel time.

I have made edits to the original post to reflect the new information.

All this is exactly right. One of these days I’ll update cancel to do a feed-hold + soft reset, but for now cancel just stops sending new commands - so whatever has already been buffered still gets sent (which can be pretty annoying if those buffered commands run for a long time).

I’m just now building a custom controller box for my CNC but am trying to do a feed hold/resume with a single latching button (basically treating an estop switch as a pause/resume based on the latch state). My problem is, of course, that the switch latches rather than acts momentarily. It seems like I should be able to put some kind of feedback into the circuits to make the switch act like two momentary switches. Has anyone attempted this before, or would I just be better off using it as an estop (I’m trying to avoid that since my power switch is just as good at that job)?