Need to lower the nozzle
-
@fcwilt / Kolbi and anybody else that chimed in - I now have recreated the issue that happens when babysteps are saved and the babystep value is zeroed.
The new offset ends up in config-overwrite.g but unless config.g is run it is never set and resetting the babysteps to zero brings the print nozzle to the same position that it started out as before the attempt was made to correct with babystepping.I will wait and see what DC42 has to say re the invalid G31 Z values before worrying about other things.
-
@jens55 AH, agree. This is way I said without homing Z afterwards, it is never realized. Thats why the latest version stops the user from doing such until the print is done.
-
Yes. my apologies and I edited my post to credit everybody.
I have lost track of who said what and with two threads going, I didn't want to look through everything, compare time stamps and figure out what the order of credits should be. -
@jens55 Yeah, its a bit confusing but fun.
But I do think my last revision is stable and safe. -
I just noticed that you put in a test for an active print job - good show!
If the issue that I am seeing is in the bowels of the code, it will sooner or later screw up something so although your code 'fixes' the symptom for this macro, I rather have the problem looked at and fixed (if possible). -
@jens55 Haha, no worries.
-
@jens55 said in Need to lower the nozzle:
@fcwilt / Kolbi and anybody else that chimed in - I now have recreated the issue that happens when babysteps are saved and the babystep value is zeroed.
The new offset ends up in config-overwrite.g but unless config.g is run it is never set and resetting the babysteps to zero brings the print nozzle to the same position that it started out as before the attempt was made to correct with babystepping.I will wait and see what DC42 has to say re the invalid G31 Z values before worrying about other things.
Can you use M98 to invoke config-overwrite.g in your macro?
Frederick
-
Oh oh ..... danger Will Robinson, danger, danger ....
The scenario ..... 20 hour print job and you are at 19:59. you are admiring your perfect print job that took 3 tries to get right. You realize you forgot to save the offset and hit the magic button.
The printer comes to a shuddering halt as it resets itself to activate the new values in config-overwrite.g.Visions of the users head slowly turning red, smoke pouring out of every orifice until .... his head explodes and you are left with a bloody and ragged neck on top of a lifeless body.
Printer merrily finishes it's reset and happily notifies the no longer exiting user that it is connected to the network and ready to print!
Hmmmm .... maybe I got carried away there but I can vividly (too vividly) see it in my mind!
-
-
You said you wanted the config-overwrite.g values to go live (execute) ... as far as I know that only happens when config.g is run which I am thinking is a printer reset.
Don't know .... but it invoked all kinds of horror scenarios in my mind.
Maybe I have been watching too many horror movies ?
Oh .... the previous scenario happened in a darkened basement full of spider webs -
Ok ok .... just had an actual look at the file and maybe the horror show was a bit over the top and your idea may just work .... but it's not giving us any entertainment value
-
@fcwilt said in Need to lower the nozzle:
Can you use M98 to invoke config-overwrite.g in your macro?
I don't think calling the config-overwrite.g would accomplish anything that this macro doesn't already do. Reason being is that the macro executes "G31 Z{sensors.probes[0].triggerHeight - move.axes[2].babystep} ; set G31 Z offset to corrected", and then executes "M500 P10:31" - so it would be the same.
Thats why I believe the print should be carried out to completion, then execute the save-z macro. This then could commit the z-probe change now via G31, save it to config-overwrite via M500 P10:31, then get the babystep cleared, and finally rehome to reflect the new perfected height.
Of course.... I could be wrong
But I do admit, I don't use the config-overwrite.g / I don't put M501 in my config.g - I just copy what I want out of the overwrite, change that data point in the config.g, erase the overwrite, and M999. With that, I save the M31 outcome to the currently employed filament's config.g and not the main 0:/sys/config.g.
-
@all, This is what I consider to be a solid, working, and safe solution. Let me know if you find any issues with it.
All the best,
Kolbi; 0:/macros/Save-Z-Baby ; This macro subtracts the current babystep offset from the current Z trigger height and informs the user what offset ; value to change the G31 Z metric to in the 0:/sys/config.g. Additionally, the macro issues a G31 command with the new ; calculated z-offset, clears the current babystepping, and then rehomes the machine to make the new z-offset effective. ; If this is for a specific filament type, recommend placing this yielded information in the filament's config.g - not ; the 0:/sys/config.g. if state.status != "processing" ; Printer is not currently printing! if move.axes[2].babystep !=0 ; If no babysteps are currently adjusted - exit routine echo {"Previous Z probe trigger height: " ^ sensors.probes[0].triggerHeight ^ ", New: " ^ sensors.probes[0].triggerHeight - move.axes[2].babystep} echo {"Edit the G31 command in your config.g with a new Z offset of: " ^ sensors.probes[0].triggerHeight - move.axes[2].babystep} M291 P{"Set probe offset to " ^ sensors.probes[0].triggerHeight - move.axes[2].babystep ^ ", clear babysteps, and REHOME ALL?"} R"!WARNING! Do not proceed if printing!" S3 M400 ; finish moves / clear buffer G31 Z{sensors.probes[0].triggerHeight - move.axes[2].babystep} ; set G31 Z offset to corrected M500 P10:31 ; save settings to config-overide.g - G31 P31 saves trigger height M290 R0 S0 ; set babystep to 0mm absolute G28 ; home all M291 P"Ensure M501 exists in 0:/sys/config, or manually edit the G31 Z offset, to make this change permanent." R"Note on making change permanent." S3 else echo "Babystepping is not currently active, nothing to do." else M291 S2 P"This would be detrimental to the ongoing print. Please run this macro when the print is finished, and the bed is clear & ready for the homing sequence to be conducted." R"WARNING"
-
@jens55 said in Need to lower the nozzle:
have the problem looked at and fixed
Good job on the persistence