Help me understand my M350/M92 commands (steps/microstepping)
-
OK, so from my config.g I have:
M350 X128 Y128 Z32 E64 I1 ; Set microstepping with interpolation
M92 X1600 Y1600 Z3000 ; Set axis steps/mm. This is for the 0.9 degree steppersI should say that this is all working just fine. There's no problem here, but I want to re-arrange these in accordance with what I read yesterday in the docs, as referred to in another post here.
My understanding of what's in my config.g file is that with the M350 command first, I'm having to specify the M92 with the correctly calculated steps/mm, whereas if I put the M92 command in first using just the non-microstepping steps/mm, the M350 command will automatically recalculate the steps based on whatever microstepping I specify in the M350 command.
Since my printer is working properly, I can conclude that my M92 values are currently correct.
I also learned yesterday through reading threads here and in the docs that my I1 is having no effect (Duet Wifi here) because interpolation only takes effect with microstepping set to 16x, and all of my axes are currently at values higher than that.
Since my printer is working fine, and is pretty quiet (though not totally silent especially on fast travel moves) I should in theory leave well enough alone. Being a tinkerer, however, I just can't do that.
So I'd like to move my M92 command in front of the M350 command, and then be free to set different values in M350 for the various axes to try out different microstepping levels, maybe go 16x and let 256x interpolation work to see what difference that makes, etc. without having to recalculate M92 each time.
Here's what's bugging me: to set M92 before M350 I need to know what the non-microstepping steps are, and I am unsure if I'm understanding these values correctly. My first read is that I should simply divide the current M92 values by whatever level of microstepping I have set up in my current M350 command, but that leaves some pretty small values. For instance, X and Y axes have X128 Y128 set in M350, and X1600 Y1600 set in M350. Dividing the two would give me M92 X12.5 Y12.5, which seem very low. The printer is a D-Bot (CoreXY) with the standard 16-tooth pulleys on the X/Y steppers, which as of last week are 0.9-degree/step steppers (my E-stepper and Z-stepper are both still 1.8-degree steppers, and both have gear or belt reduction).
My e-steps are currently set in a separate line, which is:
M92 E1660:1660 ; esteps for 64x microstepping and the fake Bondtech BMG extrudersIf my understanding is correct, then my M92 command placed before the M350 command would be:
M92 X12.5 Y12.5 Z93.75
M92 E25.9375:25.9375Those values look wonky to me, especially the e-step value. 1660 doesn't look like it should make sense, but when extruding into thin air (not pushing into the hotend) I get as close to 100mm of filament out my bowden tube for a 100mm extrusion command as I can measure it with a ruler, so that's what's in there. I suppose I could extrude 500mm instead and cut the error margin down further with a more exact value, but haven't done that.
So firstly: am I understanding this correctly?
I just noticed that I've only specified one extruder in my M350 command, but two extruders in my M92 command, since I've got two extruders. Since I've still never used the second extruder the printer's been working fine, but I recognize that the M350 should be changed to E64:64 to be correct.
If I'm understanding this all correctly then I should change all this to:
M92 X12.5 Y12.5 Z93.75
M92 E25.9375:25.9375
M350 X128 Y128 Z32 E64:64 I1Knowing that the I1 isn't actually meaningful with those settings, which would have to change some axis to 16x microstepping in order for interpolation to occur.
I could just try this right now (not literally right now since I'm in the middle of a print), but I'd like to avoid sending my print gantry crashing into the frame if I'm wrong, and I'd like to ensure that I'm actually understanding this correctly, not just going on trial and error.
I'm thinking once these values are correctly set I may experiment with M350 X16 Y16 first to let interpolation go into effect and see if it makes any difference. As my Z and E are both reduced (4:1 I believe in the case of the extruder and I forget what pulleys I used in my Z, but it could be 3:1, I'd have to count the pulley teeth). With the gear reductions in Z and E I think the current values are already very fine, so not sure what real advantage would accrue with 16x + interpolation to 256 with those, though I'd probably give them a try.
Anyhow, am I on the right track?
-
@sethipus You are sort of on the right track but no quite there. The default values for M92 are at 16x micro-stepping, not whole steps. So for example the default value for your x axis which is set to 1600 using 128x would be 1600/128x16 = 200. Which is correct for 16 tooth pulleys and 0.9 degree motors and you would use M92 X200 . Your extruders which you have set to 1660 using 64 x micro stepping would be 1660/64*16 = 415 which looks very much like the default value that Bondtech recommend. So for your extruders you would use M92 E415:415 etc.
To be absolutely "belt and braces", I always use M350 X16 Y16, Z16 E16:16 etc before the M92. Then I change M350 again after that M92. Its just a habit of mine to explicitly set things to their default values. It's not strictly necessary but it does serve as a reminder.
-
@deckingman, this was awesome, thanks!
I recognized "belt and braces" as a figure of speech, but didn't directly understand it, though from context I understood its meaning to be to be doubly sure. Being the curious type I looked it up, and it's a figure of speech in the UK referring to the use of both a belt and braces to hold up one's trousers, ie: make doubly sure they won't fall down. The sticking point linguistically for me was that we refer to braces in the US as "suspenders." Interesting tidbit. I interpret your caution here to mean that you don't want to just assume that M92 will calculate its values based on a 16x default (who knows, future drivers may change that) so you set everything to 16x in M350 prior to the M92 to ensure that that in fact is the basis for the setting, and then follow it within another M350 in order to set whatever microsteps/interpolation that you wish to actually use. Seems prudent to me, and I shall copy the practice myself.
When the current print is done I'll change my config.g as follows:
M350 X16 Y16 Z16 E16:16 ; confirm 16x defaults
M92 X200 Y200 Z256 E415:415 ; set steps according to 16x defaults
M350 X128 Y128 Z32 E64:64 I1 ; set steps to actually use, system will automagically recalculate stepsSubsequent to that I can feel free to change M350 values to alter axes' microsteps to my heart's content, with no need to manually recalculate M92. If there's no drawback it's possible I'll just set all axes to 16x and let interpolation happen with them, but it's likely I'll do that in stages so I can see the effects on individual axes as I make the changes. I'm actually curious whether little surface texture artifacts that I see will change with the extruder going from 64x microstepping to 16x with 16x interpolation.
Again, thanks for the help!
-
X16 with interpolation is definitely quieter and sounds smoother than using other microstepping values. At least on my machine.
As you're playing around with microstepping keep an eye on the hiccup count in the M122 report. If you're getting a few hiccups reported it would indicate you're exceeding the step rate limit.
-
@phaedrux said in Help me understand my M350/M92 commands (steps/microstepping):
X16 with interpolation is definitely quieter and sounds smoother than using other microstepping values. At least on my machine.
As you're playing around with microstepping keep an eye on the hiccup count in the M122 report. If you're getting a few hiccups reported it would indicate you're exceeding the step rate limit.
I've got a print running right now where I just set X and Y to 16x with interpolation, and it does indeed sound a little quieter. It was pretty quiet before, but it's definitely a little quieter.
Btw, there was an error in my previous post. My Z steps for default needed to be 1500, not 256. Doh! I figured it out midway through the second layer of course. I've got multiples of the current print to make, so I'll set everything else to 16x with interpolation after this one and have some basis for comparison. I'm also happy inside that my config.g is a little more rigorous and sensible, even though it previously worked.
-
@Phaedrux Btw just got my gt2 Gates belt, and I've reprinted the left and right rear corner braces where the pulleys go with a remixed version that allows the pulleys to be replaced without having to disassemble the whole top of the frame. Doh! Can't believe the original design has the lower pulley screws facing down. For good measure I also printed out versions of the stepper mounts that allow the belts to be tightened at the stepper motor, rather than at the print carriage. Either tonight, or latest this weekend, I'll pull the whole top end apart and rebuild it, replacing the four corner pieces, and using the original smooth bearings in place of the toothed pulleys I've got in there now, and using the twist of the belt to keep the flat belt backs against the flat bearing/pulleys. Assuming this was always the source of my "corduroy" pattern artifacts, my prints should come out better than ever.
I've never used M122 before. I'll have to add it to my ending scripts and get that output as default from now on. Sounds like a useful diagnostic.