Creating a stop point in Cura GCODE

Discussion of Ultimaker's open-source Cura software
Post Reply
makerspaceUSNA
Reactions:
Posts: 3
Joined: October 21st, 2019, 12:38 pm
3D Printer(s): MakerBot, Ultimaker, LulzBot, Formlabs

Creating a stop point in Cura GCODE

Post by makerspaceUSNA »

I have a student that is trying to insert an object in the middle of a FDM print and then have the printer continue the print after the part is inserted. I know there are several concerns with this approach including the possibility of the extruder hitting the inserted part, but for now we are just trying to see if this is possible. What my student is currently trying is altering the GCODE directly after creation in Cura 3.6.18. He has proven that he can insert a GCODE stop command and have the printer pause. What he now needs to do is move the extruder and the bed so that he can insert his part. Then he can either resume manually or have the GCODE pause timed.

Here is what he is currently trying this on:

- LulzBot TAZ6 with Cura 3.6.18. We can update to the most recent version of Cura if that will help. We could also use a TAZ Mini+ or a TAZ Pro if that worked better. We could also use an Ultimaker S5 if that would be better. I have ruled out all MakerBot options since we cannot control the GCODE.
- For now we are just using PLA filament.
- We use Octoprint mostly but he could use a USB drive, SD card, or laptop if really needed (Octoprint is our normal method).

What I proposed my student do is the following at the right point in the build to insert his object:

- Move the extruder up
- Move the build plate out
- Probably cool the extruder
- Then pause (rather than pause first) probably for a fixed time (like 5 min).

Insert his part and then have the job resume automatically or manually.

Any help or ideas are greatly appreciated.
User avatar
Roberts_Clif
Reactions:
Posts: 1372
Joined: March 25th, 2017, 8:17 am
Location: Washington, State USA
3D Printer(s): Hictop 3DP11/12

Re: Creating a stop point in Cura GCODE

Post by Roberts_Clif »

Yes you can pause at height, move the nozzle out of the way, insert the object and continue printing.

Now the question is being referenced as a school project for a student.
My problem is if we tell the student exactly how to do this, how do they learn.

Are you the teacher or the Student.

Do you want a detailed step by step or just a list of the G-Code/plugins that could be used to preform the task.

Is this done through entirely through G-Code
makerspaceUSNA
Reactions:
Posts: 3
Joined: October 21st, 2019, 12:38 pm
3D Printer(s): MakerBot, Ultimaker, LulzBot, Formlabs

Re: Creating a stop point in Cura GCODE

Post by makerspaceUSNA »

I appreciate the concern. I am the instructor and all we are really looking for is some ideas if this was reasonable and then some GCODE commands or links so we could experiment.

From a teaching perspective the reason we are asking for help is this is just part of the overall project and the project itself is not how to write GCODE. My student is using the printer as a tool rather than the printer being the project so my thought was helping with the use of the tool does not undermine the project.

We would like to do it all in GCODE so we have direct control of the process and so we can start to learn more about GCODE. There are still lots of aspects my student needs to figure out like what layer to stop at, how to insert and restrain the new part, how/if the printer will resume and cover their part, etc.

Hopefully that makes sense.
User avatar
Country_Bubba
Reactions:
Posts: 48
Joined: June 8th, 2019, 10:12 am
3D Printer(s): Tronxy X5S-400, Ender5
Contact:

Re: Creating a stop point in Cura GCODE

Post by Country_Bubba »

Use the Extension that is builtin to Cura and the Post Processing script "Pause at height" and this will do exactly what I think you are requesting.
User avatar
Roberts_Clif
Reactions:
Posts: 1372
Joined: March 25th, 2017, 8:17 am
Location: Washington, State USA
3D Printer(s): Hictop 3DP11/12

Re: Creating a stop point in Cura GCODE

Post by Roberts_Clif »

I have marlin 2 firmware on my 3D Printer and have enabled the advanced park feature.

This feature allows me to Pause the print any time required, It will raise 10mm and move the bed to the front.
Allowing me easy access to the part. Once Paused the LCD displays a resume command to continue printing.
There is a Plugin to "Pause At Layer Height" : If park at pause is enabled ; it will move to park position.

Code: Select all

 #define PARK_HEAD_ON_PAUSE   
Your firmware may allow or require an updated before it could accomplished this task.
If you give me a little more information we can determine a route for you to possibly take.

Before I updated my firmware I could not do many things.
Like Change filament in the middle of a print. Detect a filament out status, Pause or resume the print.

GCODE Controlled Pause

Code: Select all

G0 X5        ; Raise Z-5mm
G28 X0 Y0    ; Home X and Y
M25          ; Pause Print
M226         ; Wait for Pin State 
If POWER_LOSS_RECOVERY is enabled

Code: Select all

M24          ; Start or Resume Print
1. Retract the nozzle (Z-Axis up)
2. Move bed so print is moved forward
3.Wait until user input is provided.
4. Insert Part
5. Return nozzle to the location, prior to 1st step
6. Resume G-Code

In Marlin

Code: Select all

G91                  ; Put in relative mode
G1 Z10               ; Raise Nozzle 10mm
G90                  ; Put back in absolute mode
G1 X0 Y0             ; Zero (home) the X & Y
M0 Click To Restart  ; Pause and wait for the user
G91                  ; Put in relative mode
G1 Z-10              ; Lower nozzle back down 10mm
G90                  ; Put back in absolute mode
The Above Code does not turn off the Nozzle Heater, This is just a sample G-Code.
Last edited by Roberts_Clif on October 22nd, 2019, 11:16 am, edited 1 time in total.
makerspaceUSNA
Reactions:
Posts: 3
Joined: October 21st, 2019, 12:38 pm
3D Printer(s): MakerBot, Ultimaker, LulzBot, Formlabs

Re: Creating a stop point in Cura GCODE

Post by makerspaceUSNA »

Thanks to both, this is very helpful and was the type of pointers I was hoping for. I think we can figure the rest out and I did want the student to try his own approach rather than a plugin if we can make it work correctly. Also I should have put in initially that our overall plan is to create a GCODE from Cura that is the correct part, material, and printer with an internal void where out part will go. Then we were planning on editing the GCODE directly to: reposition the extruder and bed, pause while we insert the part, and the resume the print where it left off. Right now my biggest question is how to restart the print where we left off.

I just have 2 questions before we start tinkering around so hopefully I can word these correctly:

- We were planning on using relative mode at least for Z but possibly X and Y also, but what happens if the G1 Z-- command (or a G1 X or Y command) in relative mode puts the position out or range? I know this seems unlikely and we can probably avoid it, but I was wondering what would happen.

- Related to that, does the printer always know its absolute position? For example after executing a relative command and then going back to absolute, I am assuming the printer does know where it is and can resume correctly. Similarly if we execute a home command (G28 X0 Y0) and then pause, do whatever is needed (like insert the new part), and then execute a resume command, I am assuming the printer will be able to pick up the print where it left since the next GCODE command should be some absolute command. What I am trying to verify is that the printer will pick back up where it left off or do I somehow need to put a command back in to the get the printer where it last was before my pause.

This is enough for us to start tinkering with and we probably can figure out the rest. We appreciate the help.
User avatar
Roberts_Clif
Reactions:
Posts: 1372
Joined: March 25th, 2017, 8:17 am
Location: Washington, State USA
3D Printer(s): Hictop 3DP11/12

Re: Creating a stop point in Cura GCODE

Post by Roberts_Clif »

Will ask other members on the forum, to my best knowledge the answer is yes.

Here is something else I found on the Web. This will also be of help.
https://www.reddit.com/r/3Dprinting/co ... code_help/
Post Reply

Return to “Cura”