On Friday 27 July 2018 16:39:56 Kurt Jacobson wrote: > I asked this on IRC yesterday, but realize that was a bad format, so > here goes! > > I have been helping Lcvette with a very simple probing GUI and some > probing routines. The routines probes the top and then corner of the > part and set the specified (not necessarily current) WCOs to the value > of probed position. > > One thing that was unexpected is that the probed pos parameters > (5061-5069) are relative to the currently active WCS. This is not > clear from the description in the docs, and is not consistent with the > values returned by `stat.probed_position` which returns the ABS > position at which the probe tripped. It makes sense for the probed pos > to be in ABS coordinates, since one of the main uses of probing is to > set a WCS. All the commercial controllers I am familiar with report > probed pos in ABS coordinates, Fanuc even uses the same param numbers > as LCNC for the probed pos values, but they are ABS vs LCNC relative > pos. > > There are significant advantages to having the probed pos be in ABS > coordinates, mainly because it makes it easy to set a WCS to the > probed pos: > > G38.2 Z-.5 > G10 L2 P0 Z[#5063] > > To get the same function as the Fanuc style parameters in linuxcnc > requires something like this: > > (Get the current WCS Z offset) > o100 if [#5220 EQ 1] (G54, 5520 = current work space ID 1-9) > #<workspace_z> = #5223 > o100 elseif [#5220 EQ 2] (G55) > #<workspace_z> = #5243 > o100 elseif [#5220 EQ 3] (G56) > #<workspace_z> = #5263 > o100 elseif [#5220 EQ 4] (G57) > #<workspace_z> = #5283 > o100 elseif [#5220 EQ 5] (G58) > #<workspace_z> = #5303 > o100 elseif [#5220 EQ 6] (G59) > #<workspace_z> = #5323 > o100 elseif [#5220 EQ 7] (G59.1) > #<workspace_z> = #5343 > o100 elseif [#5220 EQ 8] (G59.2) > #<workspace_z> = #5363 > o100 elseif [#5220 EQ 9] (G59.3) > #<workspace_z> = #5383 > o100 else (default to G54) > #<workspace_z> = #5223 > o100 endif > > G38.2 Z-.5 > (Calculate the probed ABS pos) > #<z_abs_probed_pos> = #5063 + #<workspace_z> > G10 L2 P0 Z[#<z_abs_probed_pos>] > > Having to use the if-elseif block is somewhat cumbersome, and needs to > be done for each axis for which it is desired to set the WCO. > > So the question is, why did LCNC choose to use relative positions for > the probe parameters? There must be a good reason to not follow what > seems to be a standard among other controllers, but the only advantage > I can see is when probing to measure/scan a part, but in that case it > would be very easy to convert the ABS probed pos to relative by > subtracting the WCO. > > Trying to think of ways to make the behavior more expected for people > coming from other controllers, and at least make it clear in the docs > . Would it make sense to change parameters 5061-5069 to be the ABS > probed pos, or maybe allow using G53 with G38? I think it would also > make sense if `stat.probed_position` was consistent with the > 5061-5069. > > Anyway, interested to see what you all think. I am going to at least > work on clarifying the parameter and python interface docs to better > reflect what system the probed positions are in. If anything else > could/should be done I will try to take that on as well. > > Thanks all! > Kurt
Somewhere in the gcode is a pair of commands that switch it incremental<->absolute. Yes g90 for absolute, and g91 for incremental. Its also I think, switchable in the view pulldown. Does this not fix the g38.2 results too? > ---------------------------------------------------------------------- >-------- Check out the vibrant tech community on one of the world's > most engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Emc-developers mailing list > Emc-developers@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/emc-developers -- Cheers, Gene Heskett -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) Genes Web page <http://geneslinuxbox.net:6309/gene> ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Emc-developers mailing list Emc-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-developers