MarlinFirmware / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
https://marlinfw.org
GNU General Public License v3.0
16.14k stars 19.2k forks source link

FILRUNOUT #1948

Closed Wurstnase closed 8 years ago

Wurstnase commented 9 years ago

Is there a reason for

#if HAS_FILRUNOUT 
    if (card.sdprinting && !(READ(FILRUNOUT_PIN) ^ FIL_RUNOUT_INVERTING)) 
    filrunout(); 
#endif 

the card-part?

Marlin_main.cpp#L5820

nophead commented 9 years ago

Presumably if it was printing from a host the host would get upset when it stopped responding during the M600 filament change procedure.

Wurstnase commented 9 years ago

Could a M400 solve this?

nophead commented 9 years ago

I don't see how. To work it would need to continue to reply to the host and somehow indicate it was busy to stop the host timing out and giving up.

Easier for the host to read filament pin occasionally and handle the filament change itself.

Wurstnase commented 9 years ago

good idea! for repetier host it's easy. We can make a MSG_FILRUNOUT and save this in the eeprom or something like this. When the pin change it can send a @pause for repetier and something else for other hosts.

ntoff commented 9 years ago

Presumably if it was printing from a host the host would get upset when it stopped responding during the M600 filament change procedure.

I print from Pronterface and it plays nicely with M600 filament change commands

Wurstnase commented 9 years ago

Also while printing?

ntoff commented 9 years ago

I print using pronterface, so I open the gcode, scroll to where I want the filament change, insert an M600, load it up in pronterface, and hit print.

When it gets to the filament change the printer goes home, beeps like crazy at me (sounds a bit like the alarm from Ghost Busters) until I change the filament and hit the button. Then off it goes on its merry way again.

I don't know how long I could leave it sit for because the heaters are on and I sit & watch it when it's about to come up to the filament change. I've not had pronterface time out though.

Granted this is version 1.0.2 "stable" release, not the latest dev version so something may have changed.

Wurstnase commented 9 years ago

Ok, when this works, we could also remove card.sdprinting &&

nophead commented 9 years ago

Putting M600 in the gcode and sending from the host is a different case to the runout switch triggering the firmware to inject M600. In the former case the host could see the M600 in the stream and expect to wait. In the later case the host would be unaware unless M600 sends something to it. It would just see the firmware become unresponsive.

On 21 April 2015 at 12:33, Wurstnase notifications@github.com wrote:

Ok, when this works, we could also remove card.sdprinting &&

Reply to this email directly or view it on GitHub https://github.com/MarlinFirmware/Marlin/issues/1948#issuecomment-94755584 .

Wurstnase commented 9 years ago

Good argument. I will go forward with your idea.

MagoKimbra commented 9 years ago

You're forced to check sd.printing, otherwise at any time, even when the printer is switched on there is the thread running the command fw m600. Instead so only when it is in print does control the switch to end thread ...

Wurstnase commented 9 years ago

That could be made by a gcode. Some sign for the firmware which activates the sensor.

MagoKimbra commented 9 years ago

Yes Wurstnase. I create gcode M11, this is placed at the beginning of a gcode to indicate the start print and from this moment can be controlled the switch filrunout.... But if tou print from sd the card.sdprinting is useful for this...

Wurstnase commented 9 years ago

I wouldn't take an other M-code. M600 S1/S0 for activation/deactivation should make that job. So keeping the functions close together will make the job easier for the people.

MagoKimbra commented 9 years ago

Yes this is a best solution.... I use M11 because one software (i do not rember name) use m11 when start transfer gcode to printer for print, and i decide use M11 for filrunout, but your solution is better...

jbrazio commented 8 years ago

Thank you for your interest making Marlin better. You should re-open this topic on MarlinFirmware/MarlinDev for proper followup from the development team. We suggest you to use the MarlinFirmware/Marlin#<topic id> markdown to link back to this original topic.

github-actions[bot] commented 2 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.