What do the return values of G30 mean?

What do the return values of G30 mean?

Postby sbussinger » 2016-Jul-Tue-01-Jul

When you execute a G30 command to do a spot test of the Z-probe, you get a line that looks something like

Code: Select all
endstops hit:  Z:0.51


What exactly does that measure? I modified my Metal Simple to have an manually level-able printbed and I find the G30 command really handy for getting the bed trammed. But I wondering what exactly number represents. It doesn't appear to be affected by the M212 settings.

Also if I move the head to Z0, where exactly does it go in the Z dimension? I'm assuming that it's not putting the nozzle at the point of just touching the bed, it's putting it a bit higher so that if you extrude at Z0 the filament has a place to go. Is that what the M212 Z settings are specifying (i.e. the offset between the bed and the initial nozzle location)?
  • 0

sbussinger
Loading filament...
 
Posts: 12
Joined: 2015-Dec-Wed-19-Dec
Reputation: 0

What do the return values of G30 mean?

Sponsor

Sponsor
 

Re: What do the return values of G30 mean?

Postby RetireeJay » 2016-Jul-Tue-20-Jul

Just to let you know that your post is up on the site and being seen, here's a non-answer. :(
Not all of us have the G30 command. It's ignored on my Plus (which has an F5 board with my version of Printrbot's "legacy firmware for F5 board" installed). Googling the command seems to get hits associated with CNC milling machines and 3D printers using the Delta architecture, not XYZ printers like the Simple.

In the old days, we used to set the nozzle height so that there was drag on a piece of standard paper (about 0.1mm) and call this point Z zero. This was done by adjusting a screw that touched a microswitch - same technology as the X and Y home switches. Then we had to do it at three or four points around the bed to get the bed trammed (there were no probes in those days). I eventually ended up with a completely different Z zero sensor, and quite incidentally putting a small negative offset in my Slic3r's configuration - but there are many ways to accomplish the desired end: get a decent smoosh on the first layer without blocking the nozzle or laying down a trace that has no pressure to make it adhere to the bed.
  • 0

Printrbot Plus operational January 2013
Brass threaded rods (5/16" X 18) & nuts for Z axis
GT2 belts & pulleys
Cable chain to reduce probability of fatigue failure in wires
E3D V5 Hot End, 0.4mm nozzle, also 0.8 and 0.25 in use occasionally
PB fan mount + 40mm fan -- using printed mount adapter, not the E3D supplied fan
Injection molded extruder gears
Optical Z "endstop" (custom designed and built)
Have used many pounds of T-Glase filament. Now also doing some work with Ninjaflex SemiFlex
Print on glass with Scotch Craft Stick or other glue stick
User avatar
RetireeJay
My next printer is...
 
Posts: 4800
Joined: 2013-Jan-Wed-13-Jan
Location: Greenville, SC
Reputation: 477

Re: What do the return values of G30 mean?

Postby teicher » 2016-Jul-Wed-12-Jul

G30 measures the distance between where the probe detects the bed and the bed. You're right, it's very useful to check the bed for levelness and flatness. The offset you enter with M212 is a fudge factor of sorts that tells the printer to lower the print head some amount beyond the point where it thinks it should stop.

You could see it in action if you still used auto leveling and ran the G29 command. The hot end will start to lower after it probes the 3rd point and moves to the center of the print bed.
  • 0

teicher
Layer 300 of 1234
 
Posts: 318
Joined: 2014-Apr-Fri-20-Apr
Reputation: 15

Re: What do the return values of G30 mean?

Postby sbussinger » 2016-Jul-Wed-14-Jul

Thanks guys!

Since there's no Z-axis limit switch other than the probe, how can G30 measure the distance between where the probe detects the bed and the bed itself? How could it know where the bed is, other than the probe? So in my example, the presumably the measurement means the probe is 0.51 mm from something, but what and how does it know that?

What I'm doing now is picking one corner arbitrarily and setting the G30 result to some nice round number. Then I go to the other 3 corners of the bed tram it to the same values. Then repeat until every point is happy. This should give me a level bed. Then I use the paper trick to set the M212 value to put down a good first layer for me. I still have the G29 autolevel command in my startup gcode, I'm just giving it a nice flat bed to work with. But I'm wondering if I could set the M212 value automatically based on the result of the G30 values. After all if G30 is measuring something absolute the M212 value should be deterministic.

Some background -- I have a Metal Simple V2 with heated bed and wanted to upgrade to the Matrix Precision larger XY printbed. The problem is that the mounting holes in that plate don't match the Metal Simple V2 printbed holes (they're for older mounts). I've had issues with a warped build plate before (and changes in the warp due to heating) so since I had to build an adapter anyway I figured I'd add in manual tramming as well. Because of the adapter, my printbed is a good 30mm higher than it was before. G29 and G30 still work fine because of the inductive sensor. But what does G30 measure?
  • 0

sbussinger
Loading filament...
 
Posts: 12
Joined: 2015-Dec-Wed-19-Dec
Reputation: 0

Re: What do the return values of G30 mean?

Postby sbussinger » 2016-Jul-Wed-15-Jul

I just had a thought. When you do a G28 XYZ, it homes X, then homes Y, and then uses the inductive probe to home Z. It then sets that as the virtual zero point for Z. When you do a G30 at some other XY location, perhaps it probes the bed and reports the difference between when the inductive probe senses the bed compared to the point where it sensed it when it did the G28. So the values reported are the relative differences between the home point and the point being tested.

I got a relatively large number (.5mm) not because the bed was badly warped, but because my adapter places the replacement printbed oddly and it messes with the inductive sensor. With my adapter, the replacement print bed is offset perhaps 10mm further out from the chassis in the Y dimension than the standard printbed. So when it's doing the homing probe, the inductive sensor comes down over the edge of the printbed and isn't seeing as much metal as it would in the middle of the printbed. Thus the detection point is closer to the bed at the home point than it is elsewhere.

I'll have to either tweak the Y axis limit switch to compensate or convince the firmware to do the initial probe further in. I wonder if the M212 command could be used to move that test point (like you do when upgrading the larger Z axis to avoid doing a probe into the cutouts in the printbed)? ... Nope, that didn't seem to work. If I set M212 Y10, then it just reports "ZProbe Outside Bed". When I tried M212 Y-1, it didn't appear to do anything differently than M212 Y0. I'll have to see about adding something to trip the Y axis sooner.
  • 0

sbussinger
Loading filament...
 
Posts: 12
Joined: 2015-Dec-Wed-19-Dec
Reputation: 0

Re: What do the return values of G30 mean?

Postby RetireeJay » 2016-Jul-Wed-21-Jul

I'm not real up on this, but the G29 command probes at locations that you specify, so you don't need to give up bed area to get the probe to come down where it sees solid metal. Do an M503 and you'll see the correct command to set the probing locations.
  • 0

Printrbot Plus operational January 2013
Brass threaded rods (5/16" X 18) & nuts for Z axis
GT2 belts & pulleys
Cable chain to reduce probability of fatigue failure in wires
E3D V5 Hot End, 0.4mm nozzle, also 0.8 and 0.25 in use occasionally
PB fan mount + 40mm fan -- using printed mount adapter, not the E3D supplied fan
Injection molded extruder gears
Optical Z "endstop" (custom designed and built)
Have used many pounds of T-Glase filament. Now also doing some work with Ninjaflex SemiFlex
Print on glass with Scotch Craft Stick or other glue stick
User avatar
RetireeJay
My next printer is...
 
Posts: 4800
Joined: 2013-Jan-Wed-13-Jan
Location: Greenville, SC
Reputation: 477

Re: What do the return values of G30 mean?

Postby sbussinger » 2016-Jul-Thu-14-Jul

How do you specify the location for G29 probes? I've never seen that documented. It's not clear to me what the S parameters to G29 are for PrintrBot's Marlin either. I tried the one documented at http://reprap.org/wiki/G-code and didn't get results that make me think they work.

The M503 shows a probe offset M212, but that would be only a single point and it's definitely not where the probes take place. There's an M212 X20 that prevents the probe from misdetecting the bed where the holes are, but it's not obvious to me how it's applied.
  • 0

sbussinger
Loading filament...
 
Posts: 12
Joined: 2015-Dec-Wed-19-Dec
Reputation: 0

Re: What do the return values of G30 mean?

Postby RetireeJay » 2016-Jul-Thu-17-Jul

Looking at the code, it seems that M212 has placeholders for bed_level_probe_offset for X, Y, and Z. And I THINK that if you specify, for example, M212 X20, that means that the bed will be probed at locations with X = 20 and X = (Max - 20); same for Y.
  • 0

Printrbot Plus operational January 2013
Brass threaded rods (5/16" X 18) & nuts for Z axis
GT2 belts & pulleys
Cable chain to reduce probability of fatigue failure in wires
E3D V5 Hot End, 0.4mm nozzle, also 0.8 and 0.25 in use occasionally
PB fan mount + 40mm fan -- using printed mount adapter, not the E3D supplied fan
Injection molded extruder gears
Optical Z "endstop" (custom designed and built)
Have used many pounds of T-Glase filament. Now also doing some work with Ninjaflex SemiFlex
Print on glass with Scotch Craft Stick or other glue stick
User avatar
RetireeJay
My next printer is...
 
Posts: 4800
Joined: 2013-Jan-Wed-13-Jan
Location: Greenville, SC
Reputation: 477


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest