> -----Original Message-----
> From: [email protected] [mailto:[email protected]]
> self.command.wait_complete()
>
> This command is waiting only 5s. You should use:
> self.command.wait_complete(600)
>
> > -----Original Message-----
> > From: John Dammeyer [mailto:[email protected]]
>
> > 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().
>>
> Here we go:
> https://www.forum.linuxcnc.org/38-general-linuxcnc-questions/43474-wait-
> comp
>
I did some more digging. Yes indeed there is the typical crap python default
value so you don't know it's there or what the default is without research into
whatever library is included.
It allows for sloppy programming. The correct statement (and a way to not fail
a comp. sci. assignment) is:
self.command.wait_complete() # using default value of 5 for hidden
parameter for max wait time.
One of the solutions changed the code adding extra parameters to this:
def gcode(self, s, distance=None, data=None):
and then further down in the method:
time_in = 5
if distance is not None:
# set a non-default wait limit for wait_complete()
time_in = 1 + (distance / self.ps_rapid_speed ) * 60
self.command.mdi(l)
self.timed_wait_complete()
Using 2.4" and 10ipm that works out to 15.4 which I'm going to guess is
seconds? The problem again is documentation. How does the
timed_wait_complete() method know that we now want 15.4? Global variable?
Again crap documentation. Another Comp. Sci assignment fail if I was marking
the work.
I'm going to guess the author of that fix created an encapsulation method
timed_wait_complete() and a global time_in variable.
Inside the method the time_in is an argument to wait_complete(time_in)
Why not just use wait_complete() with time_in as an argument? Or maybe because
the long timeout greater than 5 seconds is really only needed in a few places.
As described:
https://linuxcnc.org/docs/html/config/python-interface.html
So it's working but what a painful process.
John
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users