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.22k stars 19.22k forks source link

[BUG] SKR 1.4 Filament Runout Sensor on Pins 1.26 & 1.25 don't work when printing. M600 is not executed. #19453

Closed kkberg closed 4 years ago

kkberg commented 4 years ago

Bug Description

Both runout sensors are configured to pins 1.26 and 1.25 M119 shows correct working behavoir when Filament is in or out status changes between open and triggered correctly. M600 isn't executed.

My Configurations

Config.zip

Steps to Reproduce

  1. try sensors with M119 when filament is in and out
  2. start a print
  3. simulate an empty filament spool

Expected behavior: I would expect running of M600 which is configured

Actual behavior: No reaction on missing filament M412 is activated

Additional Information

There is no sensorless homing and no diag pins

kkberg commented 4 years ago

Switched to a SKR 1.3 with same firmware and same issue.

martinziener commented 4 years ago

I have the same issue on skr1.4. M412 is activated, M119 shows correct working; M600 not activated, just keeps printing

thisiskeithb commented 4 years ago

I just tested a couple SKR 1.4 builds running bugfix-2.0.x (225487f9db7d1a7aaf6886a283c7758a9ae2181e) with a filament runout sensor connected to FIL_RUNOUT_PIN/P1_26 and filament runout detection works as expected in both cases:

M119 output with filament present: filament: TRIGGERED M119 output with filament removed: filament: open

Have your filament runout sensors worked before? Can both of you test the latest bugfix-2.0.x to see if this is still an issue?

kkberg commented 4 years ago

Thanks for your reply. My sensors worked before. M119 works well and also when printing M119 status is correct but M600 isn't triggered. M600 is activated. I'll try the bugfix later today. Thank you again.

kkberg commented 4 years ago

I tried it and M600 isn't triggered. Used the latest bugfix from today. I use these switches, they show right status with M119 even when printing and cutting filament. Runoutsensor

kkberg commented 4 years ago

I just tested a couple SKR 1.4 builds running bugfix-2.0.x (225487f) with a filament runout sensor connected to FIL_RUNOUT_PIN/P1_26 and filament runout detection works as expected in both cases:

* Begin print

* Cut filament

* Runout is triggered & `M600` is kicked off

* Filament automatically unloads

* Prompted to load filament/press encoder to continue

* Filament is loaded

* Print continues after clicking Continue on the Purge More screen

M119 output with filament present: filament: TRIGGERED M119 output with filament removed: filament: open

Have your filament runout sensors worked before? Can both of you test the latest bugfix-2.0.x to see if this is still an issue?

Which kind of switches do you use Keith?

thisiskeithb commented 4 years ago

Which kind of switches do you use Keith?

A couple of Prusa's latest IR filament sensors and a basic 3 pin/switch style.

kkberg commented 4 years ago

I tried a 3 pin switch without pcb and also not working. But all switches shop right M119 values. In the moment I've no idea what is causing the problem. A smart sensor is ordered to see how it works or not. Maybe the other guys who have same problem try out additional things. But first thank you for your help.

martinziener commented 4 years ago

Running the latest bugfix from this morning didn't help me neither; problem remains.

The only difference I see is: M119 output with filament present: filament: OPEN (I have a 'FIL_RUNOUT_STATE HIGH' switch

thisiskeithb commented 4 years ago

The only difference I see is: M119 output with filament present: filament: OPEN

Try inverting FIL_RUNOUT_STATE

martinziener commented 4 years ago

Changed FIL_RUNOUT_STATE to LOW; M119 output with filament present: filament: TRIGGERED But M600 is still not triggered in any way

thisiskeithb commented 4 years ago

Do you get any output over serial? Also, please zip up and attach your configs for review.

martinziener commented 4 years ago

No, no output over serial config.zip

kkberg commented 4 years ago

I already did tests with LOW or HIGH before writing the issue. Also not triggering M600. It shouldn't matter if it's configured LOW or High, it should trigger if status of switch changes. Keith please provide your config to find any other settings which could influence. I would like to try your version to see if it'll run on my board. My switches should work, because they are standart in other printers too. Thank you

PS what do you mean with output over serial? Or is a TFT meant.

medline2c commented 4 years ago

Bonjour, même soucis avec SKR 1.4 Turbo et capteur optique !... IMPOSSIBLE de lancer une impression : il me dit toujours qu'il n'y a plus de filament !

Mes paramètres (Configuration.h) :

#define FILAMENT_RUNOUT_SENSOR
  #define FIL_RUNOUT_ENABLED_DEFAULT true
  #define NUM_RUNOUT_SENSORS   1
  #define FIL_RUNOUT_STATE     LOW
  #define FIL_RUNOUT_PULLUP
  #define FILAMENT_RUNOUT_SCRIPT "M600"

dans pins_BTT_SKR_V14.4.h :

#define FIL_RUNOUT_PIN                     P1_26  // E0DET    => J'ai bien connecté le S du capteur sur cette pin
#define FIL_RUNOUT2_PIN                    P1_25  // E1DET

J'utilise Marlin 2.0.6.1...

skr1.4Turbo.zip

thisiskeithb commented 4 years ago

Here's an example config that uses a simple switch: SKR14-example.zip

PS what do you mean with output over serial? Or is a TFT meant.

I mean like terminal output over USB/in your host software like Pronterface/OctoPrint/etc.

thisiskeithb commented 4 years ago

@medline2c Please don't paste your config since translating your comments will be more difficult. Just zip them up and attach.

medline2c commented 4 years ago

@ medline2c Veuillez ne pas coller votre configuration car la traduction de vos commentaires sera plus difficile. Fermez-les simplement et attachez-les.

Désolé, je suis nouveau ici, j'ai supprimé les commentaires pour laisser l'essentiel : je dois tout supprimer ou je laisse ainsi ? J'ai regardé l'exemple SKR14-example.zip, je ne vois rien de différent de ma configuration si ce n'est HIGH au lieu de LOW pour FIL_RUNOUT_STATE. J'ai essayé HIGH et ça donne le même résultat..

medline2c commented 4 years ago

@ medline2c Veuillez ne pas coller votre configuration car la traduction de vos commentaires sera plus difficile. Fermez-les simplement et attachez-les.

J'ai testé tes fichiers avec MOTHERBOARD BOARD_BTT_SKR_V1_4_TURBO

Aucun changement, mêmes symptômes que décrit précédemment ...

kkberg commented 4 years ago

I tried Keith's config with todays bugfix and it also doesn't work on my SKR 1.4 . I tried several switches and had no luck.

thisiskeithb commented 4 years ago

Check your wiring as well?

kkberg commented 4 years ago

Wiring is okay, V G S are right, also when using a 2 wire switch. Otherwise there could be a short. M119 shows right status.

martinziener commented 4 years ago

Same here; Everything looks and registers ok but marlin doesn't seem to notice the pin change.

martinziener commented 4 years ago

Success! Changing #define FILAMENT_RUNOUT_SCRIPT "M600" to "M600 T0" did the trick for me. (got it from issue #18341)

Shouldn't this be documented somewhere within Marlin?

thisiskeithb commented 4 years ago

Success! Changing #define FILAMENT_RUNOUT_SCRIPT "M600" to "M600 T0" did the trick for me. (got it from issue #18341)

M600 should work with the active extruder.

@martinziener: you shouldn't have had to specify the extruder since since your config is for a single extruder/hotend. M600 works without T0 on my single nozzle/single extruder builds, so it's odd that it doesn't work the same for yours.

In the case of @kkberg's config with dual extruders, specifying M600 T0 may have an undesired effect of performing the filament swap on the incorrect extruder.

martinziener commented 4 years ago

It works with T0, tried again without T0 but no success.

thisiskeithb commented 4 years ago

Just for good measure, are you Initializing EEPROM after each flash? You can do it through the LCD or by sending M502 followed by M500.

martinziener commented 4 years ago

:-) yes

kkberg commented 4 years ago

Tried M600 T0 but still same problem. I now try it out with defining only on sensor. I think it's definitly a Marlin error. I found the M600 T0 some days ago and it didn't work with the vanilla version.

kkberg commented 4 years ago

No succesess, tried with both switch versions. I now go down to one extruder and try out if it depends on extruder count.

kkberg commented 4 years ago

still not working ... @martinziener would you please send me your config and commit version you use? Thank you

martinziener commented 4 years ago

config.zip It's the bugfix version from this morning, I don't know where I can find the exact commit version Be ware... it's configured for corexy

kkberg commented 4 years ago

thank you, I'll make the needed changes for my printer. I also use that version.

medline2c commented 4 years ago

Je ne peux tester cette solution car ma version ne me permets pas de démarrer l'impression : il me dit toujours qu'il n'y a pas de filament... dois-je ouvrir un autre post pour ce soucis ou est-ce en lien ?

martinziener commented 4 years ago

@medline2c; I don't think these problems are related

kkberg commented 4 years ago

Didn't work with one extruder too. Don't know if it makes sence to go on with sensors. Printing is possible without sensors. I think if it works on several boards and on my board not it could be hardware but I'm not convinced. May be I give Klipper a try or Smoothieware.

kkberg commented 4 years ago

Just got a smart runout sensor and it also doesn't work on the 1.4 . Game over ... with BTT

martinziener commented 4 years ago

Which drivers are you using? Are they using any Diag pin?, in that case it wouldn't work

kkberg commented 4 years ago

My drivers are TMC2130 but don't have the diag pin soldered, I don't use sensorless homing. That was the first thing I did and took the pins off.

martinziener commented 4 years ago

You could try the P0_10 probe pin, at least that one doesn't have hardware pullups (I use that pin for my inductive z-probe)

kkberg commented 4 years ago

I'll give it a try, I have BL-Touch on Z-min. Thank you

Trenchi commented 4 years ago

Hello Guys,

"First: Sorry for my bad English. I'm from Germany and had a little help from a translator."

I have this problem too. I use a SKR 1.4 Turbo with TMC2208 a Bigtreetech 2 in 1 Out hotend and 2 runout sensors on a TFT 35 V3.0. (Marlin V2.0.6.1)

Both runout sensors are connected to pin 1.25 and 1.26.

At pin 1.26 a signal bridge is connected to the TFT 35 to trigger the runout sensor in touchscreen mode. (If you don't do this, the sensor only works in touchscreenmode and not in marlin mode of the display but that's not important here)

As I said, Runout Sensor 1 of pin 1.26 on the board is additionally connected to the TFT 35 (Only Ground & Signal).

If I now print with the TFT 35 in touchscreen mode the Runout Sensor 1 works (it is bridged to the display). If I now print in Marlin mode for Filament Mixing then BOTH runout sensors do NOT work!

With Pronterface I can trigger both runout sensors easily and they work.

I also think it is a Marlin problem because the sensor works on the TFT35 display and this has his own firmware.

Today after work I will try the current bugfix version. Maybe the problem is solved.

thisiskeithb commented 4 years ago

Please attach your configs. Also: Have these sensors worked in a prior version of Marlin?

It's odd that there's now a run of people having issues all of sudden, especially since I can't reproduce them on my boards.

Trenchi commented 4 years ago

yes, everything worked in V2.0.6.0

I noticed it when I changed to the Bigtreetech 2in 1out a few days ago. There I updated to V2.0.6.1.

after the rebuild i only set the Mixing in the configuration files.

The sensors are also only gimmicks. It also works without. But as it is, if it is there it should work.

I attach my Config V2.0.6.2 with Mixing and also my old Config V2.0.6.0 WITHOUT Mixing.

With V2.0.6.1 there was also the problem that my Z-axis went in the wrong direction (I have CoreXY) and so I had to change the direction of rotation.

Yesterday I played a little bit with VSCode and I hope that no strange things are activated in the current configuration. I tried to solve the problem with #define FILAMENT_RUNOUT_SCRIPT "M600" to "M600 T0". But I didn't flash it to the printer because there were a lot of yellow warning messages when compiling.

I am still at work and can only show the configuration that is stored on the NAS. So if you look at my configuration V2.0.6.1 please ignore everything that is unnecessary and has nothing to do with runout sensors. Config v2.0.6.1 Mixing E.zip Config V2.0.6.0 Without Mixing.zip

thisiskeithb commented 4 years ago

@Trenchi Please try with the latest bugfix-2.0.x to see if your runout sensors work.

thisiskeithb commented 4 years ago

I pinged @rhapsodyv since there were some possible PRs of his that may have affected this board and he's received similar reports from users with Chitu boards (STM32F103RE).

This could be a deeper Marlin issue, but he's looking into it.

kkberg commented 4 years ago

Just tried P0.10 and also correct values with M119 but not triggering M600. @Trenchi I'm from Germany too :)

kkberg commented 4 years ago

I pinged @rhapsodyv since there were some possible PRs of his that may have affected this board and he's received similar reports from users with Chitu boards (STM32F103RE).

This could be a deeper Marlin issue, but he's looking into it. @thisiskeithb That sounds promissing and hopefully he will find it. I already prepared a lot of boards with Marlin and I had always luck :). Thank you Keith for your help

rhapsodyv commented 4 years ago

@kkberg

Did the printer pause or it keep working?

Did you try changing FILAMENT_RUNOUT_SCRIPT to M125 or M25 to test?

I'm trying to isolate the problem.

kkberg commented 4 years ago

@rhapsodyv print keeps printing without any pause. I didn't try M125 or M25 because I didn't know that it's possible to use any other gcode. I'll try it soon. Thank you very much for your fast answer.