Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cold extrusion misbehavior #1859

Closed
clefranc opened this issue Apr 8, 2015 · 9 comments
Closed

Cold extrusion misbehavior #1859

clefranc opened this issue Apr 8, 2015 · 9 comments
Assignees

Comments

@clefranc
Copy link
Contributor

clefranc commented Apr 8, 2015

EDIT : on delta only

Doing more test from #1846, I got this when trying a 1mm cold extrusion:

00:25:26.433 : N16 G91 *6
00:25:26.433 : N17 G1 E1 F600 *58
00:25:26.433 : N18 G90 *9
00:25:26.439 : echo: cold extrusion prevented
00:25:26.442 : echo: cold extrusion prevented
00:25:26.444 : echo: cold extrusion prevented
00:25:26.445 : echo: cold extrusion prevented
00:25:26.447 : echo: cold extrusion prevented
00:25:26.449 : echo: cold extrusion prevented
00:25:26.451 : echo: cold extrusion prevented
00:25:26.452 : echo: cold extrusion prevented
00:25:26.454 : echo: cold extrusion prevented
00:25:26.456 : echo: cold extrusion prevented
00:25:26.458 : echo: cold extrusion prevented
00:25:26.460 : echo: cold extrusion prevented
00:25:26.461 : echo: cold extrusion prevented
00:25:26.463 : echo: cold extrusion prevented
00:25:26.465 : echo: cold extrusion prevented
00:25:26.467 : echo: cold extrusion prevented
00:25:26.468 : echo: cold extrusion prevented
00:25:26.470 : echo: cold extrusion prevented
00:25:26.472 : echo: cold extrusion prevented
00:25:26.474 : echo: cold extrusion prevented
00:25:26.476 : echo:endstops hit:  X:0.01 Y:0.01 Z:0.01

The odd part is the endstops hit at the end ???

On the second 1mm attempt, the last endstops line is gone !!! So perhaps it's normal behavior for endstops, but the multiple prevented messages is definitively not.

@thinkyhead
Copy link
Member

What happens if you do this…? Maybe de is very close to zero but not zero. It's a stretch, I know.

#ifdef PREVENT_DANGEROUS_EXTRUDE
  if (de < -0.0001 || de > 0.0001) { ...

@thinkyhead
Copy link
Member

The original code looked like this 13fbf42#diff-37f48ac4f0d16c80cfe24c1d399f6340L565

@clefranc
Copy link
Contributor Author

clefranc commented Apr 8, 2015

@thinkyhead Same result with 0.001 tolerance.

With the host sending a single G1 command I get:

1mm = 10 messages
10mm = 100 messages
100mm = 1000 messages

I doubled my E steps/unit, same result.

@clefranc
Copy link
Contributor Author

clefranc commented Apr 8, 2015

@thinkyhead
I should have looked at my i3, this is happening only on delta, here is the loop calling plan_buffer_line multiple time:

https://github.com/MarlinFirmware/Marlin/blob/Development/Marlin/Marlin_main.cpp#L5503

Personally, I'd move the cold extrusion prevention code from the planner to the prepare_move() function. I think it's its main functionality, even the prepare move should be in planner.cpp.

I'm sure you'll find an elegant solution, as always...

@thinkyhead
Copy link
Member

How about this in prepare_move…? #1876

void prepare_move() {
  clamp_to_software_endstops(destination);
  refresh_cmd_timeout();

  #ifdef PREVENT_DANGEROUS_EXTRUDE
    float de = destination[E_AXIS] - current_position[E_AXIS];
    if (de) {
      if (degHotend(active_extruder) < extrude_min_temp) {
        current_position[E_AXIS] = destination[E_AXIS]; // Behave as if the move really took place, but ignore E part
        SERIAL_ECHO_START;
        SERIAL_ECHOLNPGM(MSG_ERR_COLD_EXTRUDE_STOP);
      }
      #ifdef PREVENT_LENGTHY_EXTRUDE
        if (labs(de) > EXTRUDE_MAXLENGTH) {
          current_position[E_AXIS] = destination[E_AXIS]; // Behave as if the move really took place, but ignore E part
          SERIAL_ECHO_START;
          SERIAL_ECHOLNPGM(MSG_ERR_LONG_EXTRUDE_STOP);
        }
      #endif
    }
  #endif

  . . .

@AnHardt
Copy link
Member

AnHardt commented Apr 28, 2015

@clefranc
Is the error gone? Can this be closed?

@thinkyhead
Copy link
Member

I believe that this was fixed by #1876 which makes a check at a higher level so there will only be one attempt instead of many. At least, I hope so...

@boelle
Copy link
Contributor

boelle commented Jun 29, 2015

we have not heard from @clefranc in 3 months so closing

@boelle boelle closed this as completed Jun 29, 2015
@github-actions
Copy link

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.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants