New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: Replacing Extruder G-Code Commands with Pump On/Off #848
Comments
What about disabling retraction and hooking up a mosfet (or a relay type of On Thu, Dec 6, 2012 at 11:37 AM, jtemple3 notifications@github.com wrote:
|
I forgot to mention this is a hybrid CNC mill/3D printer. The mill is being used for XYZ translation while the pump controls an attached printhead. So all of the G-Code is being run through Mach3 and to the mill, consequently there is no extruder stepper. The reason I want to use the coolant commands is that there is a relay on the mill breakout board that normally controls a coolant pump. I would like to wire the pump to this relay so it switches on and off when it receives M7/M8 from Mach3. |
Probably not good saying it here, but Skeinforge can do what you want. It I use M101 and M103 rather than E values. On 6 December 2012 18:24, jtemple3 notifications@github.com wrote:
|
I use a fourth axis stepper signal on my router for a pen attachment, for pen up / pen down commands, where I have the relay switched off the direction signal of the stepper driver. Pen down is something like G1 A 1.0 and pen up is G1 A-1.0. Doesn't matter if I keep running A in either direction, since I'm only counting on the direction signal. Maybe Slic3r's fourth axis extrude/retract codes will map well enough to your pump situation if you only use the direction signal, and ignore the step signals (assuming your breakout board has a fourth axis). You might even be able to map the direction signal to the pump signal pin in Mach, if that works better with your board and wiring setup. You might also look at the post processing scripts here for ways to convert G codes that start or retract the extruder to the M codes you want. |
In this case I don't think post processing will work because there's an extrusion command on every single line. I just need on/off before and after the z retract. We use our 4th axis for other things so I would rather not mess with it. I'll take a look at skeinforge, but let me know if anyone else has ideas. I need to be able to do 0-perimeter prints with 90 deg rectilinear infills which I only know how to do in Slic3r... so I would prefer to do this in Slic3r. Thanks! |
In a post processing script I was thinking you would just watch the state of the E commands line by line - when they switch from positive to negative (retraction) or negative to positive insert your M7/M8 commands, and otherwise just strip the E commands values off of every line. |
Okay that makes sense. Sound difficult to code though, any ideas? |
I agree with @nophead that Skeinforge is a good option here, because your on/off pump situation is pretty much like controlling a constant rate DC motor extruder - which Skeinforge supports - and the simple on/off commands are already there to be converted to M7/M8 with a simple config file. Slic3r is built around variable controlled flow, not just on/off, so downgrading to on/off behavior maybe isn't a feature to be added - but as I've suggested, it's probably not too hard to make it work with a post-processing script. Either way, it sounds like you're going to have to put some time in to figure out how to adapt either application's output to your specific hardware. |
This is quite easy to code with a post-processing script. I might write one in the near future. By the way, wouldn't you use M9 for turning pump off? |
Yes my mistake, you would use M9 to turn off the pump. It would be great if we could figure out how to write a script for Slic3r, as Skeinforge refuses to let me print with no perimeter. I'm not very familiar with the post processing scripts but I can look into it. |
Has any progress been made on this? On Mon, Dec 31, 2012 at 11:46 AM, Alessandro Ranellucci <
|
Change GCodeWriter.cpp (particularly extrude_to_xy) and GCode.cpp's _extrude function to do what you want (actually, probably better to write it based on a switch for the Gcode flavor). |
https://bintray.com/lordofhyphens/Slic3r/Slic3r_Branches should have a test implementation for this when it gets off of the build server, branch name I've added a switch in the Extruders options, along with a couple gcode entry text boxes to use whatever command you want. Currently, the user is assumed to be able to match the flow rate from their weird extruder to the print speed. A possible refinement would be to override print speed with advanced knowledge of the flow rate instead. |
Alternative solution that issues the start/stop gcode for an entire move block (instead each arc): It will also be on the bintray link above when the build completes. |
Hey @jtemple3 I know it's been a long while, but would you be able to take a look at these two possible implementations to your feature request? Is it better to turn the extrusion on/off at the beginning of each line/arc, or before/after a loop (a collection of print moves)? https://bintray.com/lordofhyphens/Slic3r/Slic3r_Branches/1.3.0-constant-extruder-fewer-pumps-385 |
I am building a 3D printer that uses a pressurized pump instead of a stepper extruder to print material. Consequently I have no need of the fourth-axis A G-Code commands as there is no filament nor stepper-based extruder. Instead I need a switch-like on/off command when the printhead is either printing or moving to a new location. Basically I just need to turn the pump on and off. I would like to use the M7 and M8 commands (traditionally for the coolant pump) within the G-Code to control this, but I'm not sure where or how to begin modifying Slic3r (or any other useful slicing program) to output M7/M8 instead of the stepper commands on the A axis. Basically this is what the final G-Code code should look like:
M7 (turns pump on)
(X and Y movements for perimeter and infill until 1st layer is finished)
M8 (turns pump off)
(Printhead moves to new location for the start for 2nd layer)
M7 (pump on)
(2nd layer)
etc.
Any ideas?
The text was updated successfully, but these errors were encountered: