how to gcode?: continuous, uninterrupted extrusion
Posted: Thu Jan 21, 2016 4:19 pm
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
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