DrawBot – How to Recover from a Stalled Print!

I should really have entitled this post “How to mostly recover from a stalled print.”  Several times now I’ve had a problem with the DrawBot stalling out and stopping a print.  When this has happened, hours can pass and the little ‘bot will do nothing at all.

Such as last night.  It was probably 80% done drawing Starry Night when it … just… stopped.

Here’s what I saw and here’s how I (mostly) fixed it:

  • The Symptoms
    • No DrawBot movement1
    • No scrolling of the command queue
    • The ‘bot status read “BUSY [insert normal seeming string command I didn’t write down]”2
    • The motors were quite warm
    • And the poor little Motor Shield was warm as well3
  • The Fix45
    •  I figured that, for whatever reason, the little ‘bot just seized up – but that perhaps if I could get it to respond to commands I might set it back on track.
    • The control software was responsive enough that I could “Queue->Export Queue“, which I did.
    • The problem with trying to reset the board or the control software and just feeding it the remaining part of the queue is that it wouldn’t remember where it was.  So, I figured if I could convince it that it was already where it was supposed to be, it might just continue on as if everything were okay.
    • I had seen from prior command queues that the code, “C09,NUMBER1,NUMBER2,END” appeared to be the way the machine would apply “Input->Set Pen Position.”
    • I then looked at the code that I had exported from the queue.  The first item was:
      • C05,3103,4350,29,133,END
    • So, I edited the text file so that it read as follows:
      • c09,3103,4350,END
      • C05,3103,4350,29,133,END
      • …the rest of the command queue
    • Which I believed essentially tell the ‘bot that it was where it was supposed to be and to continue on as if everything was normal.
    • I then disconnected the USB cable
    • Closed the control software
    • Restarted the control software
    • Reconnected the USB cable
    • Reestablished contact with the ‘bot, “Setup->Serial Port” and selected the port of choice for my laptop
    • Clicked the queue to start it up again…
    • It seems to have worked – but may possibly have shifted up one pixel.  This is why I say this was mostly a recovery.  I suspect that if I should have moved the pen down a little and see if I could get it to draw the next pixel in line.

I’ll scan and post this drawing as well and will point out the spot where I tried this little fix.

Posts in the DrawBot Adventure Series
  1. Wanna make a DrawBot?
  2. DrawBot Resources and Links
  3. DrawBot, the Adventure Begins
  4. DrawBots for the slow learner
  5. DrawBot - Parts Ordered!!!
  6. DrawBot - The Breakdown
  7. DrawBot - Parts Shipped!!!
  8. DrawBot - What would you draw?
  9. DrawBot - The Plan!
  10. DrawBot - The Hacks
  11. DrawBot - Giant Unicorn?
  12. DrawBot - The Delivery?
  13. DrawBot - The Delivery, Part II
  14. DrawBot – The Delivery, Part III
  15. DrawBot – The Software, Part I (and an existential conversation)
  16. DrawBot – The Delivery, Part IV
  17. DrawBot – The Assembly, Part II
  18. DrawBot – The Assembly, Part III
  19. DrawBot – The Assembly, Part IV
  20. DrawBot – Design Considerations
  21. DrawBot – Halp!!! No - seriously, a little help?
  22. DrawBot – The Delivery, Part V
  23. DrawBot – The Silver Lining of Failure
  24. DrawBot – The Delivery, Part VI
  25. DrawBot – The Assembly, Part V
  26. DrawBot – The Assembly, Part VI
  27. DrawBot – Printed Parts
  28. DrawBot – The Operation, Part I
  29. DrawBot – The Assembly, Part VIII
  30. DrawBot – The Breakdown, Part II
  31. DrawBot – Printing!
  32. DrawBot – Printing, Part II
  33. DrawBot – Why are you crying?
  34. DrawBot – Calibration
  35. DrawBot – Pen Selection
  36. DrawBot – How to Recover from a Stalled Print!
  37. DrawBot – Drawing Success(ish)!!!
  38. DrawBot – Pen Selection, Part II
  39. DrawBot – Onwards and Upwards!
  40. DrawBot – Another Successful(ish) Drawing!, and an Update
  41. Restarting a Stalled DrawBot Drawing
  42. TSP FTW!
  43. Speedier DrawBot Drawings
  44. Excellent DrawBot Slides
  45. Another Drawing Robot!!!
  46. DrawBot Practice Tip: A Watched Pot
  47. The biggest inkjet printer ever
  48. Why do DrawBots draw on walls?
  49. Maze Code + Polargraph?
  50. All New Polargraph on the way!!!
  51. Ideas for improving my DrawBot
  52. DrawBot Aesthetic Re-Design Ideas
  53. The Eagle Has Landed
  54. Every Body Needs a Skull
  55. This project is not going to overengineer itself
  56. Overengineered Spools
  57. Overengineered Stepper Motor Mounts, Filament Guides
  58. Overengineered Bolt Endcaps, Case Holder
  59. Sourcing DrawBot Parts
  60. DrawBot - A Tour!
  61. Building an Arduino Drawing Robot - On The Cheap
  62. Unidentified Foam Object
  63. Arduino Powered Drawing Robot - Take 2 (Or 3)
  64. DrawBot, now ACTUALLY wall mounted!
  65. A Study of Drawing Robot Pen Holders and Design Considerations
  66. Drawing Robot Pen Holders, Calligraphy Pens, and Thought Experiments
  67. Ideal Qualities in a Drawing Robot Pen Holder
  68. Enough talk! Finally a pen holder!
  69. DrawBot Pen Holder Post Mortem
  70. To Maker Faire!!!
  71. Skipping! How could I forget the skipping?!
  72. Drawing Robot Penmanship
  73. PlotterBot at Maker Faire Bay Area 2013!
  74. PlotterBot.com - a new site dedicated to drawing robots
  1. Doctor, she’s been acting listless… []
  2. … and unresponsive… []
  3. …and has a fever!  What should I do?! []
  4. VERY nearly almost called this the Cure and linked to a YouTube video.  It’s really just too damn early in the morning for me to write such a thing or you to read such a thing.  As much as I like the Cure, they’re not morning music, you know? []
  5. Like the Smiths []

6 Responses to “DrawBot – How to Recover from a Stalled Print!”

  1. Sandy Noble says:

    Hi up, these kinds of pauses can’t be tolerated! I thought I’d fixed all the problems. Does it stop at the same point, or same time through a drawing? I’m sure you’ve already done this, but make sure you’ve got the newest firmware code, and the most up to date accelstepper library.

    I tried a few different methods for restarting failed drawings in the past, in the bad old days when it could only draw for four or five hours at a time and it’d stop. Actually the reason it was stopping was because of a timer rollover thing – it would start again five hours later if left to it’s own devices. That got fixed.

    The C09 command does like you say – tells the machine where the pen is. If you have a stalled drawing you can do like you did and issue a special C09 command, but you don’t know the exact position of the stall, so when it restarts it might be a bit off. I could usually fix little offsets by holding or twisting the spools by hand as it was running. But the better way to do it is to move it back to the home point, issue a new “home” command, and let the remaining pixels run from there. Their positions are all absolute so it’ll pick up from the last one ok.

    One thing is that it might not know which direction the row is drawing in. Fix this by prepending C08, 2, 2, END to the beginning of the exported command queue. This tells the machine that the row direction is being drawn in a south-east direction (left to right), or you can try a C08,2,4,END that will tell it to draw in a north-westerly direction (right to left).

  2. Sandy Noble says:

    Oh one more thing, Columbo style, the C05 command that is used to render a square wave pixel:

    Instructs the machine to draw a pixel with it’s centre at 3103,4350, so if you wanted to pick up at the beginning, or the end of that pixel then your C09 position should be a little offset (by half a pixel – 14). Depends where the print stalled.

  3. […] suspect that my attempt to fix the stalled drawing probably did not have a role to play in the robot drawing off the top edge of the paper.  I think […]

  4. MakerBlock says:

    @Sandy: Thanks for checking in!
    I’m not sure exactly when the process is stopping. In one instance it stopped after an hour or so, another time after about an hour and twenty minutes. That last stoppage was at about three hours or so? I believe I’m using the very latest firmware and accelstepper. However, I’ll check on this when I get home. Thank you so much for the advice on how to recover from a stall! I’m definitely going to play around with those commands.

  5. Sandy Noble says:

    I’m almost 100% sure that the old issue around this is fixed, it was actually an accelstepper thing that Mike sorted out right away. Does the arduino decide to quit communicating if it _isn’t_ drawing? tricky to tell, I know, but it should be issuing it’s “READY” every four or five seconds if left to idle.

    Does it do it if you unplug the motorshield and run the drawing without? You could maybe test how stalled it is by attempting to issue a command manually through serial monitor in arduino. Not sure if that’d work or if it’ll reset it.

  6. MakerBlock says:

    @Sandy: What I’ll do is nuke my software installation and reinstall from scratch. I haven’t seen the Arduino quit if I’m not drawing… but I definitely do not see the behavior you described with the “READY” every 4-5 seconds. I haven’t tried running the ‘bot without the motor shield! I didn’t even occur to me to try that! Haha! I’ll update the blog after I reinstall the software and test it out.