Would appreciate some help with G38 weirdness...

More
21 Jun 2020 16:43 - 21 Jun 2020 20:11 #172256 by pferrick
Hi all-

I apologize in advance for this being so long. But I'm at my wit's end with this problem so I'm going to try and describe the situation accurately in the hope that someone will see something that I'm not!

The problem: G38.2 probes sometimes end prematurely- ie. when a) the current position has NOT yet reached the commanded position, and b) the probe signal has NOT occurred. There are also a couple of other weird behaviors along with this that might be good clues..

The machine status is: homed with no G5x, tool length or G92 offsets. The DRO is all zeros except for the machine coordinates. Z ranges from 2.5 at the top end to -7 at the bottom.

This is my probing code for tool 1 (my reference tool):
G53 G0 Z2               (rapid to safe Z)
G53 G0 X9.443 Y6.267     (move directly above the toolsetter)        
G53 G0 Z-5.3             (rapid down to just above the toolsetter)

G91 G38.2 Z-2 F5          (probe downward incrementally from Z = -5.3)

(DEBUG, [#5063])          (report Z coordinate at which the probe switch changed state)

G90 G53 G0 Z2	         (rapid back up to machine Z = 2)	                   

G10 L1 P1 Z[#5063 + 5.4565]   (-5.4565 is the offset I get for tool 1.  So this makes the TLO for tool 1 zero. 
                               The plan is to use this tool for touchoff.)
This works fine if the point where the probing actually begins is about 0.2" above the toolsetter. However, this is too close for other tools that are longer than T1. In order to avoid them crashing I have to adjust the point where they start probing accordingly. This is inconvenient and dumb, since I should be able to just start them all probing at some point that is far enough away from the toolsetter for any of them.

However, if I change the Z-5.3 line to say, Z-5 (to accommodate a slightly longer tool) then the probing ends with an error before reaching the toolsetter. BUT if I probe downward _faster_ from Z-5 (maybe F15), it will move down far enough to trigger the toolsetter switch! Of course, I don't want to probe faster because I get much better results with slow probe speeds. It's as if G38 will only move for some fixed length of time. That would be inverse time feed, I believe, but I have tried inserting a G94 to enforce feedrate in IPM and it didn't make any difference.

Here's another clue: the final rapid to Z2 sometimes ends at a Z value other than 2- even if probing is successful. The ending Z coordinate is sometimes lower than Z = 2 and varies with where I start probing. (Actually it seems to be semi-random.) This makes absolutely no sense to me at all. Shouldn't a G53 G0 make an axis go to exactly that point, no matter what? There's nothing mechanically wrong with the Z axis, since the probe values are repeatable to within a few tenths.

Any suggestions would be extremely welcome!!

Thanks,
Patrick
Last edit: 21 Jun 2020 20:11 by pferrick.

Please Log in or Create an account to join the conversation.

More
22 Jun 2020 14:59 #172350 by tommylight
Can not help since i did not use G38 since the days of LinuxCNC 2.4 or 2.5, but bumping this so it might get seen by someone who can help.

Please Log in or Create an account to join the conversation.

More
22 Jun 2020 15:43 #172363 by MaHa
If you change Z-5.3 to Z-5, change G38.2 Z-2 to G38.2 Z-2.3 . It will stop on contact anyway, just increase travel distance to toolsetter to trigger.
To increase accuracy, you can try instead of rapid back, G91 G38.5 Z1 F2, probe away from probe with slow feed, use this #5063 for probing result. Then retract to G90 G53 G0 Z2.
If you debug #5063 after each G38.n, you can compare what is better.

Please Log in or Create an account to join the conversation.

More
22 Jun 2020 20:18 #172391 by pferrick
Thank you very much for this suggestion...! I will try it this evening and let you know what happens.

Patrick

Please Log in or Create an account to join the conversation.

Time to create page: 0.122 seconds
Powered by Kunena Forum