Benachrichtigungen
Alles löschen

Edit .gcode to change INFILL speed  

  RSS
--
 --
(@)
Illustrious Member
Edit .gcode to change INFILL speed

I assume there is only ONE command early on that sets infill speed ... if this is wrong please let me know; and I have a few files to rebuild from scratch.

In Slic3r, it is set to 200mm/s, and I have a bunch of gcode files I created, but finding the INFILL extrusion is very thin. I'd like to edit the appropriate line in the .gcode files to change from 200mm/s down to 100mm/s.

In searching, I can't seem to find any mention of the gcode command that sets INFILL speed. There is the G command followed by acceleration S command, but nothing that suggests this type of move is any different than a normal print move other than normal perimeters have an S1000 and fills have S1250 (but perimeter speed is 40mm/s and fill is 200mm/s, so the S numbers don't make sense. The Feedrate commands F1200 and F11017.8 do have a better correlation, but also don't match 40mm/s and 200mm/s.

; perimeter
M204 S1000
G1 F1200
G1 X197.204 Y209.111 E0.02488

;infill
M204 S1250
G1 F11017.8
G1 X205.686 Y115.447 E0.01978

What am I missing?

====

I think I found my answer - there is no single value. Each infill move set is preceded with the G1 Fxxxxx number. So the 11017.8 above is the speed value I need to change, but Slic3r is doing some odd math on it so every occurrence is a different value - all close to 12000, but random so a simple search and replace won't work. Add the issue of the other feed settings that are based on FM then I can't really do what I want.

Veröffentlicht : 25/10/2018 8:30 am
bobstro
(@bobstro)
Illustrious Member
Re: Edit .gcode to change INFILL speed

There is no single line you can change to effect speed changes for an entire gcode file. If the gcode was generated with verbose comments, each line in a block of infill movements has an "; infill" comment appended, but the speeds are not set in any easy-alterable format. You can see this for yourself by opening the gcode file in a text editor.

It would be far easier to change the setting in Slic3r. Is there some reason you can't simply re-slice the files? If it's a large number of files but you have the STL source files available, you could extract the commented settings at the end of the gcode files and save it as an .ini file, then use that in batch (command line) mode to process a large number of files in minutes. I do this to update my library of 216 calibration prints for different materials and nozzle sizes in under 2 minutes.

My notes and disclaimers on 3D printing

and miscellaneous other tech projects
He is intelligent, but not experienced. His pattern indicates two dimensional thinking. -- Spock in Star Trek: The Wrath of Khan

Veröffentlicht : 25/10/2018 8:50 am
--
 --
(@)
Illustrious Member
Themenstarter answered:
Re: Edit .gcode to change INFILL speed

Reslicing is a bit of work due to some preprocessing I do. I was hoping for something easier/quicker.

It almost seems like Slic3r is using the move speed to set the fill density. I see this issue when fill is set very low, 5% rectilinear, for example. The photo above is 10% rectilinear, if I recall. Since rectilinear is an automatic 50% decrease, the result these was 5% infill. 2.5% on the parts I'm seeing too-little infill. Admittedly, a stretch for any extruder capabilities.

Interestingly, setting infill to 100mm/s max, I see a constant F6000 in place of the Fx=random(0,12000) result; like some other limit is asserting itself when speed is 200mm/s. Maybe the motion hypotenuse ... who knows.

Veröffentlicht : 25/10/2018 7:29 pm
bobstro
(@bobstro)
Illustrious Member
Re: Edit .gcode to change INFILL speed


[...] Interestingly, setting infill to 100mm/s max, I see a constant F6000 in place of the Fx=random(0,12000) result; like some other limit is asserting itself when speed is 200mm/s.

There is an over-ride in the form of the max volumetric speed (MVS) setting. The slicer will allow speeds up to your set maximums without restriction until it runs into the max volumetric speed limit (set by default in filament profiles). The E3D V6 hotend can move an advertised 15mm^3/s of filament. In reality, it's closer to 11.5mm^3/s, but Prusa has used 15.

Using a 0.40mm nozzle with extrusion width set to 0.48mm (120%) and a 0.20mm layer height, you run into the MVS limit at roughly 155mm/s. For speeds lower than that, you can probably expect to see constant values for speed. At speeds higher, expect varying speeds as the slicer takes extrusion width, layer height, acceleration, jerk and other factors into consideration to ensure you remain below the 15mm^3/s limit of the hotend. I've dumped my notes on the subject here.

So while there's good news of a sort in that you can see the speeds set consistently for features printed at lower speeds, your infill printed at 200mm/s is going to be difficult to fix with post-processing.

Could your pre-processing be automated and fed into Slic3rPE for slicing?

My notes and disclaimers on 3D printing

and miscellaneous other tech projects
He is intelligent, but not experienced. His pattern indicates two dimensional thinking. -- Spock in Star Trek: The Wrath of Khan

Veröffentlicht : 25/10/2018 8:32 pm
--
 --
(@)
Illustrious Member
Themenstarter answered:
Re: Edit .gcode to change INFILL speed

Reslicing would be an option, but my 'preprocess' is manually placing a lot of parts on the platter, and aligning very carefully to avoid "in-air" collisions. Result is one 24h print file instead of 8 separate 3h prints - I prefer something I can turn on and forget for a day.

Seems I am hitting that physical extrusion limit since I am seeing voids in the fill. Since it only happens when I try to limit weights by keeping fill very low (structural strength not required, but there are internal structures that need support) I can use it as is; and keep the limit in mind next semi-major project. Too bad the sliced view doesn't show these sorts of 'interactions' ... lol.

Thanks for the very complete description of what's going on.

Veröffentlicht : 25/10/2018 10:31 pm
--
 --
(@)
Illustrious Member
Themenstarter answered:
Re: Edit .gcode to change INFILL speed

Actually - after reading your blog, a question came to mind: Is there a way to modify the default settings in the Prusa defaults to honor the 11.5mm/s volume rate? I've tried changing a few settings, but can't save the changes to the "default" settings. And yes, I can always make new items, but I like keeping it simple.

Veröffentlicht : 25/10/2018 10:47 pm
bobstro
(@bobstro)
Illustrious Member
Re: Edit .gcode to change INFILL speed


Actually - after reading your blog, a question came to mind: Is there a way to modify the default settings in the Prusa defaults to honor the 11.5mm/s volume rate?
Easiest is to just load one of the default profiles and saving it with your modified settings -- essentially doing a "save as". There are 2 places you can change the max volumetric speed setting:

  • Under Filament Settings->Advanced->Print speed override->Max volumetric speed it can be changed on a per-filament basis. Prusa uses this for their filament profiles. Prusa defaults PLA to 15mm^3/s, PETG to 8mm^3/s and other filaments to different speeds.

  • Under Print Settings->Speed->Autospeed->Max volumetric speed it can be changed for every print using that profile.
  • Either one has the same effect, with Slic3rPE honoring the lowest setting. I like to set it in print setting profiles to make sure every print has a maximum set. Slice your model, save the gcode then spend some time in Preview mode to see the effect. The great thing about setting MVS is that you don't need to make any speed adjustments. Slic3rPE will set speeds up to your chosen settings, but throttle when and if necessary. More detailed notes here.

    My notes and disclaimers on 3D printing

    and miscellaneous other tech projects
    He is intelligent, but not experienced. His pattern indicates two dimensional thinking. -- Spock in Star Trek: The Wrath of Khan

    Veröffentlicht : 25/10/2018 11:14 pm
    bobstro
    (@bobstro)
    Illustrious Member
    Re: Edit .gcode to change INFILL speed


    Reslicing would be an option, but my 'preprocess' is manually placing a lot of parts on the platter, and aligning very carefully to avoid "in-air" collisions. Result is one 24h print file instead of 8 separate 3h prints - I prefer something I can turn on and forget for a day.
    Once you've arranged all the parts, use Plater->Export as 3MF and it will save all the parts and settings for re-use. If you just want to save the parts as arranged, use Export as STL.

    My notes and disclaimers on 3D printing

    and miscellaneous other tech projects
    He is intelligent, but not experienced. His pattern indicates two dimensional thinking. -- Spock in Star Trek: The Wrath of Khan

    Veröffentlicht : 25/10/2018 11:27 pm
    --
     --
    (@)
    Illustrious Member
    Themenstarter answered:
    Re: Edit .gcode to change INFILL speed

    Lol - I've never used 3MF format, but saving settings along with platter is a nice feature. Thanks.

    I did find the Filament tab MVS setting. The MVS in the Filament tab doesn't appear to affect anything; e.g., setting it to 1mm/s the info text below it stays at 12.53mm/s;

    I hadn't found the second MVS under Print Settings, and if I change the it the info-text changes accordingly. Yahoo! Thanks^2

    Veröffentlicht : 26/10/2018 3:25 am
    bobstro
    (@bobstro)
    Illustrious Member
    Re: Edit .gcode to change INFILL speed


    [...] I did find the Filament tab MVS setting. The MVS in the Filament tab doesn't appear to affect anything; e.g., setting it to 1mm/s the info text below it stays at 12.53mm/s;
    It should have an effect. Try adjusting it, slice, save and spend some time in Slic3rPE's preview mode checking speeds and volumetric flow rate (notes at the bottom of this page). You should see consistent flow rates, and speeds adjusted as needed to maintain them. I use filament MVS settings for flexibles and materials that require slower rates for good finish.

    My notes and disclaimers on 3D printing

    and miscellaneous other tech projects
    He is intelligent, but not experienced. His pattern indicates two dimensional thinking. -- Spock in Star Trek: The Wrath of Khan

    Veröffentlicht : 26/10/2018 4:36 am
    --
     --
    (@)
    Illustrious Member
    Themenstarter answered:
    Re: Edit .gcode to change INFILL speed

    While the "notes" below the value don't change, the gcode file does reflect the speed being reduced.

    Default:
    M204 S1250
    G1 F10923
    G1 X181.699 Y123.300 E0.16098

    Print Settings MVS == 12mm/s
    M204 S1250
    G1 F8738.39
    G1 X181.699 Y123.300 E0.16098

    Filament Settings MVS == 12mm/s
    M204 S1250
    G1 F8738.39
    G1 X181.699 Y123.300 E0.16098

    Veröffentlicht : 26/10/2018 9:48 am
    --
     --
    (@)
    Illustrious Member
    Themenstarter answered:
    Re: Edit .gcode to change INFILL speed

    Also - just found a post related to rectilinear infill: the inner workings of Slic3r treat it differently to other infills, and the net result is rectilinear prints too thin. The issue is known, but evidently it's accepted, thus isn't going to be fixed any time soon. It all has to do with the incorrect assumption the infill is being printed on a previous layer, which isn't true. Thus, the volume extruded is 1/2 what is needed to actually fill the gap. This results in thin strands that stretch and break as the extruder moves across the part. Since infill also doesn't think about bridging that is happening...

    I'm left with the question of why rectilinear is so broken yet cubic fill seems to work - as do most of the other infill that extrude alternate directions per layer. Then again, not sure I've tried cubic at 5% or 7%.

    Veröffentlicht : 25/12/2018 8:58 pm
    Martin_au
    (@martin_au)
    Reputable Member
    Re: Edit .gcode to change INFILL speed

    Time to bust out grep.

    ;infill
    M204 S1250
    G1 F11017.8
    G1 X205.686 Y115.447 E0.01978

    (;infill\rM204 S[0-9]+\rG1 F)[0-9]+\.[0-9]

    replace with

    \1 15000

    Becomes
    ;infill
    M204 S1250
    G1 F15000
    G1 X205.686 Y115.447 E0.01978

    Veröffentlicht : 28/12/2018 4:24 am
    --
     --
    (@)
    Illustrious Member
    Themenstarter answered:
    Re: Edit .gcode to change INFILL speed

    @Martin: It's been so long since I used grep... lol. But doesn't that find only get single digits, not groups of numbers? Don't I need [0-9]* or something?

    Veröffentlicht : 28/12/2018 8:06 pm
    Martin_au
    (@martin_au)
    Reputable Member
    Re: Edit .gcode to change INFILL speed


    @Martin: It's been so long since I used grep... lol. But doesn't that find only get single digits, not groups of numbers? Don't I need [0-9]* or something?

    The entire combo for the speed is this.
    [0-9]+\.[0-9]
    So any number of digits, then a decimal, then a digit.

    However, it probably should have a + in case there is more than one decimal place.

    eg:
    (;infill\rM204 S[0-9]+\rG1 F)[0-9]+\.[0-9]+

    Veröffentlicht : 29/12/2018 1:52 am
    Teilen: