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

DUAL_NOZZLE_DUPLICATION_MODE #4362

Merged
merged 4 commits into from
Jul 23, 2016

Conversation

thinkyhead
Copy link
Member

Duplication mode for a dual nozzle machine without requiring Dual X Carriage. Enable the same way, using M605 S2. Disable with M605 S0 or G28. While in this mode, E1 will duplicate all moves sent to E0.

@jbrazio
Copy link
Contributor

jbrazio commented Jul 20, 2016

IMO we have to stop including features used by one person on earth.

@thinkyhead
Copy link
Member Author

@jbrazio Oh sure. But I consider my role to also be pedagogical.

@thinkyhead thinkyhead merged commit 652fd8a into MarlinFirmware:RCBugFix Jul 23, 2016
@thinkyhead thinkyhead deleted the rc_duplication_mode branch July 23, 2016 04:18
@jbrazio jbrazio modified the milestone: 1.1.0 Jul 23, 2016
@thinkyhead thinkyhead mentioned this pull request Jul 25, 2016
@sdgray
Copy link

sdgray commented Jan 20, 2017

Thanks. I do use this. I actually have two carriages to allow for variable spacing by adjusting clamps, but controlled by one motor.

@cbusillo
Copy link
Contributor

cbusillo commented Apr 18, 2017

Hi, does this work in the current RCBUGFIX? It doesn't work as expected. Do I need to do anything other than uncomment the DUAL_NOZZLE_DUPLICATION_MODE line?

@thinkyhead
Copy link
Member Author

thinkyhead commented Apr 26, 2017

There may still be some bugs. At one point we had this working pretty solidly, but there have been recent reports of issues with duplication mode. So far I have not been able to isolate any specific cause, and I cannot test this myself.

Anyway, after you've flashed the firmware with DUAL_NOZZLE_DUPLICATION_MODE enabled, you can turn on duplication mode with M605 S2 followed by G28. You can also set the distance between nozzles and temperature difference in the M605 command.

@cbusillo
Copy link
Contributor

cbusillo commented Apr 26, 2017

I did as much troubleshooting as I could. I got no response to the M605 command. The second extruder did not mirror he first. I would love this feature and I'm willing to help out if anyone can point me in the right direction to get started. I have a hardware duplicate mode but it just hooks the two extruders to the same hot end mosfet and stepper driver. This does not produce good results.

@thinkyhead
Copy link
Member Author

I got no response to the M605 command.

That is strange. It should always output "Duplication mode: On" or "Duplication mode: Off".

Are you sure you're using the latest RCBugFix and it is flashed correctly?

@cbusillo
Copy link
Contributor

I found a couple of tiny bugs in the latest RCBugFix. Should I report them or fix them? I cannot test it yet (broken glass) but I do get a response now.

@cbusillo
Copy link
Contributor

cbusillo commented Apr 29, 2017

extruder_duplication_enabled = code_seen('S') && code_value_int() == 2;
#if ENABLED(DUAL_X_CARRIAGE) || ENABLED(DUAL_NOZZLE_DUPLICATION_MODE)

I changed those two line and now I get duplication mode on with M605 S2. It does not seem to be working though. I heat each extruder manually then tell E0 to extrude. E1 does nothing. Thanks for the help. I'm not sure where to look next.

@cbusillo
Copy link
Contributor

It seems to work if I extrude just a bit on E1. Testing with a print now.

@cbusillo
Copy link
Contributor

It stops duplicate printing after a couple lines. There must be something disabling it. Oh well. I give up for now.

@thinkyhead
Copy link
Member Author

So this doesn't work?

extruder_duplication_enabled = code_seen('S') && code_value_int() == (int)DXC_DUPLICATION_MODE;

@thinkyhead
Copy link
Member Author

thinkyhead commented Apr 30, 2017

Where did you make this change, and what was changed?

#if ENABLED(DUAL_X_CARRIAGE) || ENABLED(DUAL_NOZZLE_DUPLICATION_MODE)

@thinkyhead
Copy link
Member Author

thinkyhead commented Apr 30, 2017

It stops duplicate printing after a couple lines.

Is it possible that your electronics can't handle as much current as duplication mode requires? Perhaps increase the current on your E-steppers.

Are you testing by sending simple Gcode commands or by running larger Gcode files? You may be able to narrow down some cause using individual G1 moves that are harder to find by running a Gcode file.

@thinkyhead
Copy link
Member Author

I've applied the suggested patch to planner.cpp d480b6f

If this isn't a fix for you, perhaps someplace else the E1 stepper is being put to sleep. We should check the DISABLE_E and DISABLE_INACTIVE_E settings…

@cbusillo
Copy link
Contributor

cbusillo commented Apr 30, 2017

DUAL_X_CARRIAGE can't be enabled with DUAL_NOZZLE_DUPLICATION_MODE, so the variable DXC_DUPLICATION_MODE never gets set.

#if ENABLED(DUAL_X_CARRIAGE) || ENABLED(DUAL_NOZZLE_DUPLICATION_MODE) 

Looks like you already got this one.

#if ENABLED(DUAL_X_CARRIAGE) 

It seemed to work with a couple gcodes. So I started a print. It did the first couple lines (not layers) and stopped extruding from the second extruder.

DISABLE_E is set to false
DISABLE_INACTIVE_EXTRUDER is set to true

I'll give it a few more tries to figure it out

@cbusillo
Copy link
Contributor

If you search the code there are a bunch of #if ENABLED(DUAL_X_CARRIAGE). I saw one in M104. Some of them need to include DUAL_NOZZLE_DUPLICATION_MODE but I don't know which ones.

@thinkyhead
Copy link
Member Author

I'll keep scrubbing through. The one in planner.cpp was the only vital instance of ENABLED(DUAL_X_CARRIAGE) that I could find so far.

@thinkyhead
Copy link
Member Author

My guess is that DISABLE_INACTIVE_E is the culprit. I'll need to make sure the code ties E1 to E0 in this mode so it won't do that.

@thinkyhead
Copy link
Member Author

From what I can see the logic is sound. I did have to fix the issue in enum.h where it failed to define DXC_DUPLICATION_MODE, but the code in planner.cpp now seems proper.

#if ENABLED(DISABLE_INACTIVE_EXTRUDER) // Enable only the selected extruder

  for (uint8_t i = 0; i < EXTRUDERS; i++)
    if (g_uc_extruder_last_move[i] > 0) g_uc_extruder_last_move[i]--;

  switch(extruder) {
    case 0:
      enable_E0();
      g_uc_extruder_last_move[0] = (BLOCK_BUFFER_SIZE) * 2;
      #if ENABLED(DUAL_X_CARRIAGE) || ENABLED(DUAL_NOZZLE_DUPLICATION_MODE)
        if (extruder_duplication_enabled) {
          enable_E1();
          g_uc_extruder_last_move[1] = (BLOCK_BUFFER_SIZE) * 2;
        }
      #endif
      #if EXTRUDERS > 1
        if (g_uc_extruder_last_move[1] == 0) disable_E1();
        #if EXTRUDERS > 2

According to this code-block, whenever E0 is enabled in duplication mode, E1 should also be enabled.

@cbusillo
Copy link
Contributor

cbusillo commented May 1, 2017

I updated my firmware. I will try this again when I get home. Thank you for all your hard work. I am quite amazed.

@cbusillo
Copy link
Contributor

cbusillo commented May 2, 2017

The newest firmware issues a kill() when trying to use the BlTouch. I downgraded for now. I saw a bug posted about it earlier.

@thinkyhead
Copy link
Member Author

The BLTOUCH_HEATERS_OFF issue is now fixed.

@cbusillo
Copy link
Contributor

cbusillo commented May 3, 2017

After making the below change it seems to work for me! So far just a quick first layer test.

  #if ENABLED(DUAL_X_CARRIAGE) || ENABLED(DUAL_NOZZLE_DUPLICATION_MODE)
    case 605: // M605: Set Dual X Carriage movement mode
      gcode_M605();
      break;
  #endif // DUAL_X_CARRIAGE

As a side note... I had to turn off extruder thermal protection. My second extruder is removable. When its removed the firmware halts. A few days ago when this started I was able to set the extruder 2 min temp to -20 (it displays -14 when disconnected). Now I have to turn it off entirely.

Thank you so much for all the hard work. My second hot end doesn't heat up as fast, so the hardware duplication method was failing every time on my printer. I love this group!

@cbusillo
Copy link
Contributor

cbusillo commented May 3, 2017

Currently the extruder temperatures need to be set individually. That works great for me, as I can set each nozzle's temp independently. I did notice in the code that on DUAL_X_CARRIAGE mode it sets the temps together. I'm not sure what the expected behavior should be.

@cbusillo
Copy link
Contributor

This appears to be broken again. I have DISABLE_INACTIVE_E set to false just in case and still nothing out of the second extruder. Is there something I should look for in the serial log?

@gordo3di
Copy link

gordo3di commented Jun 2, 2017

We've been playing with DUAL_NOZZLE_DUPLICATION_MODE. The only way I can get it to work is to change the following code. We are also using Marlin 1.1.1 from 5-17-17. Once making these changes it seems to work just fine. We are testing on our dual extruder and we will also be testing on two single extruders being moved by a single x-axis motor (so they are locked together). Make sure to add M605 S2 to your start gcode too.

configuration_adv.h

// Allow duplication mode with a basic dual-nozzle extruder
#define DUAL_NOZZLE_DUPLICATION_MODE

configuration.h

#define DISABLE_INACTIVE_EXTRUDER false // Keep only the active extruder enabled.

marlin_cain.cpp

#if ENABLED(DUAL_X_CARRIAGE) || ENABLED(DUAL_NOZZLE_DUPLICATION_MODE)
  bool extruder_duplication_enabled = true; // Used in Dual X mode 2
#endif
#if ENABLED(DUAL_X_CARRIAGE) || ENABLED(DUAL_NOZZLE_DUPLICATION_MODE)
  extruder_duplication_enabled = true;
#endif

@cbusillo
Copy link
Contributor

Regular duplication mode seems to set both temps so it seems like dual nozzle duplication mode should as well. Looking through the code a while back it didn’t seem to have the code in place to accomplish control of both hot ends. It might need to be added as a feature request instead of a bug.

@jcrasim
Copy link

jcrasim commented Jun 26, 2017

I've read through this thread for several hours now, and I was unable to fish out a standard solution. By "regular duplication mode" do you mean the "dual x carriage" mode?

or is there some other mode I am not finding? As "DUAL_NOZZLE_DUPLICATION_MODE" verbally implies, I would think it means everything related to a second nozzle ie nozzle, heater, motor etc.

Either way thank everyone for the awesome contribution on this firmware, its insane 👍

@cbusillo
Copy link
Contributor

By regular duplication mode I meant dual x carriage mode :). I agree with you. If it’s working now with just setting the second hot end temp, it is an awesome feature. I’ve upgraded to a Duet board so no more marlin for me :(

@jcrasim
Copy link

jcrasim commented Jun 27, 2017

After continued testing, it's worth noting that if e0 and e1 require different AXIS_STEPS_PER_UNIT values to achieve identical extrusion length, then in duplication mode the firmware will send the e0 AXIS_STEPS_PER_UNIT value to e1 during operation. Therefore they will extrude a differing amount of filament.

I have both extruders with identical motor drivers models with identical vref values with identical stepper motors. I figure the workaround for this can be handled in a slicing software. Maybe there is some multiplier somewhere I am missing that would solve this.

@legarasta
Copy link

@thinkyhead I've been using this but am getting poor results on E2 due to the difference in diameters between the two filaments.
Is it possible to set different diameters, (via M200 lets say), or due to the nature of the solution of replicating signals between two drivers is impossible at all?

Tks in advance for the feedback and congrats on all the work developed. Trully remarkable!

@jcrasim
Copy link

jcrasim commented Jan 23, 2018

legarasta, Based on my limited but somewhat practical experience with these setting, I found the following to be true. In duplication mode, E0 settings is the default for E1. I was unable in any way to modify E1 differently from E0 in duplication mode. I could get them to extrude exactly the same amount with different settings outside of duplication, but as soon as duplication was enacted again, it reverted e1 to the e0 settings.

Also, it is important to note that having the exact same motor, driver, extruder, vref, etc for each e0 and e1, still did not produce identical extrusion. Thus my belief is that the drivers are very sensitive to their input power. I tried for probably 15 hours to get them working. The firmware would need more code to allow each the e1 and e0 settings to be different and yet still work in duplication without reverting e1 to e0 settings. Perhaps I am just misinformed tho. Good luck

@thinkyhead
Copy link
Member Author

Duplication mode is applied at the lowest possible level — the pulse signals sent to the E steppers. So currently there is no way to have the two extruders move at different rates.

@SlickNickeL
Copy link

REPETIER has a "Ditto" setting by which 4 extruders can be simultaneously used to print 4 prints, on one X carriage. The benefits of this setting, is the ability to mass produce and manufacture many parts at one time.

Can Marlin consider expanding the current configuration to at least go to 3 extruders, from the current 2 allowed extruders? This would be a great benefit to any company who wants to manufacture single-run continuous filament productions. Strength, speed, appearance and accuracy are greatly improved by keeping one print to one head from start to finish. Size is limited to the distance of each extruder based on the X carriage spacing, which isn't a problem for small pieces. Since most 3D printers made to perform such tasks, have one purpose and have identically matched hotends/motors, the data to all extruders can be cloned without a significant amount of problems in the prints by simply assigning/cloning data from EO to E1, E2 etc. Problems arise when motors are wired in parallel from a single stepper.

This may seem like a trivial request, but without this feature, the business/manufacturing entities are left behind. It's like having Windows 10 for consumers, and businesses have to go to MAC to accomplish their mission.

@thinkyhead
Copy link
Member Author

Sounds good, but a feature request should be made as a new issue so we will see it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants