Adding auto leveling or tramming gcode to dual extruder

The official subforum for discussion of the installation and use of the official M2 Dual Extruder upgrade.
User avatar
PcS
Posts: 667
Joined: Mon Mar 09, 2015 12:19 pm
Location: Michigan

Re: Adding auto leveling or tramming gcode to dual extruder

Post by PcS » Tue Sep 22, 2015 5:23 pm

Actually I was slightly wrong on the marlin. G28 homes one or more axis. G29 probes bed at multiple grid positions to get average and then sets height from that. If you could do similar in smoothie you just home x and y. Then probe z with the inductive sensor. You should not need the z stop with a probe. May require a lot more fiddling. Lol

User avatar
Tim
Posts: 1205
Joined: Thu Apr 10, 2014 2:19 pm
Location: Poolesville, Maryland
Contact:

Re: Adding auto leveling or tramming gcode to dual extruder

Post by Tim » Tue Sep 22, 2015 6:02 pm

You should not need the z stop with a probe.
Technically, you shouldn't. The main problem is that you need to catch any possible instance of G-code coming from a print or the console that will run a "home Z" in the wrong place. The whole point of a homing command is that you do not suppose that the machine has any knowledge of what the current position is; the homing function will determine that. So at any time that you do "home Z", you cannot assume that X and Y are known. Without knowing the X and Y, you have no idea if the "home Z" is going to work or if it's going to crash the extruder into the bed.

I'm getting more warm to the idea of implementing a "backup Z-min endstop" in the firmware. The old Z-min switch will force a stop even if the Z-probe isn't over the bed. Maybe that's all it needs to do; just prevent a wayward G-code from damaging the machine. Everything else can be taken care of by the Z-probe.
May require a lot more fiddling. Lol
Definitely will require a lot more fiddling!

User avatar
PcS
Posts: 667
Joined: Mon Mar 09, 2015 12:19 pm
Location: Michigan

Re: Adding auto leveling or tramming gcode to dual extruder

Post by PcS » Tue Sep 22, 2015 11:49 pm

That's why G28 and G29 are separate. I always run G28 to home x and y then G29. Machine knows where it is at.

lem
Posts: 162
Joined: Thu Jan 15, 2015 6:44 pm

Re: Adding auto leveling or tramming gcode to dual extruder

Post by lem » Wed Sep 23, 2015 2:59 am

Sometimes I feel like I'm riding in two boats, one foot in each hoping that both boats are going the same place. :)

Someone has a wrong impression of what G28 does, unless G28 is used differently in the 3D printing world from its use in the CNC world.

Before I go off the deep end --- is G28 different for 3D printers?

User avatar
Tim
Posts: 1205
Joined: Thu Apr 10, 2014 2:19 pm
Location: Poolesville, Maryland
Contact:

Re: Adding auto leveling or tramming gcode to dual extruder

Post by Tim » Wed Sep 23, 2015 3:19 am

lem wrote:is G28 different for 3D printers?
That's part of what I'm trying to find out, including whether or not it's different for different 3D printers. At least for the Smoothieboard, G28 moves all axes to minimum until the endstops trigger. The order in which the axes are moved depends on an internal configuration setting. There are minimalist options: "G28 X0" just runs the X axis to the minimum endstop. But after that, depending on various internal settings, the position may be redefined as something other than zero; or it might move to an origin position (like the center) that is not home, or it may move to a back-off position so that the switches will turn off. So it's not very rigorously defined. On the other hand, I don't think that this code would appear in any slicer-generated code; it would only appear in a prefix g-code block that would be unique to a specific printer.

If it has been implemented differently from CNC machines, that would not surprise me at all.

lem
Posts: 162
Joined: Thu Jan 15, 2015 6:44 pm

Re: Adding auto leveling or tramming gcode to dual extruder

Post by lem » Wed Sep 23, 2015 3:52 am

Ok, Tim.

Thanks....
Larry

User avatar
ednisley
Posts: 1188
Joined: Fri Apr 11, 2014 5:34 pm
Location: Halfway up the Hudson
Contact:

Re: Adding auto leveling or tramming gcode to dual extruder

Post by ednisley » Wed Sep 23, 2015 4:35 pm

Tim wrote:If it has been implemented differently from CNC machines, that would not surprise me at all.
You're coming along nicely, Grasshopper: [evil grin]
http://linuxcnc.org/docs/html/gcode/g-c ... d_position

Why the RepRap folks stirred homing into that mix, we'll never know.

LinuxCNC, at least, doesn't implement G29, which probably explains everything...

User avatar
PcS
Posts: 667
Joined: Mon Mar 09, 2015 12:19 pm
Location: Michigan

Re: Adding auto leveling or tramming gcode to dual extruder

Post by PcS » Wed Sep 23, 2015 5:12 pm

In marlin at least ....according to their documentation G28 is simply listed as "home one or more axis" So when it is executed in my gcodes startup script it only homes x and y. Then G29 executes and that moves to center of bed to probe z and start the grid probing sequence. I have no cnc experience I simply look things up about marlin from their site and apply it to my needs for marlin to do the things I want for my printer. :-)

Post Reply