davidramiro / Marlin-Ai3M

🖨 Marlin firmware optimized for the Anycubic i3 Mega 3D printer
GNU General Public License v3.0
519 stars 184 forks source link

[BUG] Filament Sensor not working #132

Closed mr-who2012 closed 1 year ago

mr-who2012 commented 1 year ago

Describe the bug When the printer runs out of filament, the filament-sensor doesn't send a message to octoprint. Therefore the print doesn' get paused when filament runs out. There IS however a message on the printer's touch screen: "lack of filament", when the sensor is empty.

According to this octoprint-thread, the firmware was missing host action commands. So this doesn't seems to be an octoprint-bug, but a marlin issue. The thread reads:

"To enable support, you need to do the following: Marlin: Uncomment #define HOST_ACTION_COMMANDS in Configuration_adv.h and recompile. "

In davidramiro's version of marlin however, this line doesn't seem to exist. At least it's not in the file Configuration_adv.h.

To Reproduce Steps to reproduce the behavior:

  1. Start printer
  2. Start a print job with octoprint from the raspberry-pi's internal storage.
  3. Cut the filament, so that the sensor will be empty in the middle of the print.
  4. The printer is just ignoring the filament-sensor. The printer continues printing until the end of the print-job, even though there is no filament coming out of the nozzle.

Expected behavior The print should pause as soon as the filament sensor detects filament did run out. Giving the user the oportunity to refill the filament and resume the print-job, no matter ho much time passed since filament-runout.

Printer (please complete the following information):

M503 Output Send: M503 Recv: echo: G21 ; (mm) Recv: Recv: echo:Filament settings: Disabled Recv: echo: M200 D1.75 Recv: echo: M200 D0 Recv: echo:Steps per unit: Recv: echo: M92 X80.00 Y80.00 Z400.00 E444.26 Recv: echo:Maximum feedrates (units/s): Recv: echo: M203 X500.00 Y500.00 Z6.00 E30.00 Recv: echo:Maximum Acceleration (units/s2): Recv: echo: M201 X3000 Y2000 Z60 E10000 Recv: echo:Acceleration (units/s2): P R T Recv: echo: M204 P3000.00 R1500.00 T3000.00 Recv: echo:Advanced: Q S T X Y Z E Recv: echo: M205 Q20000 S0.00 T0.00 X8.00 Y8.00 Z0.40 E5.00 Recv: echo:Home offset: Recv: echo: M206 X0.00 Y0.00 Z0.00 Recv: echo:Mesh Bed Leveling: Recv: echo: M420 S0 Z0.00 Recv: echo:Endstop adjustment: Recv: echo: M666 Z0.00 Recv: echo:PID settings: Recv: echo: M301 P15.94 I1.17 D54.19 Recv: echo: M304 P251.78 I49.57 D319.73 Recv: echo:Linear Advance: Recv: echo: M900 K0.80 Recv: echo:Filament load/unload lengths: Recv: echo: M603 L538.00 U555.00 Recv: ok

M115 Output

Send: M115 Recv: FIRMWARE_NAME:Marlin 1.1.9 (Github, davidramiro) MARLIN-AI3M_VERSION:v1.4.6 SOURCE_CODE_URL:https://github.com/davidramiro/Marlin-AI3M PROTOCOL_VERSION:1.0 MACHINE_TYPE:Anycubic i3 Mega EXTRUDER_COUNT:1 UUID: xxx Recv: Cap:SERIAL_XON_XOFF:0 Recv: Cap:EEPROM:1 Recv: Cap:VOLUMETRIC:1 Recv: Cap:AUTOREPORT_TEMP:1 Recv: Cap:PROGRESS:0 Recv: Cap:PRINT_JOB:1 Recv: Cap:AUTOLEVEL:0 Recv: Cap:Z_PROBE:0 Recv: Cap:LEVELING_DATA:1 Recv: Cap:BUILD_PERCENT:0 Recv: Cap:SOFTWARE_POWER:0 Recv: Cap:TOGGLE_LIGHTS:0 Recv: Cap:CASE_LIGHT_BRIGHTNESS:0 Recv: Cap:EMERGENCY_PARSER:1 Recv: Cap:AUTOREPORT_SD_STATUS:0 Recv: Cap:THERMAL_PROTECTION:1 Recv: ok Send: M155 S2 Recv: ok

davidramiro commented 1 year ago

HOST_ACTION_COMMANDS is present in the 2.0.x branch, this is 1.1.9.