how to gcode?: continuous, uninterrupted extrusion

Post your prints with the GCode used to help other users achieve a similar result, or get help.
Post Reply
until_arch
Noob
Posts: 4
Joined: Thu Jan 21, 2016 3:25 pm

how to gcode?: continuous, uninterrupted extrusion

Post by until_arch »

Hey all,

Pre-apologize for the long post.

I've been generating my own gcode in Rhino/Grasshopper for some experiments in porcelain clay printing I've been doing with my Rostock Max v2. No slicing, I'm moving the clay extruder in freeform XYZ space. New to g-code, but its going great.

Now I'd like to experiment with some commando style printing with the plastic extruder. Specifically, I'd like to turn the extruder on when the print starts and just have it run continuously at some constant rate during the print, regardless of the position of the extruder head. Then just turn it off when the print ends.

I've attached a chunk of g-code, with comments, that I think might do this. What does the forum think?

What are the issues? Does absolute vs relative positioning matter in this use? Do I need to set an extruder position at on every line, like a typical sliced print? Does the M113 command turn the extruder on in the forward direction, or just set the extrusion rate? I'm going to test the code below soon, but I wanted to get an opinion here too in case I'm overlooking something or am using code I don't need.

Thanks

----


; Automatic settings before start_gcode
; (G21) set units to mm
; (M107) fan off
G21
M107
; ----------------------
; (T0) Select extruder / tool
; (M104) set extruder temp
; (M190) set bed temp
; (M104) set extruder temp and wait
T0
M104 S205
M190 S50
M109 S205
; ----------------------
; (G28) home extruder head
; (M114) get current position
G28
M114
; ----------------------
;
; (T0) Select extruder / tool
; (G90) set absolute position
; (G92 E0) set position of extruder feed
; (M82) set extruder to absolute position
T0
G90
G92 E0
M82
; ----------------------
; Start print
; Zoom down to first point
G1 X23.8 Y-10.7 Z0 F18000
; ----------------------
; Start at first point
G1 X23.8 Y-10.7 Z0
; ----------------------
; (G1 F500) set feed rate for the rest of the print
; (M113 S0.2) extruder on, forward at rate "S"
G1 F500
M113 S0.2
; ----------------------
; Insert gCode coordinates from G-Hopper model here:
;
G1 X23.8 Y-10.7 Z0
G1 X22.7 Y-8.2 Z0
G1 X22.4 Y-6.3 Z0
;
; and so on until the end of the print...
; ----------------------
; End print
; (G91) set to relative positioning
; then zoom to the center and 10mm above last Z point
; (M106) fan on
; (M113 S0) turn extruder off
G91
G1 X0 Y0 Z10 F12000
M106
M113 S0
; ----------------------
; Return to origin
; (G90) set to absolute positioning
; (G28) move to origin
; (M107) fan off
; (M114) get current position
; (M84) stop
G90
G28
M107
M114
M84
Xenocrates
ULTIMATE 3D JEDI
Posts: 1561
Joined: Wed Sep 23, 2015 2:55 pm

Re: how to gcode?: continuous, uninterrupted extrusion

Post by Xenocrates »

I think spiral vase mode will do this, although I do believe you also will have to turn off infill and top layers.
Machines:
Rostock Max V2, Duet .8.5, PT100 enabled E3D V6 and volcano, Raymond style enclosure
Automation Technology 60W laser cutter/engraver
1m X-carve router

Sic Transit Gloria Mundi
01-10011-11111100001
Polygonhell
ULTIMATE 3D JEDI
Posts: 2417
Joined: Mon Mar 26, 2012 1:44 pm
Location: Redmond WA

Re: how to gcode?: continuous, uninterrupted extrusion

Post by Polygonhell »

You'll have a hard time finding firmware that supports M113, Repetier certainly doesn't. Looks like 5D still supports it, but that doesn't mean it would work with a stepper based extruder (see below) and I don't believe 5D supports delta geometry.

The reason M113 ever existed is that way back in the early reprap days, extruders were powered by DC motors rather than steppers, so all you could do was set the relative voltage on the motor. The move to steppers for the extruder was one of the early big quality wins.

Spiral vase mode basically computes the required E movement for any given positional move and includes it in the motion.
If you want to do this by hand, you could probably write a simple python (or language of choice) program to add the necessary E moves for the positional moves.
until_arch
Noob
Posts: 4
Joined: Thu Jan 21, 2016 3:25 pm

Re: how to gcode?: continuous, uninterrupted extrusion

Post by until_arch »

Thank all. I might try the M101 and M108 commands to to turn on and control the extruder speed. I'll take a look at spiral vase as well. Cheers.
until_arch
Noob
Posts: 4
Joined: Thu Jan 21, 2016 3:25 pm

Re: how to gcode?: continuous, uninterrupted extrusion

Post by until_arch »

Polygonhell wrote: The reason M113 ever existed is that way back in the early reprap days, extruders were powered by DC motors rather than steppers, so all you could do was set the relative voltage on the motor. The move to steppers for the extruder was one of the early big quality wins.
Of course, hence PWM. Duh, oversight on my part. Thanks.
Polygonhell
ULTIMATE 3D JEDI
Posts: 2417
Joined: Mon Mar 26, 2012 1:44 pm
Location: Redmond WA

Re: how to gcode?: continuous, uninterrupted extrusion

Post by Polygonhell »

until_arch wrote:Thank all. I might try the M101 and M108 commands to to turn on and control the extruder speed. I'll take a look at spiral vase as well. Cheers.
Those won't work either.
This is the list of supported MCodes for repetier https://github.com/repetier/Repetier-Fi ... ki/G-codes
You can also look on the reprap wiki here http://reprap.org/wiki/G-code, if you click on the individual codes it has a nice color coded set of boxes that show which firmwares actually support it.

There are a lot of legacy codes that are just not useful with modern printing and as a result just aren't supported by modern firmwares.
until_arch
Noob
Posts: 4
Joined: Thu Jan 21, 2016 3:25 pm

Re: how to gcode?: continuous, uninterrupted extrusion

Post by until_arch »

Polygonhell wrote:
until_arch wrote:Thank all. I might try the M101 and M108 commands to to turn on and control the extruder speed. I'll take a look at spiral vase as well. Cheers.
Those won't work either.
This is the list of supported MCodes for repetier https://github.com/repetier/Repetier-Fi ... ki/G-codes
You can also look on the reprap wiki here http://reprap.org/wiki/G-code, if you click on the individual codes it has a nice color coded set of boxes that show which firmwares actually support it.

There are a lot of legacy codes that are just not useful with modern printing and as a result just aren't supported by modern firmwares.
Great. Thanks.
jlds_23
Noob
Posts: 2
Joined: Fri Jun 23, 2017 9:16 pm

Re: how to gcode?: continuous, uninterrupted extrusion

Post by jlds_23 »

Hello,

I am developing a software to generate the gcode to print scaffolds for tissue engineering. My software generates a continuous pathway, but I want to know if it is possible to turn on the stepper motor during the process to mantain a constant deposition of the material. Has anyone got it yet?, or I want to know how to calculate the E coordinate.

Thanks,

José
User avatar
Jimustanguitar
ULTIMATE 3D JEDI
Posts: 2608
Joined: Sun Mar 31, 2013 1:35 am
Location: Notre Dame area
Contact:

Re: how to gcode?: continuous, uninterrupted extrusion

Post by Jimustanguitar »

I believe that the RepRap firmware for the Duet board (and a few others) is on the right track.
http://www.sublimelayers.com/2017/03/se ... ement.html
dc42
Printmaster!
Posts: 454
Joined: Mon Mar 07, 2016 10:17 am

Re: how to gcode?: continuous, uninterrupted extrusion

Post by dc42 »

It's easiest if you generate relative extruder coordinates, then you just need to make the E coordinate of each gcode command proportional to its XY length to get a constant extrusion rate.
jlds_23
Noob
Posts: 2
Joined: Fri Jun 23, 2017 9:16 pm

Re: how to gcode?: continuous, uninterrupted extrusion

Post by jlds_23 »

Hello again, I used the relative extruder coordinates and calculated the distance between two points. Then, I added E as a proportional value. It works quite well. Nonetheless, I am trying yet to activate the stepper motor of the extruder at a constant rotation speed. The main reason is that I am a researcher, and I usually work with different materials. Hence, it would be easier to define the rotation in the g-code. The proportional value sometimes could be higher or lower depending on the material. Then, it could be more practical a g-code to start the deposition and other to stop it. I know that in the Fab@Home 3D printer it is possible. I am trying to do this in a RepRap project.
geneb
ULTIMATE 3D JEDI
Posts: 5352
Joined: Mon Oct 15, 2012 12:47 pm
Location: Graham, WA
Contact:

Re: how to gcode?: continuous, uninterrupted extrusion

Post by geneb »

The rotation can be controlled by the feed rate parameter when you're commanding the axis to move.

g.
Delta Power!
Defeat the Cartesian Agenda!
http://www.f15sim.com - 80-0007, The only one of its kind.
http://geneb.simpits.org - Technical and Simulator Projects
Post Reply

Return to “GCode & Test Prints”