What does Marlin's G30 code do?
Photo Credit: Courtesy of 3DStockPhoto ( image)

I believe G30 is a carry-over from CNC (G-Code originated for CNC not printers) I believe it is for going to a secondary reference (home) position and includes an optional by-way-of address that can be included in the command.

Looking at Marlin 1.1.0-1 (latest release), it seems to do what you said: 1. Move to the requested position (if selected in command, else N/C) 2. Deploy probe 3. Go home 4. Stowe probe 5. Report the requested position and probed z position 6. Report the current position (home?)

It appears that for Marlin, there is only one reference address (home); so, it would seem a G30 would be the same as a G28 (go to primary reference); but, not so.

It looks like G28 is a home of a different color. It looks like it homes the axis one-at-a-time and does not support a by-way-of location. Note that you can select which axis to home by adding the letters 'X' 'Y' and/or 'Z' to the command.

I am not sure what benefit this command has for a 3D Printer other than allowing you to alter the printer's path to home.

Note: Unfortunately I do not have Marlin code up and running on my printer now so I cannot confirm what I am seeing in the code.