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

Dual_X_Carriage proper behavior is broken #4694

Closed AndrewDiehl closed 7 years ago

AndrewDiehl commented 8 years ago

M605 S0 is default. Homed All axis.

T0 is at 0 T1 is at 400

Send following commands:

T0 G1 X10 F1000

The T0 head (left side) moves to X35 instead of X10, Subsequently can not move the T0 head to anything less than X35 without a homing command.

X35 is the the T1 minimum position, and should not be affecting T0

Additionally, Issuing a T1 command immediately sends the T1 head to the same position as the T0 head, causing a collision. Simply issuing T1 should not cause any movement.

thinkyhead commented 8 years ago

Unfortunately we haven't had any testers with a dual-x setup. If you can help us to work on this it would be very much appreciated.

AndrewDiehl commented 8 years ago

I will do whatever I can to help.

AndrewDiehl commented 8 years ago

Is there anything I can do to help right now, or just wait until its patched and try again?

boelle commented 8 years ago

@thinkyhead anything he can do ?

boelle commented 8 years ago

@thinkyhead anything he can do ?

thinkyhead commented 8 years ago

He can call in the geek troops to help me! I have very limited time to work on the main Marlin project than I would like these days, and I have some other issues to tackle today.

thinkyhead commented 8 years ago

He can call in the geek troops to help me! I have very limited time to work on the main Marlin project than I would like these days, and I have some other issues to tackle today.

boelle commented 8 years ago

@AndrewDiehl :-D so if you know some geek people that can help out let us know

AndrewDiehl commented 8 years ago

My people are all Electrical/Mechanical but no software :(

If any of your tasks involve CAD or fabrication, I'd be happy to help lighten the load.

psyvision commented 7 years ago

I'm watching this now as I have the T0/T1 crash issue. I'll take a look at the code later today

boelle commented 7 years ago

@AndrewDiehl i assume this "problem" is still present?

AndrewDiehl commented 7 years ago

I would assume so, as nobody has asked me to test a fix.

On Nov 2, 2016 9:48 AM, "Bo Herrmannsen" notifications@github.com wrote:

@AndrewDiehl https://github.com/AndrewDiehl i assume this "problem" is still present?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/MarlinFirmware/Marlin/issues/4694#issuecomment-257868688, or mute the thread https://github.com/notifications/unsubscribe-auth/ABOp2Bu5yqhjP2sTyPlwnhIR15CviyaWks5q6JSTgaJpZM4Jrb7r .

boelle commented 7 years ago

@AndrewDiehl are you able to work with @thinkyhead to figure it out?

you test and he tries to fix?

AndrewDiehl commented 7 years ago

I'll be away from my machines until Friday, but generally, yes.

boelle commented 7 years ago

oki doke... then i think @thinkyhead will poke you when he is ready :-)

thinkyhead commented 7 years ago

@AndrewDiehl What time zone are you in? Perhaps we can do an online hangout or chat session where I can try patching some things and you could give feedback. I'd like to make sure all Dual X behavior is proper, includingT0/T1, parking the head, doing duplication mode, etc., and I know if I try to work it out on my own it'll be hit-or-miss.

AndrewDiehl commented 7 years ago

Eastern time USA.

thinkyhead commented 7 years ago

@AndrewDiehl I'm on Central Time currently. Do you have some availability Friday night, or over the weekend to hack on this?

boelle commented 7 years ago

@AndrewDiehl will you have time this weekend?

thinkyhead commented 7 years ago

@AndrewDiehl If I had a Dual-X machine on hand to test with this and other Dual X issues could be solved in a day. Without one I'm terribly afraid of making it worse.

AndrewDiehl commented 7 years ago

Sorry for the delay here,

I'm trying to make time for this on Sunday.

My newborn is being extra fussy the last few days so its been harder to find time than expected.

AndrewDiehl commented 7 years ago

@thinkyhead

I can do google hangouts using landruthegreat@gmail.com or you can call 610-295-7867. For voice I may have to call back using wi-fi since my house has poor signal.

thinkyhead commented 7 years ago

@AndrewDiehl When you have a chance, please post a log of G28 so I can see what state the machine is in after you've homed. First, enable DEBUG_LEVELING_FEATURE and re-flash. Before homing, do M111 S247 to enable all logging except "DRYRUN." Then when you do G28 there should be some extra logging of the whole procedure.

Also post your configuration, or the relevant settings.

I'm starting to make some tweaks based on your description of the issue, but I'm being cagey because I'm not entirely sure what all the tool-change behaviors should be for every Dual X mode.

Let me see if I have the general idea anyway…

Tool-change in DXC_DUPLICATION_MODE is a curious concept. With extruder 0 active, its movements are duplicated in extruder 1. But if extruder 1 is selected, should it then become the one that is moved, while extruder 0 follows it? Or should the duplication flag (extruder_duplication_enabled) just be disabled until extruder 0 is selected again?

thinkyhead commented 7 years ago

@AndrewDiehl Also test this branch, which has some tweaks that may help (or not): https://github.com/thinkyhead/Marlin/tree/rc_dualx_homing

thinkyhead commented 7 years ago

@psyvision @pbrgle1 @gsart84 Please join this thread…

gsart84 commented 7 years ago

Thanks. Still got some troubles. Now zaxis moves up withoud stopping

thinkyhead commented 7 years ago

@gsart84. When does Z move up without stopping?

gsart84 commented 7 years ago

After toolchange... I do g28, Then move t0 to x140 Then a toolchange. First the x2 crashes in the endstop Then z lifts up with no stopping

psyvision commented 7 years ago

Can someone remind me what g-code will enable logging and i'll do a log of G28 if it is still needed? @thinkyhead

@gsart84 was the tool crashing with RC7 or the branch that @thinkyhead posted above?

gsart84 commented 7 years ago

It crashes with the branch from thinkyhead. In rc7 after g28, when i do a movement (i.e. g1z1) All axes do some strage slow movements to x0 y0 z10 To move the head or table i have to:

G28
M605 s0
M605 s1

And then i can move withoud pronlem

gsart84 commented 7 years ago

M111 S247 is the code for logging. And here the video of my problem with rc7 https://youtu.be/Y8UuKQfCeCE

Blue-Marlin commented 7 years ago

Likely it would be a bit more informative if you'd activated DEBUG_LEVELING_FEATURE in your config.

psyvision commented 7 years ago

Cheers, i'll reflash with that on! Sorry I'm new to debugging Marlin :/

psyvision commented 7 years ago

Okay I've put a gist together with the log in it:

https://gist.github.com/psyvision/e0dcae5087cf4c262b0f62d032469a84

G28 was okay. T1 S1 caused no movement, T1 caused no movement. T0 caused T0 to crash into T1.

My configuration is available here:

https://github.com/psyvision/BigBox-IDEX/blob/master/Marlin/

gsart84 commented 7 years ago

@psyvision In yout configuration adv i see you have x2-max-pos x-max-pos

So if i understand right, if my printer would be configured like yours, t1 would crash into t0.

psyvision commented 7 years ago

It's just shorthand for saying the max X2 position is the same as used for X max without putting the same number twice. I had seen this done for a few different IDEX printers so went with it for initial configuration.

I can get T0 to hit T1 and T1 to hit T0.

thinkyhead commented 7 years ago

the max X2 position is the same as used for X max

Note: On a dual setup your first carriage cannot move as far right as your second carriage (because the 2nd carriage is in the way), so X_MAX_POS should be smaller than X2_MAX_POS by the width of the carriage. Also, the second carriage can't move as far left as the first one (because the 1st carriage is in the way), so X2_MIN_POS should be larger than X_MIN_POS by the width of the carriage.

thinkyhead commented 7 years ago

I can get T0 to hit T1 and T1 to hit T0.

That's the great thing about DXC_FULL_CONTROL_MODE. Total freedom.

thinkyhead commented 7 years ago

G28 was okay. T1 S1 caused no movement, T1 caused no movement. T0 caused T0 to crash into T1.

The test branch I linked is far from ready. Thanks for giving it a test. I will look at the log more closely, and I'll keep tweaking tool_change. I may add more logging and ask for more testing.

AndrewDiehl commented 7 years ago

Wow! Lots to go over here.

Learning about the T0 vs T0 S1 is totally new news to me. Is this in the code comments anywhere? Its not in the marlin.main documentation nor under the Dual X Carriage define as far as I can tell. This should be in both places.

The "Unpark when using Z_SAFE_HOMING with Dual X #5175" branch fixes the park/unpark issues while in DXC_FULL_CONTROL_MODE. Changing from T0 to T1 no longer crashes the extruder heads into one another.

However, T0 is still being made to obey the X2_MIN_POS.

After homing, a move command makes T0 move to the X2_MIN_POS if the command doesn't move it past that value.

ie: my X2_MIN_POS is 35

I home my machine. Select T0 Issue a G1 X1 F10000

T0 immediately moves to X35.

If I home and issue a G1 X100 command, T0 moves to X100.


The Autopark mode in 5175 is much scarier than before.

Dropbox link to my configs https://www.dropbox.com/sh/mg5z4r6i2fag7p9/AADZOaF2SrCTgiu-sVn2_Yzta?dl=0

Issuing a T1 command after homing and Setting M605 S1 now sends the Z axis down to Z0 and Back instead of up to the z hop distance. Afterwords, Selecting T0 again forces both heads past their end stops and moves the Z axis to Z0 and back

Also tried un-commenting the debugging feature you requested but I'm not using auto level and I get a compiling error.

psyvision commented 7 years ago

@thinkyhead I had set my X2 min/max to those values because I was observing the behaviour that @AndrewDiehl has described above, when switching to T0 it would move to X2_MIN and could never go further left (i.e. back into it's dock/park position). Putting it at 0 and X2_MAX = X_MAX (as BCN3D have done with the IDEX Sigma firmware, although heavily modified) allowed me to get the carriages in the appropriate places.

boelle commented 7 years ago

@AndrewDiehl @thinkyhead what output did you get from the testing session?

wallacezhang commented 7 years ago

@psyvision @AndrewDiehl @thinkyhead have you solved the T0/T1 crash issue? I'm suffering this issue now, don't know where I'm wrong, would you like to help? thanks a lot.

gsart84 commented 7 years ago

RC 8 / RC bugfix work perfect. You have to adjust configuration.adv the right way. For a example you can download my configuratin in my github...

wallacezhang commented 7 years ago

@gsart84 I downloaded your RC8 firmware and tested in my printer, the T1 carsh into T0 still. any thought?

gsart84 commented 7 years ago

@wallacezhang ok, hm, i do not know where the problem. my printer is working perfect with the configuration you use!

gsart84 commented 7 years ago

is it a custom printer? witch board? i use a rumba board, have 2 endstops and have a x offset of 40mm from nozzle to heatbed...

wallacezhang commented 7 years ago

@gsart84 my printer is Prusa i3 structure, I also use Rumba board. here is my issue when uploading your firmware:

  1. when T0 finish printing, it'll go home normally, but T1 moves to print very slowly, moreover, T1 doesn't start to print when it go to the place of model.
  2. when switch to T0 again, T1 can't go home normally, I have to cut power, so as to avoiding T0/T1 crash. do you think it's the issue of firmware or slicing?
gsart84 commented 7 years ago

Do you use dxc auto park mode? With auto park mode, there is no problem with simplify3d and cura. Do not use a tool change skript. Your problem seems to me like wrong settings with your offsets. I know this problem with slow movements. The Only one slow movement that remains on my printer, is moving y after homing x and y after printt is finished. Cant solve this issue.

gsart84 commented 7 years ago

Attention if you use my firmware, check the invertet stepper motors, i hope you adjust this firmware correctly for your movements