Pause in Gcode using Marlin + Repetier Host

2825 views
Skip to first unread message

Brad Hopper

unread,
Dec 1, 2013, 10:45:48 AM12/1/13
to delt...@googlegroups.com
I'm trying to work up a custom gcode script to facilitate initial bed leveling. However, I can't get the machine to pause in execution of a script using any Gcode or Repetier "host" commands.

I'm typing codes into the gcode editor under Script 1 like this:

G0 X-70 Y-150 Z10
@pause Do something to restart                                    <----- Trying to put pause commands here
G0 X0 Y0
@pause Do something to restart                                    <----- Trying to put pause commands here
G0 X70 Y-150
@pause Do something to restart                                    <----- Trying to put pause commands here
G0 X150 Y0

here's what I've tried in those pause command lines: M226, M0, M1, @pause Do something to restart

All of the above are completely ignored and the machine just executes all move commands when the Start button is pushed.

What's my silly error?


Luís Andrade

unread,
Dec 1, 2013, 10:59:50 AM12/1/13
to delt...@googlegroups.com
Some repetier host features only work with repetier firmware, like dry run. 

Maybe @pause is one of them too. I've used it successfully with repetier firmware but never tried with marlin. 


--
You received this message because you are subscribed to the Google Groups "Delta robot 3D printers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to deltabot+u...@googlegroups.com.
To post to this group, send email to delt...@googlegroups.com.
Visit this group at http://groups.google.com/group/deltabot.
For more options, visit https://groups.google.com/groups/opt_out.

Brad Hopper

unread,
Dec 1, 2013, 11:01:20 AM12/1/13
to delt...@googlegroups.com
Ok I realized at least one dumb error - funny how you search help and google for a while until you give up and post for help and immediately see your error :-)

I was under the impression that if you are in edit mode of a custom script that the Play button would run that script. Not so. When you hit play, it plays whatever you had in the normal (now hidden) gcode window i.e. what might have come from Slic3r. I had previously put the same code there and was continuously running that old code regardless of edits to Script 1.

One must use the call Script 1 from the menu to execute said script. However, it still doesn't work with @pause. When you choose run Script 1 from the menu, the machine immediately pops a resume dialog but also runs all movement commands. It seems to actually pause at the end of the commands, then if you push the resume button, it will run only the first command of the script then end.

Now searching for the next dumb error

Bas de Bruijn

unread,
Dec 1, 2013, 1:59:52 PM12/1/13
to delt...@googlegroups.com
I use the command @pause in my initialization script. But I execute the code as a "normal" program (all the generated code from your slicer) and not a script. So choose "gcode" in the pull down menu and type the commands instead of the scripts/startgcode/endgcode. But you have to use repetier host.
--

Jay Couture

unread,
Dec 1, 2013, 6:44:27 PM12/1/13
to delt...@googlegroups.com
G4  - Dwell S<seconds> or P<milliseconds> ?

Brad Hopper

unread,
Dec 1, 2013, 10:40:50 PM12/1/13
to delt...@googlegroups.com
Bingo! Thanks Jay, appreciate it.

Bas de Bruijn

unread,
Dec 2, 2013, 1:20:16 AM12/2/13
to delt...@googlegroups.com
I have not used dwell, but does the program not continue after that time, regardless of what the user does? @pause in Repetier host gives a dialog waiting for the user to click and continue the program.
--

Brad Hopper

unread,
Dec 2, 2013, 8:20:06 AM12/2/13
to delt...@googlegroups.com
it may be some weirdness with Marlin + Repetier Host but for me the dialog pops but commands run anyway. Strangely until the last move which happens after the pause is pushed.

I put in a 20 sec dwell time which is enough to turn the bed screws while watching the dial.

Unlike @pause the dwell waits at each spot

Bas de Bruijn

unread,
Dec 2, 2013, 9:35:07 AM12/2/13
to delt...@googlegroups.com
Just curious, why do you adjust the bed to the dial? I do it the other way around. I first make the bed perpendicular to the columns, move the effector near a column, read the misalignment and then adjust the endstop height.

Brad Hopper

unread,
Dec 2, 2013, 4:41:39 PM12/2/13
to delt...@googlegroups.com
I am still working out how I am going to go about this whole process. I have previously used your method, but each time you make an endstop adjustment you have to home the bot, a process which I found tedious and possibly not necessary.

Since the frame is completely CNC machined I am thinking it's accurate enough to make the endstops non-adjustable. Set them once by aligning to the top members and forget. The nice thing about adjusting the bed is that no re-homing needs to be done in between changes, just drive to corner, twist the screw until the dial reads the same as the other corner, drive, twist etc. Aligning the bed to the nozzle then squares the bed "by definition" - other geometry inconsistencies could wreak havoc, not sure yet. Once the bed leveling is done, G29 should set the absolute height. I can always use M666 to adjust endstops electronically if needed.

bdeb...@luminize.nl

unread,
Dec 2, 2013, 5:25:24 PM12/2/13
to delt...@googlegroups.com
Hi Brad, I don't understand why you would need to adjust the endstops
so frequently,
or are you referring to endstop adjustment while calibrating?
I also don't understand why you need to change the level of the bed
between
changes? what do you change that misaligns your bed?
Cheers, Bas

Brad Hopper

unread,
Dec 2, 2013, 5:42:17 PM12/2/13
to delt...@googlegroups.com
I mean for calibrating - my intention is to do both printing and light cnc with this bot, and to change out the print bed periodically to support this. G10 versus MDF etc. I don't expect to change it a lot, but found the initial calibration to seem more complex and trial and error than need be.  I think if you don't have a bed adjustment then you can't easily square the bed right? If you're going to have a bed adjustment, why not shorten the calibration procedure? Then also, the bed is spring loaded to protect the head a bit.

My (the) original Kossel does not have a bed adjustment, so there was no way to square the be per se, only endstops, which don't actually square the bed as you mentioned earlier. It's not a big deal, just a slightly modified procedure which I think will work just as well plus be shorter and less error prone. Adjusting endstop screws is "blind" i.e. you tweak the screw and then home, then measure to see if you did it right. Adjusting the bed is exact in that you read the answer on the dial.

Bas de Bruijn

unread,
Dec 3, 2013, 3:02:23 AM12/3/13
to delt...@googlegroups.com
ok, I understand. No bed adjustment is horrible… our initial machine had none, and the first thing we did was to drill holes and screw in some bolts to level the bed. Changing back the print bed by adjusting to the position of the effector (provided that is the right position) should not bring problems as long as the initial calibration is done. I do my calibrating with the use of the EEPROM with Repetier Host. I have fixed endstops and use a dial to measure the offset of column B w.r.t. A, and column C w.r.t. A. This is then set in the EEPROM (along with the height correction of column A to the bed) and after homing the right heights are used. For me it’s not a lot of work to do the calibrating. And once it’s done it’s done.
 
Reply all
Reply to author
Forward
0 new messages