> -----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.
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