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.

  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.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>