G92 behavior affected by M208 ???
-
Hi,
The following works as expected:
M208 X-5.5 Y-15.3 Z0 S1 ; set axis minimum as 0
G28 Z0 ;home Z I use a limit switch under the bed as a Z probe so Z home is a few mm above the bed
G1 Z-1 F100 ; for example after homing move down 1mm closer to bed
G92 Z0 ;set the current Z height to 0 (Z 'home' is now at 2mm above bed)But if I have this sequence:
M208 X-5.5 Y-15.3 Z3 S1 ; set Z axis minimum as 3mm because my switch triggers at 3mm
G28 Z0 ;home Z . Web interface shows 3mm as curent Z height
G1 Z-1 F100 ; for example after homing move down 1mm closer to bed (Web interface shows 2mm)
G92 Z0 ;!!!SURPRISE!!! Web interface shows Z position resets to value in M208, i.e. 3mm
; Z home is now at 3mm above bed, and not 2mm as expectedLooks like you cannot reset the Z height below M208 value...
Is this by design or am I missing something?
Thanks,
François -
What are you trying to do? Can't speak for all the M208 interactions, but why not try something like this:
M208 X-5.5 Y-15.3 Z0 S1 ; set min limits G1 Z-500 H1 F300 ; homing Z move, will set Z to 0mm because a homing move always sets the relevant axis to the M208 limit G92 Z3; reset Z axis to actual height above bed
This would work in homeZ.g as well and you could add any relative or absolute moves as well, for example
G1 Z-500 H1 F300; home Z G92 Z3 ; reset Z to actual value G1 Z0 F300 ; bring Z down to bed
With this you would not need to worry about M208 limit interactions unless you want to go below the actual Z=0 value.
Maybe you are trying to do something else but this should work for most use cases.
-
Hi,
Do you have a H564 command allowing movement beyond min/max limits?
If you set Z min at 3, I don't understand how a G1 Z-1 command results in movement.
However this should do what you want:
- In M208 set your Z min as 0
- Home Z which according to your post leaves you at Z=3
- Use G29 to set Z=3
Now G1 Z0 should set the Z position to the surface of the bed.
Frederick
-
Thanks for the replies,
I am in the process of testing my build of a new CoreXY printer with a DUET. My previous printer was a Simple Metal with a Printrboard.
So slightly different Gcodes at my disposal, and a different printer type (Cartesian vs CoreXY).Here is what I was doing with my Simple Metal, and was looking to duplicate:
- Ensure that if the nozzle is at z=0 (homing) that means that is is at a known, constant height above the surface of
the bed (defined only once in the config, adjusted when any bed changes are made).
This way I could use 'variables' in my slicer that are material dependent to automatically set the height of the first layer. Ex: higher for PETG , lower for PLA. I was using relative moves to do this.
I was looking to duplicate this, trying not to have to modify more than one entry when adjusting the bed. Specifically not having to change code both in HomeAll and HomeZ everytime I make changes to the bed.
But I guess I will go with using absolute moves in my slicer Gcode and set G92 Z=3 (or whatever) in the HomeAll and HomeZ files with M208 Z0 in the Config file.
This is probably better, as I do not have to assume that the nozzle is at a given height in my slicer. Just move to the appropriate height above the bed based on the material used.
Indeed, Frederick I have H564 at the top of the homing files. Thanks for pointing it out as I had not thought about the 'scope' of the command, i.e. it stays set after homing, so I added a H564 S1 H1 at the end of the files. This will help prevent eventual crashing into the rails in case of an error in a gcode file.
I have not yet been able to tweak the parameters to enable stall detection: does not play nice with acceleration and jerk...
François
- Ensure that if the nozzle is at z=0 (homing) that means that is is at a known, constant height above the surface of
-
The release notes for 2.03beta1 include this entry:
Bug fixes
...- G92 should not constrain the passed coordinates to the M208 limits if M564 S0 has been used to disable limits
-
@msjfb said in G92 behavior affected by M208 ???:
Thanks for the replies,
I was looking to duplicate this, trying not to have to modify more than one entry when adjusting the bed. Specifically not having to change code both in HomeAll and HomeZ everytime I make changes to the bed.
My HomeAll file simply calls HomeX, HomeY and HomeZ.
Frederick
-
@msjfb said in G92 behavior affected by M208 ???:
trying not to have to modify more than one entry when adjusting the bed. Specifically not having to change code both in HomeAll and HomeZ everytime I make changes to the bed.
What do you have for a z probe? If you have a contact probe that can accurately set Z0 regardless of the surface, your first layer height in the slicer should be all you need to adjust for different materials, no?
-
I am using a Hall effect switch as Z endstop. No probe as such yet.
The switch is very effective up to now, and trigger position is always within +-0.01mm (measured with a digital dial indicator).
So I measure actual offset to the bed, and plug it in the homing macros.If my 1/4in MIC6 aluminium bed bed turns out to be too uneven, I will add a probe (piezo?) , but preliminary tests show it is flat within 0.1mm. I have yet to test with large prints (300x300 bed).
-
In that case, I would second nhof's suggestion above.
-
That's pretty much what I have done.
For anyone interested in this:Config.g:
; ############## Axis Limits ##############
M208 X-5.5 Y-15.3 Z0 S1 ; Set axis minima S1: XY is current offset from endstop. Z set to 0, offset to be modified in homing macros
M208 X300 Y300 Z300 S0 ; Set axis maxima S0HomeZ.g:
; homez.g
; called to home the Z axis
;Hall effect switch homingM564 S0 H0 ;allow movement of axes that have not been homed (firmware 1.21 and later)
G91 ; relative positioning
M400 ; make sure everything has stopped before we make changes
M913 Z80 ;set motor to 80%
M574 Z1 S0 ; set Z endstop
G1 Z-300 F400 S1 ; move Z carriage towards endstop
G1 Z10 F400 ; move down 10mm
G1 Z-11 F100 S1 ; slowly move Z carriage towards endstop
M400 ; make sure everything has stopped before we make changes
M913 Z100 ;set motor to 100%
G90 ; absolute positioning;###########################################################################################
G92 Z5.0 ; set actual nozzle height above bed !! !ADJUST FOR BED HEIGHT !!!
;###########################################################################################M564 S1 H1 ; restrict axes movement within boundaries
-
@msjfb said in G92 behavior affected by M208 ???:
That's pretty much what I have done.
For anyone interested in this:Config.g:
; ############## Axis Limits ##############
M208 X-5.5 Y-15.3 Z0 S1 ; Set axis minima S1: XY is current offset from endstop. Z set to 0, offset to be modified in homing macros
M208 X300 Y300 Z300 S0 ; Set axis maxima S0HomeZ.g:
; homez.g
; called to home the Z axis
;Hall effect switch homingM564 S0 H0 ;allow movement of axes that have not been homed (firmware 1.21 and later)
G91 ; relative positioning
M400 ; make sure everything has stopped before we make changes
M913 Z80 ;set motor to 80%
M574 Z1 S0 ; set Z endstop
G1 Z-300 F400 S1 ; move Z carriage towards endstop
G1 Z10 F400 ; move down 10mm
G1 Z-11 F100 S1 ; slowly move Z carriage towards endstop
M400 ; make sure everything has stopped before we make changes
M913 Z100 ;set motor to 100%
G90 ; absolute positioning;###########################################################################################
G92 Z5.0 ; set actual nozzle height above bed !! !ADJUST FOR BED HEIGHT !!!
;###########################################################################################M564 S1 H1 ; restrict axes movement within boundaries
Interesting.
A few questions if you don't mind:
- why the M564 commands?
- why is the M574 command not in your config.g file?
- why the M913 commands?
Thanks.
Frederick
-
@fcwilt :
M564: I have found that I cannot move the axes without homing, and to home I need to allow 'free' movement of the axes. Hence M564 S0 R0 at the topM574: It is already in the config file, I just repeat it here for good measure
M913: I use sensorless homing (no endstop switches in X&Y) so I first set motor current to 80% before homing so that the carriage does not 'crash' too hard into the physical endstop, and then reset the motor to 100% . I agree that I normally would not need to do this for Z since I have a switch for this axis. But I prefer to home with less motor torque in all axes just in case...
-
@msjfb said in G92 behavior affected by M208 ???:
@fcwilt :
M564: I have found that I cannot move the axes without homing, and to home I need to allow 'free' movement of the axes. Hence M564 S0 R0 at the topM574: It is already in the config file, I just repeat it here for good measure
M913: I use sensorless homing (no endstop switches in X&Y) so I first set motor current to 80% before homing so that the carriage does not 'crash' too hard into the physical endstop, and then reset the motor to 100% . I agree that I normally would not need to do this for Z since I have a switch for this axis. But I prefer to home with less motor torque in all axes just in case...
Thanks for the feedback.
In regards to the M564: The first G1 command has the S1 parameter which allows movement when not homed. Once the endstop is triggered by that command the axis is considered to be homed and thus all movement commands are allowed. So the M564 does not hurt but is not necessary.
Frederick
-
Since I was very careful when first testing the motion system, I was moving the axes with manual commands (no S1 parameter).
I never suspected that 'moving to sensor' would work off the top.
I am assuming that this means that the M564 command at the end is also redundant since S1 H1 are the defaults ?Thanks for pointing that out. I'll update my files...