add gcode before the starting Gcode of the slicer April 24, 2016 07:51AM |
Registered: 8 years ago Posts: 260 |
Re: add gcode before the starting Gcode of the slicer April 24, 2016 01:22PM |
Registered: 9 years ago Posts: 351 |
Re: add gcode before the starting Gcode of the slicer April 25, 2016 05:49AM |
Registered: 9 years ago Posts: 978 |
#!/usr/bin/perl -i use strict; use warnings; my $temp = 123; # Output the M567 line. Each colour proportion is output with 2 decimal places printf "M703 S%4.0f\n", $temp; # Go through the input file, line by line while ( <> ) { # Print the existing line to the output print; }
Re: add gcode before the starting Gcode of the slicer April 25, 2016 07:12AM |
Registered: 10 years ago Posts: 2,472 |
Re: add gcode before the starting Gcode of the slicer April 25, 2016 08:04AM |
Registered: 8 years ago Posts: 260 |
Re: add gcode before the starting Gcode of the slicer April 25, 2016 04:30PM |
Registered: 8 years ago Posts: 260 |
#!/usr/bin/perl -i use strict; use warnings; my $temp = 95; #only needed for windows $^I = '.bak'; # Go through the input file, line by line while ( <> ) { # for the first line add the M703 if ($. == 1) { printf "M703 S%4.0f\n", $temp } # Print the existing line to the output print; }I make a number of these scripts, one for PLA, ABS, PETG
Re: add gcode before the starting Gcode of the slicer April 26, 2016 07:14AM |
Registered: 10 years ago Posts: 2,472 |
Quote
amigob
dmould
I didn't have time yesterday to try it. But does this also work when I have a dual extruder setup where I don't always use both extruders?
Because you can have 2 different temperatures for the extruders.
The script suggestion of frankvdh will have no problem with that because the command will be just put in front of the output of slic3r.