[FEATURE][IM-3.1.7]M221 settings

Discussions about ideaMaker and other printing software.
Posts: 6
Joined: Mon Feb 19, 2018 10:13 am

[FEATURE][IM-3.1.7]M221 settings

Postby WTFMacca » Mon May 14, 2018 12:41 am

Title: M221 command created in Gcode
Version: 3.1.7
Operation System: OXS
Reason: To have flow rate set to what machine like as to not have to manual adjust
Printer: Custom i3 Clone running marlin.

When Ideamaker makes Gcode it uses the M221 command to set the flow rate.


Code: Select all

;Sliced by ideaMaker, 2018-05-14 10:33:21 UTC+1000
;Dimension: 220.000 220.000 190.000 0.400
;Extruder Offset #1: 0.000 0.000
;Filament Diameter #1: 1.750
;Filament Diameter #2: 1.750
;Filament Compensation #1: 102.00
;Filament Compensation #2: 102.00
;Filament Density #1: 1300.00
;Filament Density #2: 1300.00
;Model Gap: 0.000
M221 T0 S102.00
M107 ;turn off fan
M117 Auto Level

What setting in ideamaker can I change this in?

Cant seem to find it easy, eg for one filament I need my flow rate to be 97% and a different one 85%

Posts: 6
Joined: Mon Feb 19, 2018 10:13 am

Re: [FEATURE][IM-3.1.7]M221 settings

Postby WTFMacca » Mon May 14, 2018 12:46 am

Yeh, Im silly I found it in the filament settings tab.

So blind.

So my next question would be in custom settings when you call for the first layer to be set at a different command would that be 85% of the initial flow rate or 85% absolute?

looking at the gcode M221 is only called at the beginning and end of the created code

Posts: 2710
Joined: Tue Mar 22, 2016 1:40 am
Location: In a van, down by the river

Re: [FEATURE][IM-3.1.7]M221 settings

Postby Jetguy » Mon May 14, 2018 12:52 am

Correct, because individual settings for a layer adjust the actual Gcode E extrusion lengths.

This is how every other slicer on the planet pretty much works, but once again, a situation where Ideamaker just has to be different and throw a global command at the start, mixed in with gcode E length math mixed in just for good measure.

Posts: 2710
Joined: Tue Mar 22, 2016 1:40 am
Location: In a van, down by the river

Re: [FEATURE][IM-3.1.7]M221 settings

Postby Jetguy » Mon May 14, 2018 1:05 am

Again, gcode/3D printing slicing 101

You give the slicer extrusion width, layer height, and the STL.
It slices it at that layer height and created individual gcode segments paths based on the extrusion width.
Those values represent a volume of logical space for that segment.
You also give the slicer one other key number -filament diameter
From that, it says it takes X linear length of your filament diameter to equal the same logical volume (height, times width, times length) of that segment and that's how it gets the ideal E length for that segment.

But, this assumes your printer is properly E step calibrated, that the filament diameter in the slicer exactly matches your actual filament loaded, your nozzle is actually the non worn out size to make that extrusion width.
When any and all of those variables is slightly off, then a flowrate adjustment can be made anywhere in this process

You can have it post process every line of gcode and adjust E by a percentage in the slicer and again, this results in the gcode file being encoded with longer or shorter than "perfect ideal" E lengths in compensation for not properly having an adjusted printer or some other error.

You can send an M221 or adjust it on the LCD which BTW, does the same thing, and the FIRMWARE reading each line of gcode knows to adjust the E length actually commanded the extruder feeder stepper more or less than the commanded E length in the print file.

Or, you get this double acting method, where a GLOBAL Firmware M221 is applied, and then also at the slicer, for certain layers and features, the slicer raises or reduces the segment E lengths, and then the M221 FURTHER modifies that when the fimrware reads the line of gcode and tells the stepper to move.

Most other slicers; Cura, Slic3r, S3D, Mattercontrol....
They all just multiply percentage against the final gcode thus encoding the file. Your printer then prints 1:1 the Elength in the file unless you manually go to the LCD and basically adjust FIRMWARE flowrate to further compensate for bad E steps calibration or filament that did not match the slicer filament diameter at the time of slicing.

Posts: 2710
Joined: Tue Mar 22, 2016 1:40 am
Location: In a van, down by the river

Re: [FEATURE][IM-3.1.7]M221 settings

Postby Jetguy » Mon May 14, 2018 1:36 am

Basically, I want to set you and everyone else up for success.

#1 The most important rule in 3D printing is not unlike good housekeeping rules. You put away and reset back where it was anything you changed during the starting gcode by resetting it to an expected default in the ending gcode.
What is happening here, is that Ideamaker produced gcode and standard default profiles in it, will produce a gcode with potentially an M221 command at the start of a print that is NOT 100% flow rate. We also kind of now have the same problem with the fans as another topic, so I'm covering both for you since you may not have read that.
Why is this bad?
Well, the end of the print, the standard ending gcode is NOT returning these values to a known default.
Most other slicers- generally do not add and is not standard in most simplified starting gcode and assumes the printer defaults to 100% flow rate. So where you the user get screwed over here, is if you use both Ideamker and say another more normal slicing software and switch back and forth.
Again. the scenario is, you print a file with ideamaker and it sets the firmware active flow rate to say 90%. Then you print a Cura produced gcode file for your printer and it's now under extruded by 10% because the firmware was set by the previous ideamaker print job and then left at a less than 100% flow rate.

So what this means is, you have to develop a better system until they get this sorted out.
You need to add M221 S100 to the starting gcode of your other slicing software profiles so that they are reseting and ensuring rather than the common assumption that flow rate defaults to 100% in firmware.
You need to edit your ideamaker end gcode profile so that it properly resets the printer to 100% flow rate in case a lower flow rate is either commanded or inlcuded in the starting gcode.

The whole idea is that the firmware flow rate is meant to be a live while printing- oh crap, I'm under extruding because my filament doesn't match the setting used in the print file so I can live tune the flow rate. The assumption is 100% and lesser percentage reduces the flow rate in cases of over extrusion and over 100% extrudes more plastic to compensate for under extrusion.

Again, what you get here is ideamaker has bad habits, and in a mixed software and workflow environment, really wreaks havoc. Every other slicer just modifies the individual lines of gcode E lengths. Ideamaker both adds an M221 and edits lines of gcode for certain things. Worse, it can leave that altered M221 flow rate in active firmware memory and interfere with another slicers produced gcode because of bad housekeeping habits (not defaulting back o 100% flow rate at the end of the ideamaker produced print). So if you print say a Cura file first after booting your printer- you get the default 100% flow rate in firmware and the printer follows the gcode 1:1. If you first print an ideamaker file and don't add this ending M221 S100 and then also ensure you add it in your other 3rd party slicers, you can get where ideamaker set and left an altered flow rate, and then your perfectly fine print file suddenly over or under extrudes because of the previous print jobs flow rate left in active memory.

The fan thing is kind of the same problem for the gcode controlled print fan. Now, they also appeared to add some smart fan control that may alter fan speed mid print based on feed rate in a given layer. Kind of discussed here an unannounced feature that crept in. viewtopic.php?f=3&t=6299&start=60

Just saying, both of these (flow rate and fan settings) they affect user even not with Raise 3D printers.

Return to “Software”

Who is online

Users browsing this forum: No registered users and 2 guests