Quantcast
Channel: Reprap Forum - Firmware - Marlin
Viewing all articles
Browse latest Browse all 12108

Re: Dual Nozzle, Dual Stepper, Servo Actuated Nozzle - Marlin Settings?

$
0
0
Yep it does, in the existing Marline code, there is forced half second delay.

A hardcoded magic number (delay(500)) on line 6792 of Marlin_main.cpp

I'll post the relevent section from the marlin code below:

void tool_change(const uint8_t tmp_extruder, const float fr_mm_m/*=0.0*/, bool no_move/*=false*/) {
          <...code cut here....>
          #if ENABLED(SWITCHING_EXTRUDER)

            // <0 if the new nozzle is higher, >0 if lower. A bigger raise when lower.
            float z_diff = hotend_offset[Z_AXIS][active_extruder] - hotend_offset[Z_AXIS][tmp_extruder],
                  z_raise = 0.3 + (z_diff > 0.0 ? z_diff : 0.0);

            // Always raise by some amount
            planner.buffer_line(
              current_position[X_AXIS],
              current_position[Y_AXIS],
              current_position[Z_AXIS] + z_raise,
              current_position[E_AXIS],
              planner.max_feedrate_mm_s[Z_AXIS],
              active_extruder
            );
            stepper.synchronize();

            move_extruder_servo(active_extruder);
            delay(500);

            // Move back down, if needed
            if (z_raise != z_diff) {
              planner.buffer_line(
                current_position[X_AXIS],
                current_position[Y_AXIS],
                current_position[Z_AXIS] + z_diff,
                current_position[E_AXIS],
                planner.max_feedrate_mm_s[Z_AXIS],
                active_extruder
              );
              stepper.synchronize();
            }
          #endif

Viewing all articles
Browse latest Browse all 12108

Trending Articles