Using a relative coord system
-
Hi, I have fighted through the print bed levelling with Bltouch and piezo z-probe but am now at a point where I can calibrate my machine but step into new questions:
My machine has y-axes going from 0...490mm (min-stopend), X-Axis 0..500mm (min-stopend) and Z-axis 0..300mm (max-stopend). So far my "physical coord system" is defined (in the config.g) and should be stable and all coords within it are reachable as well dont causes things carshing into end-positions.
But one of my print-beds sits higher than the pysical Z=0.0 coord (about 14.61 mm), and the nozzle - depending of which make I use - will have different offsets reletive to the X-Y space because of diffrent mounting parts.What I want to define is a "relative coord system" which is for example (X-offset = 0.0, Y-offset = -21.5, Z-offset = 14.61) when I choose a specific printbed (level spring, heater, glass etc) and/or a specific hotend. Ans this definition should be separate from the config.g as I hate it to reset the complete machine to activate such specific settings.
Is there an option to achieve this in RRF 3 (my current firmware) ?
With such an option to shift the perceived coord system with such "profiles", I could set the Z = 0.0 level plane exactly to the specific nozzle and also make sure that G29 is not trying to move the nozzle into a position below the print bed when its 14.61 mm higher than the pyhysical Z 0.0 origin.
Currently I only found a solution by redefining the Z-axis to be 0..258.31 and using G30 to set the Z=0.0 level with the probe BEFORE doing G29. Doing this I can not reach the physical level Z=0.0 anymore (my print bed is smaller than the complete X-Y plane).
For any change of the nozzle I have to re-check for a new Z = 0.0 level and have to adapt the config.g (and do resets) to stabilize endstops etc. I really would like to "calibrate" with separate profiles and on-the-fly commands/macros. Is this too much wishful thinking?
-
See https://duet3d.dozuki.com/Wiki/Gcode#Section_G54_to_G59_3_Select_coordinate_system. Note, the workplace coordinate offsets are ignored when running system macro files automatically (homing files, pause/resume files, tool changing files etc.).
-
@dc42 Thank you for this reference, it is helpful and starts a whole set of new information. Regarding your additional comment: is the command G29 also belonging to those "system macro files"? As far as I found, when issuing G29, it first travels to some coord near(?) the first matrix coord (of M557 X... Y...) but also moves along the Z-axis to some low (?) value. This caused my troubles when I had not set Z = 0.0 to the height of the print-bed (Z = 14.61 mm).
-
Differences in bed height should not matter if you home the Z axis using the Z probe. Differences in nozzle height or nozzle XY position would normally be taken care of using the tool offset. If you are changing tool manually, you could define a macro for each tool, and run that macro when starting up with that tool present.
There are some ways of auto-adjusting for nozzle Z offset;
- Use a nozzle-contact Z probe
- Have a switch, configured as a second Z probe, that you can probe using both the Z probe and the nozzle. That allows you to work out the height difference between the nozzle and the Z probe trigger point.
-
@dc42 Thank you again! I have played around with the commands "G10 L2 P2 X0 Y0 Z14.0" (for a print bed Z offset of 14.0 after reset and doing a "G30 S-1") and the issuing a switch to workplace 2 with "G55". I was able to see that the DWC shows then Z = 0.0 and also an adjusted max Z of 300.0 - 14.0 = 286.0 (for the print bed) and swapping back to "G54" did correctly reset the z range to 0.0 .. 300.0. This looks promising and I started to experiment:
1/ After doing a G54, I moved the nozzle with "G1 X0 Y0 Z10.0" to a lower coord than the print bed, which is possible as the print bed is smaller than the complete XY plane. Switching back to "G55" promptly shows a negative Z coord! So far, I assume that I can "leave" a set wokplace for some 0 <= Z <= P2 workplace offset?2/ Any use of a "G10 Px ..." command that sets offsets for a wokplace relative to the machine coord system, will adjust the max-coords properly. Is there a command variant that allows to reduce the max coord values additionally to defined a workplace which is smaller in min- as well as max range? Something like "G10 L2 P2 X100:400 ..."?
3/ I tried to locate the workplace definition values somewhere in the OM for use in the conditional meta-commands, and also the "active" workplace (G53, G54, G55...) But could not find this information. May you point me to this info, please.
I guess that the workplace commands may fulfill most of my current requirements and help me defined some flexible macros / scripts to start a safe printing state. Thank you so much for your help!
-
@hlwerschner said in Using a relative coord system:
1/ After doing a G54, I moved the nozzle with "G1 X0 Y0 Z10.0" to a lower coord than the print bed, which is possible as the print bed is smaller than the complete XY plane. Switching back to "G55" promptly shows a negative Z coord! So far, I assume that I can "leave" a set wokplace for some 0 <= Z <= P2 workplace offset?
Setting workplace offsets doesn't affect the allowed range of the printer in machine coordinates. So when you specify a positive Z offset, movements below Z=0 will be allowed. You could avoid this in these ways:
-
Use G30 to set Z=0 instead of setting a Z offset in the coordinate system. The max allowed Z value will then be wrong, but you could use RRF3 conditional GCode to adjust the M208 upper Z limit.
-
in the same macro that sets the workplace coordinates, change the M208 lower limit,
2/ Any use of a "G10 Px ..." command that sets offsets for a wokplace relative to the machine coord system, will adjust the max-coords properly. Is there a command variant that allows to reduce the max coord values additionally to defined a workplace which is smaller in min- as well as max range? Something like "G10 L2 P2 X100:400 ..."?
No, see my reply above.
3/ I tried to locate the workplace definition values somewhere in the OM for use in the conditional meta-commands, and also the "active" workplace (G53, G54, G55...) But could not find this information. May you point me to this info, please.
move.axes[nn].workplaceOffsets[] and move.workspaceNumber. Caution, workplace numbers are 1-based but array indices are 0-based.
-
-
@dc42 and again I have to send a "Thank you" to you! Your hints for the limits use of G10 and workplaces is something I just experienced directly: After G55 for my Z offseted print bed, I issued a G29 and it promptly crashed the hotend into the print bed and bent off the mount part for the precision piezo probe! Very bad, its the 2nd time I have to glue it until I get a better mounting...
I had already considered to do the needed adjustments using some script and a few calculations myself. I guess I will shift my experiments into that direction. Looks like I first have to find a way to stop the nozzle crashing into any obstacle before playing with (Z-)probes
I will check those OM properties, they might help me setting up some more safety guides.
-
You may find it helpful to reduce motor currents when you are experimenting.