Page 1 of 1

Pause/Resume

Posted: Sun Nov 09, 2014 4:35 am
by SirLinhart
I'm using SImplify 3D and I'm trying to figure out what gcode I need to use to implement a pause at a specific point. I don't want to use the lcd screen to pause do so and I don't want to use a timer. I want the print to pause, make some beeps, then wait for input (or timer, input preferred).

Re: Pause/Resume

Posted: Sun Nov 09, 2014 6:11 am
by teoman
What are you wanting to achieve?

Let me try to help you with the best of my ability, the reason why i ask, is if you want to insert something you may want to do a home command in between so you have the effector out of the way.

I dug up the repetier firmware for you and here is the list of GCODES that are implemented:
- G0 -> G1
- G1 - Coordinated Movement X Y Z E
- G4 - Dwell S<seconds> or P<milliseconds>
- G20 - Units for G0/G1 are inches.
- G21 - Units for G0/G1 are mm.
- G28 - Home all axis or named axis.
- G29 S<0..2> - Z-Probe at the 3 defined probe points. S = 1 measure avg. zHeight, S = 2 store avg zHeight
- G30 - Single z-probe at current position
- G31 - Write signal of probe sensor
- G32 S<0..2> P<0..1> - Autolevel print bed. S = 1 measure zLength, S = 2 Measue and store new zLength, P = 1 iterative correction for delta
- G90 - Use absolute coordinates
- G91 - Use relative coordinates
- G92 - Set current position to cordinates given
- G131 - set extruder offset position to 0 - needed for calibration with G132
- G132 - calibrate endstop positions. Call this, after calling G131 and after centering the extruder holder.

RepRap M Codes

- M104 - Set extruder target temp
- M105 - Read current temp
- M106 - Fan on
- M107 - Fan off
- M109 - Wait for extruder current temp to reach target temp.
- M114 - Display current position

Custom M Codes

- M20 - List SD card
- M21 - Init SD card
- M22 - Release SD card
- M23 - Select SD file (M23 filename.g)
- M24 - Start/resume SD print
- M25 - Pause SD print
- M26 - Set SD position in bytes (M26 S12345)
- M27 - Report SD print status
- M28 - Start SD write (M28 filename.g)
- M29 - Stop SD write
- M30 <filename> - Delete file on sd card
- M32 <dirname> create subdirectory
- M42 P<pin number> S<value 0..255> - Change output of pin P to S. Does not work on most important pins.
- M80 - Turn on power supply
- M81 - Turn off power supply
- M82 - Set E codes absolute (default)
- M83 - Set E codes relative while in Absolute Coordinates (G90) mode
- M84 - Disable steppers until next move,
or use S<seconds> to specify an inactivity timeout, after which the steppers will be disabled. S0 to disable the timeout.
- M85 - Set inactivity shutdown timer with parameter S<seconds>. To disable set zero (default)
- M92 - Set axisStepsPerMM - same syntax as G92
- M104 S<temp> T<extruder> P1 F1 - Set temperature without wait. P1 = wait for moves to finish, F1 = beep when temp. reached first time
- M105 X0 - Get temperatures. If X0 is added, the raw analog values are also written.
- M112 - Emergency kill
- M115- Capabilities string
- M116 - Wait for all temperatures in a +/- 1 degree range
- M117 <message> - Write message in status row on lcd
- M119 - Report endstop status
- M140 S<temp> F1 - Set bed target temp, F1 makes a beep when temperature is reached the first time
- M190 - Wait for bed current temp to reach target temp.
- M201 - Set max acceleration in units/s^2 for print moves (M201 X1000 Y1000)
- M202 - Set max acceleration in units/s^2 for travel moves (M202 X1000 Y1000)
- M203 - Set temperture monitor to Sx
- M204 - Set PID parameter X => Kp Y => Ki Z => Kd S<extruder> Default is current extruder. NUM_EXTRUDER=Heated bed
- M205 - Output EEPROM settings
- M206 - Set EEPROM value
- M207 X<XY jerk> Z<Z Jerk> E<ExtruderJerk> - Changes current jerk values, but do not store them in eeprom.
- M220 S<Feedrate multiplier in percent> - Increase/decrease given feedrate
- M221 S<Extrusion flow multiplier in percent> - Increase/decrease given flow rate
- M231 S<OPS_MODE> X<Min_Distance> Y<Retract> Z<Backlash> F<ReatrctMove> - Set OPS parameter
- M232 - Read and reset max. advance values
- M233 X<AdvanceK> Y<AdvanceL> - Set temporary advance K-value to X and linear term advanceL to Y
- M251 Measure Z steps from homing stop (Delta printers). S0 - Reset, S1 - Print, S2 - Store to Z length (also EEPROM if enabled)
- M280 S<mode> - Set ditto printing mode. mode: 0 = off, 1 = on
- M300 S<Frequency> P<DurationMillis> play frequency
- M303 P<extruder/bed> S<printTemerature> X0 - Autodetect pid values. Use P<NUM_EXTRUDER> for heated bed. X0 saves result in EEPROM.
- M320 - Activate autolevel
- M321 - Deactivate autolevel
- M322 - Reset autolevel matrix
- M340 P<servoId> S<pulseInUS> : servoID = 0..3, Servos are controlled by a pulse with normally between 500 and 2500 with 1500ms in center position. 0 turns servo off.
- M350 S<mstepsAll> X<mstepsX> Y<mstepsY> Z<mstepsZ> E<mstepsE0> P<mstespE1> : Set microstepping on RAMBO board
- M400 - Wait until move buffers empty.
- M401 - Store x, y and z position.
- M402 - Go to stored position. If X, Y or Z is specified, only these coordinates are used. F changes feedrate fo rthat move.
- M500 Store settings to EEPROM
- M501 Load settings from EEPROM
- M502 Reset settings to the one in configuration.h. Does not store values in EEPROM!
- M908 P<address> S<value> : Set stepper current for digipot (RAMBO board)

-----------------------------------------------------------------------------------------




and here is my untested attempt to solve your problem:

M300 S300 P1000 // Beep
M117 Print Paused // Write print paused on the screen
G4 S10 // Stop for 10 seconds
M300 S300 P1000 // Beep
M117 RESUMING! // write resuming on screen
G4 S3 // wait for another 3 seconds
M300 S300 P1000 // Final beep, after this your hands will get burned...

UNTESTED!!!

Re: Pause/Resume

Posted: Sun Nov 09, 2014 6:38 am
by teoman
I did not see a "wait for pin" gcode.

Fabricating a new G code for you is also within my ability if time permits. If you are really in need let me know and we may be to find time to write a special M code for you. But will need help from others over here to determine which IO pin to utilize from the RAMBo board. I have not quite yet gained the familiarity i desire.

Re: Pause/Resume

Posted: Sun Nov 09, 2014 6:44 am
by teoman
You may want to squeeze - G28 - Home all axis or named axis. in there somewhere to get the effector out of the way.

but that is a motion command, so you should have your hand on the power button just in case.

If you scan the forum, you will notice that the general consensus is that, if you do not want to compromise the aesthetics of your print, pausing is best done whilst the printer is printing infill.

Re: Pause/Resume

Posted: Sun Nov 09, 2014 6:46 am
by teoman
If you know exactly where in the print you want to pause then you may insert the gcode : M226 in to the gcode for your object.


FINAL DISCLAIMER: I DID NOT TRY THIS, JUST CONJURED IT UP FOR YOU

Re: Pause/Resume

Posted: Sun Nov 09, 2014 10:08 am
by geneb
Do NOT issue a G28 in the middle of a print job! It re-homes against the end-stop switches and could potentially change the new Z0 point enough to ruin the print.

g.

Re: Pause/Resume

Posted: Sun Nov 09, 2014 10:19 am
by lightninjay
What Gene said.

It would make a little more sense to put in the G-code a specific "park" place for the nozzle to go to (x=20, y=20, z=300) or something of the like.

Have it pause at that particular point for as long as you need, then send it right back to do its job on the print! Just make sure the nozzle is primed after the resume by sending an extrude command before it gets sent back and make sure to pull the extra "drool" off and you should be golden!

Re: Pause/Resume

Posted: Sun Nov 09, 2014 1:50 pm
by teoman
That is nice to know.

check out the automatic nozzle wiper thread.

Re: Pause/Resume

Posted: Sun Nov 09, 2014 5:53 pm
by SirLinhart
Thanks for all the responses. I would like a pause until resumed but this should work as long as I hear the beeps. I will probably have it move up and over somewhere out of the way, then have it reprime on a section of the bed before starting again.

Re: Pause/Resume

Posted: Sun Nov 09, 2014 6:02 pm
by teoman
Depending on what you are doing, that may or may not be a good idea.

Remember, once you have built your print to X height, lowering the effector below X is strictly dependent on your print. So you cannot use it as a standard procedure as you might be ok for one stl but bump in to your print while printing another stl.

Please do post what you come up with.

Re: Pause/Resume

Posted: Mon Dec 08, 2014 1:52 am
by enggmaug
teoman wrote: and here is my untested attempt to solve your problem:

M300 S300 P1000 // Beep
M117 Print Paused // Write print paused on the screen
G4 S10 // Stop for 10 seconds
M300 S300 P1000 // Beep
M117 RESUMING! // write resuming on screen
G4 S3 // wait for another 3 seconds
M300 S300 P1000 // Final beep, after this your hands will get burned...
I tried and get :

Tested on RMAX V1 with Rambo v1.2
Individually, only the M117 commands do work. but the text stays for a fraction of a second.
Pausing or beeping don't do a thing.

The complete sequence you put here freezes my machine, with the "RESUMING" display.
If you know exactly where in the print you want to pause then you may insert the gcode : M226 in to the gcode for your object.


FINAL DISCLAIMER: I DID NOT TRY THIS, JUST CONJURED IT UP FOR YOU
=> No effect at all.

Repetier host understands a command for pausing the machine, just like if you press the pause button in the software.

This command is:

Code: Select all

@pause Here is the pause popup display...
It awaits for you to click the continue button on the popup.

I have no idea for other hosts such as MatterControl, Octoprint ...

Re: Pause/Resume

Posted: Mon Dec 08, 2014 9:58 am
by teoman
the pause function on the LCD does a pretty decent job.

I do not know if you can press resume from it if you have triggered the pause via gcode. But if it does, it think it is exactly what you are looking for.

From what i can remember from using the pause from lcd function, it brings the end effector to the home position (does not do a home via the limit switches)

Re: Pause/Resume

Posted: Mon Dec 08, 2014 10:54 am
by bot
Wait, the LCD pause works for you? :shock: Mine does nothing.

Re: Pause/Resume

Posted: Mon Dec 08, 2014 5:01 pm
by JFettig
bot wrote:Wait, the LCD pause works for you? :shock: Mine does nothing.
I was showing off the printer to my father in law this morning and was planning on canceling the print(he was more interested in the mechanics), I decided to hit pause, yup it paused and lifted, I hit continue and it went back down. It made quite the stringy mess of PLA however.

Re: Pause/Resume

Posted: Mon Dec 08, 2014 7:01 pm
by Holy1
I made this script up a few months ago. Works great. I use S3d so I search for layer # and paste into the gcode before the layer # using notepad and save. Make sure to change the Z100 to height that is above your model height.

Here is how it behaves. When the hotend reaches the desired level it raises to 100, retracts 30 mm and plays some beeps (I stole these beeps from the preset on the seeme download section) and pauses for 2 minutes. Load new filament . It purges 10mm and gives a 5 second warning to wipe the nozzle and then it continues with print. easysqueezy

Practice with a test cube.

Code: Select all


; goto z100
G1 Z100
; retract 30 mm 
G1 E-30 F3600
G4 P40
M120 S4 P10
G4 P40
M120 S4 P10
G4 P40
M120 S4 P10
G4 P40
M120 S4 P10
G4 P40
M120 S4 P10
G4 P40
M120 S4 P10
G4 P40
M120 S4 P10
G4 P40
M120 S4 P10
G4 P40
M120 S4 P10
G4 P40
M120 S4 P10
M117 Change Filament now
G4 S3
;
;
;
G4 P120000
; extrude 10 mm
G1 E10 F360
; 
M120 S4 P10
G4 P40
M120 S4 P10
G4 P40
M120 S4 P10
G4 P40
M120 S4 P10
G4 P40
M120 S4 P10
G4 P40
M120 S4 P10
G4 P40
M120 S4 P10
G4 P40
M120 S4 P10
G4 P40
M120 S4 P10
G4 P40
M120 S4 P10
M117 Starting in 5 Seconds
G4 P5000