Suggestion for change to implementation of baby-steps
-
@dc42 said in Suggestion for change to implementation of baby-steps:
.........................For most purposes, it's the user position that the user is interested in. If a user commands the head to X10 Y20 Z5 then it would appear odd if the reported position is something different. So it's the user position that DWC displays....................
Personally, I don't give a damn as I don't have a need to use baby stepping. But, I think this is what the OP is complaining about. That is to say, if the user presses the baby stepping buttons to essentially command the head to move from say Z5 to Z4.5 then DWC still displays the position as being Z5.0 even though it is actually 4.5. I guess it depends on whether baby stepping is defined as a move command.
So we have the situation where DWC shows the Z height without the offset (5.0) and also displays the offset (0.5). But then if the printer is homed still with this 0.5 offset applied, then after homing DWC will show the Z position as being 5.5 (i.e the Z position plus the offset) and also still shows the offset as being 0.5.
So there is an inconsistency in how DWC displays the Z height depending on whether the printer is homed before or after baby stepping is applied. Maybe that's how it is but
I can see how this would get confusing. i.e. prior to homing DWC displays the Z position without the offset, but then if the printer is re-homed, it shows the Z position including the offset. The offset value itself does not change when homing happens.So how can an end user know where the print head is in relation to the bed if the displayed value changes depending on whether the printer was homed prior or after the baby stepping buttons were pressed?
As I said, personally I don't give a damn as I don't use baby stepping so I'll leave any further debate to others.
-
@deckingman said in Suggestion for change to implementation of baby-steps:
So how can an end user know where the print head is in relation to the bed if the displayed value changes depending on whether the printer was homed prior or after the baby stepping buttons were pressed?
You make it sounds as though the displayed value for a given actual position depends on whether you home before or after babystepping; but that's not the case. Suppose your Z probe or Z endstop triggers at 5mm. If you home and then apply 1mm babystepping, the head will initially be at 5mm but after you apply the babystepping it will have been raised to 6mm. If you then home Z again, the head will be at 5mm above the bed (not 6mm) but 4mm will be displayed.
All this ignores the fact that if you have a tool offset applied, or bed compensation applied, the height will be further adjusted.
Perhaps one option would be for DWC to display the baby stepping offset alongside the Z coordinate.
-
@dc42 said in Suggestion for change to implementation of baby-steps:
@deckingman said in Suggestion for change to implementation of baby-steps:
So how can an end user know where the print head is in relation to the bed if the displayed value changes depending on whether the printer was homed prior or after the baby stepping buttons were pressed?
You make it sounds as though the displayed value for a given actual position depends on whether you home before or after babystepping; but that's not the case. Suppose your Z probe or Z endstop triggers at 5mm. If you home and then apply 1mm babystepping, the head will initially be at 5mm but after you apply the babystepping it will have been raised to 6mm. If you then home Z again, the head will be at 5mm above the bed (not 6mm) but 4mm will be displayed.
All this ignores the fact that if you have a tool offset applied, or bed compensation applied, the height will be further adjusted.
Perhaps one option would be for DWC to display the baby stepping offset alongside the Z coordinate.
Sorry David but it is the case that the displayed value for Z depends on whether you home before or after baby stepping is applied. At least on my machine that's what happens.
So in your example and in my actual usage case, I home Z at the end of which the head is at 10.00mm above the bed - actual real distance and that's what DWC shows. The trigger height is actually 0.4mm but that's irrelevant.
Then I apply baby stepping repeatedly - actually 10 times - moving the bed downwards away from the nozzle. The bed moves each time, the current offset increments each time, but the head position for Z does not change. It stays at Z = 10.00mm. After 10 presses of the baby stepping button, the bed has moved 0.5mm further away from the nozzle, the current offset shows this 0.5mm but DWC still shows Z =10.00. At this point, the head position is actually 10.50 mm from the bed.
So at this point, the displayed value for the actual head position is 10.00mm but the actual head position is 10.50 mm from the bed.
Now, if I home Z again, without doing anything else - leaving the baby stepping offset at 0.5mm, after the homing sequence finishes, the displayed value of head position is Z=10.50mm.
So the displayed value of actual head position in Z was 10.00 mm prior to homing, but it changed to 10.50 mm after homing.
-
@deckingman said in Suggestion for change to implementation of baby-steps:
Then I apply baby stepping repeatedly - actually 10 times - moving the bed downwards away from the nozzle. The bed moves each time, the current offset increments each time, but the head position for Z does not change. It stays at Z = 10.00mm. After 10 presses of the baby stepping button, the bed has moved 0.5mm further away from the nozzle, the current offset shows this 0.5mm but DWC still shows Z =10.00. At this point, the head position is actually 10.50 mm from the bed.
So at this point, the displayed value for the actual head position is 10.00mm but the actual head position is 10.50 mm from the bed.So far, this is as I expect. The user Z coordinate is 10mm and you have applied +0.5mm babystepping.
Now, if I home Z again, without doing anything else - leaving the baby stepping offset at 0.5mm, after the homing sequence finishes, the displayed value of head position is Z=10.50mm.
So the displayed value of actual head position in Z was 10.00 mm prior to homing, but it changed to 10.50 mm after homing.Are you sure? That sounds the wrong way round to me. If you apply positive baby stappering, and then you home Z using a Z probe and optionally perform a relative Z move afterwards, then the displayed height after homing should be reduced by the babystepping amount. Which is what happens on my delta. The displayed Z coordinate after homing the second time in your example should be 9.5mm.
-
Might have got that wrong. As I said, I don't normally use baby stepping. I thought I was lowering the bed when in fact the buttons relate to the tool head so the downward pointing icon actually moves the bed up. Therefore I was applying a negative offset hence 10.50 mm. And after homing with the offset, jogging the axis will only allow me to go to Z=0.5mm and no lower which I guess is to be expected.
Personally, I find it confusing that the displayed Z value changes depending on whether baby stepping is applied before or after homing but if that's the way it is, then fine. I don't use it so I don't really care.
-
@dc42 He is correct that the Z indicator doesn't show the actual position. If I baby step 100mm from position 5, it will always display 5.
I've said this before, but it doesn't seem to have weight with you, there are MANY more workflows than: click, print, finish.
Follow this...
I expect you to say to add baby step reset to the stop.gcode or to the slicer, but then that would defeat the ability to re-use the value.
And, since baby-steps impact, but not stored value, are transient between homings, as they are just a value applied, with no impact on the actual z height measure, you have to also reapply them between prints if even you don't reset them.
If we see a pattern and that we always need -.15 baby-step, you'll say to apply that offset in the config, but that can be filament specific. So you say, that's fine, keep it global, but when you use a differing filament, adjust the baby-step for that print. That only works for one print if you home between prints. So you say remove re-homing between prints. Well, I have a printer in development that may not be reliable, so I need to re-home between prints.
You see the cycle here? It's like the Three Stooges file cabinet. It's a never ending cycle of work arounds. if the baby-step was part of the z-height register AND remembered to be applied to the offset of the beginning position of a print, all of these situations would be handled without workarounds. Sure, if it seems to be a permanent need, put it in the config. But I don't want to stop what I'm doing, update the config, reset the printer, lose my heat, and start over. Maybe baby-stepping can store to its own file so it persists between reboots.
Like I said, the Live-Z Marlin feature just never fails, it never complicates things. Homing will always trigger at the same height, but the live-z offset both gets applied to the gcode for printing as well as effects the z-height register.
-
@gnydick said in Suggestion for change to implementation of baby-steps:
reset the printer, lose my heat, and start over.
You're gonna hate me saying this, but you don't have to reset the printer. You can send the updated G31 through the gcode console and it will take effect immediately.
-
@gnydick said in Suggestion for change to implementation of baby-steps:
@dc42 He is correct that the Z indicator doesn't show the actual position. If I baby step 100mm from position 5, it will always display 5.
I've said this before, but it doesn't seem to have weight with you, there are MANY more workflows than: click, print, finish.
Follow this...
I expect you to say to add baby step reset to the stop.gcode or to the slicer, but then that would defeat the ability to re-use the value.
And, since baby-steps impact, but not stored value, are transient between homings, as they are just a value applied, with no impact on the actual z height measure, you have to also reapply them between prints if even you don't reset them.
If we see a pattern and that we always need -.15 baby-step, you'll say to apply that offset in the config, but that can be filament specific. So you say, that's fine, keep it global, but when you use a differing filament, adjust the baby-step for that print. That only works for one print if you home between prints. So you say remove re-homing between prints. Well, I have a printer in development that may not be reliable, so I need to re-home between prints.
You see the cycle here? It's like the Three Stooges file cabinet. It's a never ending cycle of work arounds. if the baby-step was part of the z-height register AND remembered to be applied to the offset of the beginning position of a print, all of these situations would be handled without workarounds. Sure, if it seems to be a permanent need, put it in the config. But I don't want to stop what I'm doing, update the config, reset the printer, lose my heat, and start over. Maybe baby-stepping can store to its own file so it persists between reboots.
Like I said, the Live-Z Marlin feature just never fails, it never complicates things. Homing will always trigger at the same height, but the live-z offset both gets applied to the gcode for printing as well as effects the z-height register.
You seem to be saying that the baby stepping offset is somehow remembered over homing but not actually applied. I don't believe that is the case; but I'm willing to be persuaded if you can provide a sequence of GCode commands (+ manual checking of nozzle height if needed) to demonstrate it. The other possibility that occurs to me is that you are homing to max Z and your printer is gradually getting hotter and expanding, so that you need increasing amounts of negative babystepping to counter the expansion.
-
@dc42 Baby-stepping is remembered after homing. Here's the simple sequence...
G28 ; home G1 X150 Y150 Z0 ; roughly middle of the bed with nozzle touching M290 S5 G28 Z ; re-home Z G1 Z0 ; bring back the bed to the nozzle M290 R0 S0 ; ***ENJOY THE CRASH***
-
@gnydick said in Suggestion for change to implementation of baby-steps:
@dc42 Baby-stepping is remembered after homing. Here's the simple sequence...
G28 ; home G1 X150 Y150 Z0 ; roughly middle of the bed with nozzle touching M290 S5 G28 Z ; re-home Z G1 Z0 ; bring back the bed to the nozzle M290 R0 S0 ; ***ENJOY THE CRASH***
What should happen is that the G1 Z0 command should leave the head at 0 + 5mm = 5mm above the bed. Then M290 R0 S0 should lower the head to the bed. Is that not what happens? How are you homing Z?
-
For info, I just tried this out on my machine. It seems to work as you say with one exception. When I input M290 S5, I only get an offset of 1mm. I'm guessing that there is a 1mm limit on baby stepping? If not, then something is amiss.
Anyway, here is what I got......
G28; home all - after which....
Measured nozzle height =10.00mm (as expected with the commands I use)
DWC shows Z= 10.00
Baby stepping offset shows 0 mm.G1 Z0 - after which......
Measured nozzle height =0mm
DWC shows Z= 0.00
Baby stepping offset shows 0 mm.M290 S5 - after which....
Measured nozzle height =1.0mm
DWC shows Z= 0.00
Baby stepping offset shows 1 mm.G28 Z - after which
Measured nozzle height =10.0mm
DWC shows Z= 9.00
Baby stepping offset shows 1 mm.G1 Z0 - after which
Measured nozzle height =1.0mm
DWC shows Z= 0.00
Baby stepping offset shows 1 mm.M290 R0 S0 - after which
Measured nozzle height =0.0mm
DWC shows Z= 0.00
Baby stepping offset shows 0 mm.HTH
Edit. This is just for your info - I don't use baby stepping myself but I had a few minutes to spare so ran those tests.
-
@deckingman said in Suggestion for change to implementation of baby-steps:
For info, I just tried this out on my machine. It seems to work as you say with one exception. When I input M290 S5, I only get an offset of 1mm. I'm guessing that there is a 1mm limit on baby stepping?
Thanks for running this test. There is indeed a limit of 1mm in any babystepping command, unless you use the R0 parameter to specify an absolute babystepping offset.
Do you home Z using a homing switch or a Z probe? It might make a difference.
-
@dc42 said in Suggestion for change to implementation of baby-steps:
Do you home Z using a homing switch or a Z probe? It might make a difference.
That depends on your definition. Essentially it's a switch connected to the nozzle mount which can move in Z, so the nozzle is the probe. But because the switch has an LED in series, I have to use it as an analogue switch. I get a reading of about 524 when it isn't triggered and 1000 when it is.
Here is relevant line from my config.g
G31 P700 X0 Y0 Z-0.4Edit. Ohh and M558 P1 X0 Y0 Z1 F180 T6000 I0 (so yes, a P1 type probe).
-
conditions here are that this is a moving bed with a switch at Z-max.
That's not happening at all. When you home, the firmware automatically sets the Z position to the max. If baby-stepping is still on, your bed will indeed be at the correct max position. If you then G1 Z0, you will indeed position the bed at Z0. Then you reset baby-steps, and the bed tries to move opposite to the baby-steps. If it was positive baby-steps, the bed will crash into the nozzle. If it was negative baby-steps, the bed will move away from the nozzle.
-
Just trying to get my head around this but wondering if you home to Z max, then do M290 S5, the bed would be constrained by the axis limit as defined in M208 which would prevent it from actually moving any further? But the baby-stepping offset might behave as if the bed had moved?
So maybe the problem exists only if you home to Z max?
-
@gnydick said in Suggestion for change to implementation of baby-steps:
conditions here are that this is a moving bed with a switch at Z-max.
That's not happening at all. When you home, the firmware automatically sets the Z position to the max. If baby-stepping is still on, your bed will indeed be at the correct max position. If you then G1 Z0, you will indeed position the bed at Z0. Then you reset baby-steps, and the bed tries to move opposite to the baby-steps. If it was positive baby-steps, the bed will crash into the nozzle. If it was negative baby-steps, the bed will move away from the nozzle.
Please share your homing files.
-
homex
; homex.g ; called to home the X axis ; ; generated by RepRapFirmware Configuration Tool v2 on Fri Feb 08 2019 11:10:07 GMT-0800 (Pacific Standard Time) G91 ; relative positioning G1 Y50 S1 ; avoid pulley in corner ;G1 Z-5 F6000 S2 ; lift Z relative to current position G1 S1 X293 F1800 ; move quickly to X axis endstop and stop there (first pass) G1 X-5 F6000 ; go back a few mm G1 S1 X293 F360 ; move slowly to X axis endstop once more (second pass) ;G1 Z5 F6000 S2 ; lower Z again G90 ; absolute positioning G92 X275
homey
M913 X40 Y40 ; reduce current ; generated by RepRapFirmware Configuration Tool v2 on Fri Feb 08 2019 11:05:47 GMT-0800 (Pacific Standard Time) G91 ; relative positioning ;G1 Z-5 F6000 S2 ; lift Z relative to current position G1 S1 Y365 F1800 ; move quickly to Y axis endstop and stop there (first pass) G1 Y-5 F6000 ; go back a few mm G1 S1 Y365 F360 ; move slowly to Y axis endstop once more (second pass) ;G1 Z5 F6000 S2 ; lower Z again G90 ; absolute positioning M913 X100 Y100 ; restore current
homez
G91 G1 Z400 S1 F1500 G1 Z-5 G1 Z10 S1 F100 G90
-
@gnydick, thanks. I've just tested homing to max Z with 5mm of baby stepping applied. Specifically, I did this (from bottom to top):
20/03/2019, 15:36:50 M114
X:0.000 Y:0.000 Z:195.000 E0:0.0 E1:0.0 E2:0.0 E3:0.0 E4:0.0 E5:0.0 E6:0.0 Count 0 0 40000 Machine 0.000 0.000 200.000
20/03/2019, 15:35:28 G1 S1 Z400
20/03/2019, 15:35:13 G91
20/03/2019, 15:35:05 M208 Z200
20/03/2019, 15:34:34 M574 Z2 S1
20/03/2019, 15:34:14 M290
Baby stepping offset is 5.000mm
20/03/2019, 15:34:12 M290 Z1
20/03/2019, 15:34:12 M290 Z1
20/03/2019, 15:34:11 M290 Z1
20/03/2019, 15:34:10 M290 Z1
20/03/2019, 15:34:07 M290 Z1
20/03/2019, 15:33:51 G92 X0 Y0So I applied +5mm of baby stepping, then I homed to max Z, which I had set to 200 in M208. After this the Z coordinate reported by both DWC and M114 was 195, as expected (i.e. user position +195, plus 5mm baby stepping, gives a machine position of +200).
All this is exactly as expected. When I originally implemented baby stepping, I reset it to zero when you homed Z. but at the request of several users, I changed it to persist across homing. It is still reset to zero at power up.
If you want to reset baby stepping during homing, or at the end of each print, you can do that by adding command M290 R0 Z0 in one or more of homez.g, homeall.g, stop.g and cancel.g.
You might with to do a similar test to mine, i.e. apply +5mm bay stepping, then home Z to max. You said that you have Z max set to 300mm, so you should find the that displayed Z coordinate after homing Z is 295. If you then command the nozzle to Z0, it should be 5mm above the bed.
-
@dc42 i see what you're saying. I just did that little experiment right now, but in practice it hasn't worked that way. I don't know if having printed changes the internal flow somehow.
-
Having printed should not change anything, assuming that the print file didn't have any M290 commands in it.