Page 1 of 1

how to gcode?: continuous, uninterrupted extrusion

Posted: Thu Jan 21, 2016 4:19 pm
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

Re: how to gcode?: continuous, uninterrupted extrusion

Posted: Thu Jan 21, 2016 5:24 pm
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.

Re: how to gcode?: continuous, uninterrupted extrusion

Posted: Thu Jan 21, 2016 5:37 pm
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.

Re: how to gcode?: continuous, uninterrupted extrusion

Posted: Thu Jan 21, 2016 5:46 pm
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.

Re: how to gcode?: continuous, uninterrupted extrusion

Posted: Thu Jan 21, 2016 5:48 pm
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.

Re: how to gcode?: continuous, uninterrupted extrusion

Posted: Thu Jan 21, 2016 6:53 pm
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.

Re: how to gcode?: continuous, uninterrupted extrusion

Posted: Thu Jan 21, 2016 11:58 pm
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.

Re: how to gcode?: continuous, uninterrupted extrusion

Posted: Mon Jun 26, 2017 10:24 am
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é

Re: how to gcode?: continuous, uninterrupted extrusion

Posted: Mon Jun 26, 2017 2:12 pm
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

Re: how to gcode?: continuous, uninterrupted extrusion

Posted: Thu Jul 27, 2017 12:22 pm
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.

Re: how to gcode?: continuous, uninterrupted extrusion

Posted: Thu Sep 19, 2019 9:22 am
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.

Re: how to gcode?: continuous, uninterrupted extrusion

Posted: Fri Sep 20, 2019 7:29 am
by geneb
The rotation can be controlled by the feed rate parameter when you're commanding the axis to move.

g.