Does anyone use M120 or M121?
-
That script is a nice little post for PrusaSlicer. And not only for Toolchangers but any IDEX or multihead rigs..
-
@MaracMB I was able to use SuperSlicer (PrusaSlicer fork) with an IDEX without the need for any postprocessing ... regarding M120/121 -- I had looked into using them in homing macros to save state before and after sensorless homing, but the set of settings saved and restored simply didn't match. So I never used them.
-
@oliof and it preheated hotend before toolswap?
It is not the ability to use, it’s the additional functionality it gives. You can use any slicer with IDEX, that’s not the point -
@MaracMB said in Does anyone use M120 or M121?:
@dc42 please don’t remove push and pop. It is used for python post scripts that enable toolchanger post script by mkudzia84 to work.
If you mean this usage:
;; TOOL_BLOCK_END:{previous_extruder} T{next_extruder} M120 M98 P"prime.g" M121 ;; TOOL_BLOCK_START:{next_extruder}
then M120/M121 is redundant in that context, because of the implicit push/pop around any macro call.
-
@dc42 ok. Great then
-
It turns out that DWC uses M120/M121 for good reason. So I won't remove them any time soon.
-
@dc42 I was about to say it is used in DWC and I use it in a similar fashion in my gamepad jogger plugin.
-
@MaracMB said in Does anyone use M120 or M121?:
and it preheated hotend before toolswap?
Ah, that's nice!
-
@dc42 said in Does anyone use M120 or M121?:
... a push and pop are done around the macro call automatically.
What will happen to a variable that was changed by a macro, will its old value be restored by the pop?
-
@dc42 Since you're keeping m120/m121, does this delay your implementation of variables significantly?
-
@ctilley79 said in Does anyone use M120 or M121?:
@dc42 Since you're keeping m120/m121, does this delay your implementation of variables significantly?
Only by a few hours, I hope.
-
This post is deleted! -
@dc42 said in Does anyone use M120 or M121?:
It turns out that DWC uses M120/M121 for good reason. So I won't remove them any time soon.
With variable declaration, I believe @chrishamm and anyone else can write their own push/pop routine and store/restore any variable they like?
-
PanelDue also use M120/M121 gcodes
case evExtrude: case evRetract: if (currentExtrudeAmountPress.IsValid() && currentExtrudeRatePress.IsValid()) { SerialIo::Sendf("M120 M83 G1 E%s%s F%s M121\n", (ev == evRetract ? "-" : ""), currentExtrudeAmountPress.GetSParam(), currentExtrudeRatePress.GetSParam()); } break;
-
did, but I can remove them all easily utilizing that "any time that a macro is called a push and pop are done around the macro call automatically" ... most of them I have on start and exit of the macro so if that's done automatically ..
-
With variable declaration, I believe @chrishamm and anyone else can write their own push/pop routine and store/restore any variable they like?
Possibly, but they should have at least one release where they can test old and new version to make sure they behave identically.
Deprecation always is tricky.