On 12/7/25 14:22, John Dammeyer wrote:
-----Original Message-----
From: gene heskett [mailto:[email protected]]
G4p.1 # que buster stop to make sure the X2.4 was totally completed
before any probing G38 moves can begin.
Hi Gene,
The code already waits for it to be done. But the issue is more complicated.
The call to execute the move across the piece is where the problem is.
You dug into it much deeper than I, John. And it looks like a bug, OTOH
you are moving 20x faster than I would, not wanting the machine to
explore its resonances that might be jerk triggered. That and I only
use a probe very rarely although I have one, but prefer electrical
contact where it can be done. Its probably 3 or 4 years since I last
chucked my probe. As a CET I think differently.
The odd possibility is that at 20"sec, the inertia of the probe finger
may have caused a momentary break in the probes contacts as it started
the end of move stop deceleration. halscope should be able to see that
I would think. test by adding the F command to slow it way down for the
X 2.4 move. Try G1 F1 just for grins. I have a couple modules in my hal
files that disable the probe signal if motion isn't type 5. And its
only type 5 for g38 moves.
From that file:
#******************************************************
# hook up probe signal but disable if motion type not 5
#******************************************************
# disable out5 if not probe move
net probe-ctl <= motion.motion-type => select8.0.sel
# move this to p2 input-5 gpio.030, p2-10 is INPUT-1
net probe-sense <= hm2_5i25.0.gpio.030.in_not => and-prb.in0 # s/b
correct action
net probe-hit1 <= select8.0.out5 => and-prb.in1
net probe-hit2 <= and-prb.out => motion.probe-input #
signal source is NOT p3-15 anymore
Which blocks the probe signal from getting to motion.probe-input for non
G38 moves. Might be helpful.
Recall this part:
python program
# move X + 2 edge_length + 2 xy_clearance
tmpx = 2 * (self.halcomp["ps_edge_length"] +
self.halcomp["ps_xy_clearance"])
s = """G91
G1 X%f
G90""" % (
tmpx
)
print s
Oddly it showed up on the console like this:
G91
G1 X2.400000
G90
What follows that is:
if self.gcode(s) == -1:
return
I thought the self.gcode(s) was a system call. Turns out not.
Here's the python gcode execution function called:
@restore_task_mode
def gcode(self, s, data=None):
self.command.mode(linuxcnc.MODE_MDI)
self.command.wait_complete()
for l in s.split("\n"):
# Search for G1 followed by a space, otherwise we'll catch G10 too.
if "G1 " in l:
l += " F#<_ini[TOOLSENSOR]RAPID_SPEED>"
self.command.mdi(l)
self.command.wait_complete()
if self.error_poll() == -1:
return -1
return 0
Here you see the string "G91\nG1 X2.400000\nG90" being split apart and a space after the
"G1 " should insert a different RAPID_SPEED from the INI file. This is what should be
sent to the mdi command parser which would change the G1 speed to F20 as that's what is in the INI
file. The output below is from running the same piece of python code on Thonny.
G91
G1 X2.400000 F#<_ini[TOOLSENSOR]RAPID_SPEED>
G90
However the output to the LinuxCNC command console doesn't show the F command
string. It's missing even though there is a space after the G1
Now if a different probing operation has used that F20 rapid speed then the
probe travels at that speed across the cylinder. Not only that it makes it all
the way across and successfully completes the entire probing operation. So
there was a timeout involved.
def error_poll(self):
if "axis" in self.display:
# AXIS polls for errors every 0.2 seconds, so we wait slightly
longer to make sure it's happened.
time.sleep(0.25)
error_pin = Popen(
"halcmd getp probe.user.error ", shell=True, stdout=PIPE
).stdout.read()
But even before that we have this call:
self.command.wait_complete()
So why does this return when in fact at F10 the command wasn't complete. I
can't find the code for wait_complete().
John
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users
.
Cheers, Gene Heskett, CET.
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
- Louis D. Brandeis
Don't poison our oceans, interdict drugs at the src.
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users