Closed nicksears closed 9 years ago
Generating G-code with Excel sounds both funny and clever. :-P
Anyway, I just added an option for adding custom commands before layer change since that gets requested quite often. I also added a [layer_z]
placeholder in layer change G-code that you can use for restoring Z after your wipe routine. So now you have two ways for doing what you need.
Awesome, [layer_z] sounds like it will let me do what i want, now I can put it in the layer change g-code! Anyone have any thoughts on how to get it to do every x layers? Also, can i get a hold of the 1.2.6 or have to wait for that to be beta? Anyone interested can find the find and replace program "fnr.exe" at "https://findandreplace.codeplex.com/" It wont let me upload excel files so email me for the wipe move calcs file or more details
(figured I could at least post what I use) ;XXXXXX start wipe protocol G91; relative coordinates G1 Z1; lift 1mm G90; absolute coordinates G1 X135 Y175 F3000; go to wipe position G1 Z15; raise to wipe level G91; relative coordinates M204 S500 ; adjust acceleration G1 X20; enter wipe G1 X15; wipe midsection right G1 X0 Y0; wipe circle G1 X1 Y0.084; wipe circle G1 X2.5 Y1.043; wipe circle G1 X1 Y0.905; wipe circle G1 X1 Y1.571; wipe circle G1 X0.25 Y0.684; wipe circle G1 X0.15 Y0.623; wipe circle G1 X0.1 Y1.091; wipe circle G1 X0 Y0; wipe circle G1 X-0.1 Y1.091; wipe circle G1 X-0.15 Y0.623; wipe circle G1 X-0.25 Y0.684; wipe circle G1 X-1 Y1.571; wipe circle G1 X-1 Y0.905; wipe circle G1 X-2.5 Y1.043; wipe circle G1 X-1 Y0.084; wipe circle G1 X0 Y0; wipe circle G1 X-15; wipe midsection left M42 P11 S0; turn fan off while wiping XXXXXX G1 X-1 Y-0.084; wipe circle G1 X-2.5 Y-1.043; wipe circle G1 X-1 Y-0.905; wipe circle G1 X-1 Y-1.571; wipe circle G1 X-0.25 Y-0.684; wipe circle G1 X-0.15 Y-0.623; wipe circle G1 X-0.1 Y-1.091; wipe circle G1 X0 Y0; wipe circle G1 X0.1 Y-1.091; wipe circle G1 X0.15 Y-0.623; wipe circle G1 X0.25 Y-0.684; wipe circle G1 X1 Y-1.571; wipe circle G1 X1 Y-0.905; wipe circle G1 X2.5 Y-1.043; wipe circle G1 X1 Y-0.084; wipe circle G1 X15; wipe midsection right G1 X0 Y0; wipe circle G1 X1 Y0.084; wipe circle G1 X2.5 Y1.043; wipe circle G1 X1 Y0.905; wipe circle G1 X1 Y1.571; wipe circle G1 X0.25 Y0.684; wipe circle G1 X0.15 Y0.623; wipe circle G1 X0.1 Y1.091; wipe circle G1 X0 Y0; wipe circle G1 X-0.1 Y1.091; wipe circle G1 X-0.15 Y0.623; wipe circle G1 X-0.25 Y0.684; wipe circle G1 X-1 Y1.571; wipe circle G1 X-1 Y0.905; wipe circle G1 X-2.5 Y1.043; wipe circle G1 X-1 Y0.084; wipe circle G1 X0 Y0; wipe circle G1 X-1 Y-0.084; wipe circle G1 X-15; wipe midsection left G1 X-20; exit wipe G1 Y-12; go to wipe position G90; absolute coordinates M204 S1000 ; adjust acceleration G4 P200; pause 200 ms to let T1 finish M42 P11 S255; turn fan on XXXXXX
.
I'm having an "issue" with slic3r v 1.2.5. The issue is that the order of commands preceding the layer change has changed, but the underlying issue is that I cannot make the layer change gcode happen before the z move. For now I have to just use 1.1.7 (and it works fine). I'm not sure at which version this became "broken" for me.
I had been taking advantage of the fact that before a LAYER change (not just any z change like a hop) the G1 Z command will be preceded by [M204 S500 ; adjust acceleration] followed by the actual layer change [G1 Z0.200 F1500.000 ; move to next layer (0)].
To make this work I have a find and replace program (batch file utilizing the command line, it recognizes "/n" as "next line") that finds: "adjust acceleration/nG1 Z" This is the comment portion of the adjust acceleration line, and start of the layer z height change. And it replaces it with: "adjust acceleration/nINSERT/nWIPE/nCODES/HERE/nG1 Z" This is because only layer changes have an acceleration adjustment preceding them.
The wipe protocol is a very long, concatenated set of commands, done in excel (I'm willing to share). It does a relative lift, moves to an absolute xy location, lifts to an absolute z, and then does a relative wipe movement (on toothbrushes). This is the issue - the wipe can start from any layer (height), must lift to the same height to wipe every time, but must return to the current layer height . This is why it must happen before the layer change, the layer change gives it the appropriate z height that we've lost by mixing relative and absolute coordinates. The only other way around that is to attach the wiper to an axis on the side so it doesn't have to move to an absolute z height to wipe.
slic3r 1 1 7 vs 1 2 5 layer change
I used excel to calculate a unit circle, scale it, and turn it into a "stadium" shape. This then brushes along two toothbrushes at the corner of my build plate; entering at one brush and exiting from another to maximize cleaning. I also have pre/post wipe commands that move onto and off of the brushes. I have excel file that then concatenates the commands (adding the "/n" after each) and I then insert it into the bat file.
There are a couple awesome features that could easily be added. Start by separating the layer change gcode into a before and after section. Also you could have a wipe enable option in each extruder in the printer settings. Give it a location (xyz), geometry or path, number of loops, and how often (every 1, 2,5,10 layers, etc). I don't have much actual coding experience (none in python) but I'd be glad to help.