Oh For Heaven's Sake!

Ask the MakerGear community for assistance...
User avatar
ednisley
Posts: 1188
Joined: Fri Apr 11, 2014 5:34 pm
Location: Halfway up the Hudson
Contact:

Re: Oh For Heaven's Sake!

Post by ednisley » Thu Mar 19, 2015 3:17 pm

lem wrote:really means a communication error
So, for example ...

The M105 command should return the current temperature, whereupon the PC host program updates the on-screen thermometer. That exchange happens once every second, amid the torrent of G-Code going out to the printer.

If the printer doesn't respond with something that looks like:

Code: Select all

ok T:11.7 /0.0 B:11.1 /0.0 T0:11.7 /0.0 @:0 B@:0
Then the host program tries again, assuming that the firmware will eventually produce the expected response. Unfortunately, the firmware doesn't have a lot of error recovery built in, some commands can produce protracted delays, the USB interface isn't just a hollow pipe that carries data, and Marlin pulls commands from a FIFO command buffer .

For example, when the firmware sees M303, it'll spend the next several minutes auto-tuning the extruder's PID parameters, regardless of whether it's idle or in the middle of seven hours of printing. If the host intended to send:

Code: Select all

M105
G1 X-10.303 Y-4.901 F15000.000
Suppose one of those imponderable USB glitches that seem to plague Windows happens at exactly the right moment. As far as Marlin can tell, the host sent:

Code: Select all

M303 Y-4.901 F15000.000
Whereupon the firmware sees the M303 command (plus some irrelevant junk), does exactly what it's been told to do, and looks like it's dead to the world for quite a while.

The G-Code syntax includes a line-by-line checksum that's supposed to prevent that sort of problem, but ...

That's obviously a contrived example, but you get the general idea: a "communications failure" happens when the conversation between the host and the printer gets out of sync. Once that happens, it's really really hard to recover, because the host program has no idea what the printer has been doing lately.

Fun fact 1: G-Code files on the SD card don't have checksums.
Fun fact 2: Reading from the SD card isn't infallible.

User avatar
Jules
Posts: 3144
Joined: Wed Jan 21, 2015 1:36 am

Re: Oh For Heaven's Sake!

Post by Jules » Thu Mar 19, 2015 4:14 pm

a "communications failure" happens when the conversation between the host and the printer gets out of sync. Once that happens, it's really really hard to recover, because the host program has no idea what the printer has been doing lately.
Ugh! That makes perfect sense, because that was exactly what happened - I did get in there and look at the code streaming by on the Communications panel before it scrolled out of reach.

I didn't realize that the M105 code was sent that frequently - i guess that pretty much makes it the flag for comm failure of any kind, and it does not necessarily mean I need to swap out the hotend! (That in itself is good to know. :roll: )

I did get the piece to print from the SD card (unfortunately with a little edge warp again -fricking hairspray) - but i don't really like how it turned out so I'm going to make a few modifications and run it again.

(Occasional hiccups notwithstanding, I am just having a blast with this thing! It's pure-D addictive! I've got to dial it back to get anything else done now.)

lem
Posts: 162
Joined: Thu Jan 15, 2015 6:44 pm

Re: Oh For Heaven's Sake!

Post by lem » Thu Mar 19, 2015 5:35 pm

I love UPS (not the shipper). Uninterruptable power supply.

I have one on every computer and certainly my 3D printer. My 3D printer can print for three hours off the grid. After that I'm toast, but it sure helps out with small power outages.

User avatar
Jules
Posts: 3144
Joined: Wed Jan 21, 2015 1:36 am

Re: Oh For Heaven's Sake!

Post by Jules » Thu Mar 19, 2015 6:23 pm

lem wrote:I love UPS (not the shipper). Uninterruptable power supply.

I have one on every computer and certainly my 3D printer. My 3D printer can print for three hours off the grid. After that I'm toast, but it sure helps out with small power outages.
I have one on the computer, just hadn't gotten around to getting one for the printer yet. (Got to remember to do that one of these weekends.) I do have it on a surge protector. :)

Bratag
Posts: 438
Joined: Wed Jan 14, 2015 5:33 am

Re: Oh For Heaven's Sake!

Post by Bratag » Thu Mar 19, 2015 7:06 pm

lem wrote:I love UPS (not the shipper). Uninterruptable power supply.

I have one on every computer and certainly my 3D printer. My 3D printer can print for three hours off the grid. After that I'm toast, but it sure helps out with small power outages.
UPS and 20kw full house generator here. I joke that when the power goes out I like to turn on all the lights etc in my house and mock the neighbours.

lem
Posts: 162
Joined: Thu Jan 15, 2015 6:44 pm

Re: Oh For Heaven's Sake!

Post by lem » Thu Mar 19, 2015 7:09 pm

Suppose one of those imponderable USB glitches that seem to plague Windows happens at exactly the right moment. As far as Marlin can tell, the host sent:

Code: Select all
M303 Y-4.901 F15000.000


Whereupon the firmware sees the M303 command (plus some irrelevant junk), does exactly what it's been told to do, and looks like it's dead to the world for quite a while.
Progress. I know RS-232 is ancient, but it worked.

jsc
Posts: 1864
Joined: Thu Apr 10, 2014 4:00 am

Re: Oh For Heaven's Sake!

Post by jsc » Thu Mar 19, 2015 7:12 pm

I had a full house generator installed after Hurricane Sandy took out my power for a week. What was particularly galling was that all the houses starting two houses down were all back for days before us, presumably on another circuit. Of course, just like it never rains when you bring an umbrella, we haven't had a power failure yet since then.

User avatar
ednisley
Posts: 1188
Joined: Fri Apr 11, 2014 5:34 pm
Location: Halfway up the Hudson
Contact:

Re: Oh For Heaven's Sake!

Post by ednisley » Thu Mar 19, 2015 7:30 pm

lem wrote:Progress. I know RS-232 is ancient, but it worked.
The whole communications stack imitates RS-232 over USB; the big win seems to be having more than two COM ports on one computer, even if you can't tell which is which. [sigh]

The more things change, the more they stay the same!

That said, I haven't dropped a jumper into a CPU fan in quite a while...

Bratag
Posts: 438
Joined: Wed Jan 14, 2015 5:33 am

Re: Oh For Heaven's Sake!

Post by Bratag » Thu Mar 19, 2015 7:37 pm

jsc wrote:I had a full house generator installed after Hurricane Sandy took out my power for a week. What was particularly galling was that all the houses starting two houses down were all back for days before us, presumably on another circuit. Of course, just like it never rains when you bring an umbrella, we haven't had a power failure yet since then.
Yeah its true, we used to be without power on a regular basis, had the generator installed and since there its been rock solid for months and months. Still better to have it and not need it etc etc

Vprints
Posts: 50
Joined: Thu Feb 19, 2015 8:06 pm

Re: Oh For Heaven's Sake!

Post by Vprints » Thu Mar 19, 2015 9:59 pm

Jules wrote: (Occasional hiccups notwithstanding, I am just having a blast with this thing! It's pure-D addictive! I've got to dial it back to get anything else done now.)
Yup, pretty much sums up my last month. ;)
-Vprints

Changing my world, one print at a time

Post Reply