New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Communication error could be salvaged in some cases #46
Comments
I'm not 100% certain that I've actually seen this issue, but your proposed fix is straightforward and plausible. |
Now that ebb_serial.py has an errormsg associated with receiving a null response from comPort.readline(), I have found an exceptionally simple and reliable way to cause an error to occur, so hopefully the root cause may be discernible by those with more knowledge of the internals than I. I do not know if this manifestation of error is related to other i/o errors that have been thought to be hardware i.e. cable related. The present error is not a hardware or communication problem per se, since it can be reliably caused by merely changing certain parameters on the Timing tab of the Eggbot Control extension. The problem can be provoked by setting certain combinations of "Speed when pen is down" and "Delay after lowering pen". Specific timings which cause this are documented in the below results of a small data-taking marathon:
|
This is great-- I'll take a look shortly. |
Able to reproduce. May need to add a time.sleep command for longer duration pen up/down moves, much as we do for longer stepper moves. |
Add time.sleep delay to prevent communication error during long pen-up and pen-down moves. We already have a delay like this in place for long stepper moves, but it turns out that for sufficiently long pen-up/pen-down movements -- a rare case -- the same problem can result. See #46.
Sure enough. It turns out that while we execute a |
Speaking of delays, I'd like to raise a question here rather than on the forum, because if I'm thinking wrongly about it I don't want to confuse the broader community of users. (Also, if your In the eggbot wiki, at http://wiki.evilmadscientist.com/Eggbot_Control it is stated: To me, this says that the "Delay after lowering pen" starts at the completion of the servo's move to the down position. But my observation tells me that in fact the delay starts at the beginning of the servo move. Iff I'm correctly observing, then the wiki advice to have a delay of no less than 250 ms is cutting it rather closely. E.g. for U-D = 6 % points, and lowering speed of 20 points/second, the delay expires during the 6/20 = 300 msec servo down motion. True, the pen might conceivably have gotten to the egg already, but there is nonetheless minimal-to-zero delay before the line commences drawing. I'm not trying to pick nits here, but iff my observation is correct, would you consider re-wording the wiki description - or okaying me to do it since I'm sure there are innumerable more pressing demands on your time? Or something else? |
Yes... I think that both the behavior is correct, but the description should probably be updated. The delay does indeed start when the pen begins lowering. Please go ahead and edit the description to reflect reality. :) Longer term, I would like to update the pen lift and lowering to use the newer method implemented for the AxiDraw software, where the transit time is calculated automatically (from the speed and distance) and the delay time is added to that. The software change is relatively straightforward, but it also requires changing the documentation, which is a little more time consuming. |
Just a note to say I've made the change in the wiki, in case you want to review it for clarity or accuracy. |
Thanks! I've made some minor tweaks for tone, but this is genuinely much better. :) |
Glad you like it! 8^) I see you tweaked only section 7 and not section 9 - perhaps section 9 is feeling left out? |
Ah-- missed that. All tidied up now. Thank you again. |
Currently if there is a persistent communication breakdown in plotLineAndTime which ends up returning a null from ebb_motion.QueryPRGButton(self.serialPort), then python aborts the plot with a runtime error message. This loses position reference for the plot, and thus the entire plot is ruined.
The suggested change incorporated in the attached file explicitly looks for a null response. Here if a null response occurs, the program substitutes a simulated push of the pause button. Therefore the user may be able to use the "Resume" to rescue the plot, after fixing the communication problem.
The attached file is built from a base of the proposed fix for issue 45.
eggbot (2).zip
The text was updated successfully, but these errors were encountered: