Question about dual extruder

edited January 2018 in Repetier-Firmware
Hi ,
I build a machine like BCN3D sigma with dual X,E
My firmware version is 1.0.0 in Ramps-FD.
I meet a problem and can't find why it happens.

When I power on , connected with Repetier-Host.
These are my operations:

1.Home
2.extrude 5mm(Extruder 1) <-- not work

The extruder 1 will not do anything , I'm sure the minimum exturde temperature is arrived.
Buy if I do these operations:

1.Home
2.extrude 5mm(Extruder 1) <-- not work
3.switch to Extruder 2
4.extrude 5mm(Extruder 2) <-- work
5:switch to Extruder 1
6.extrude 5mm(Extruder 1) <-- work

Or like this

1.Home
2.switch to Extruder 2
3.extrude 5mm(Extruder 2) <-- not work
4:switch to Extruder 1
5.extrude 5mm(Extruder 1) <-- work
6:switch to Extruder 2
7.extrude 5mm(Extruder 2) <-- work

After some test , I'm sure the rule is the extruder will start to work only if extruded on any extruder and do a switch operation.
I'm sure the motors are enabled.(I listened the sound of enable)
I try to trace the code and add some logs , any extrude action contains enable and step , it looks like no problem.

How can I fix this problem?

Thanks for help:D

Comments

  • Hard to say. It might also depend on LAZY_DUAL_X_AXIS which at several places causes a different handling especially if the sled is still parked.

    First I would do is in

    uint8_t Printer::setDestinationStepsFromGCode(GCode *com)

    put some print commands on the case send 0 or send move to know if a move was planned or not. Also do not omit

        if(!posAllowed) {

            currentPositionSteps[E_AXIS] = destinationSteps[E_AXIS];

            return false; // ignore move

        }

    at the end of the function. Since you are outside bed it might make that function fail when in parking lot and thus set extrusion to 0.

  • Hi,
    Thanks for response.
    I had checked Printer::setDestinationStepsFromGCode(GCode *com).
    I'm sure this function can create new PrintLine , and after this , Extruder's step() has called , but the motor still not work.
    I will keep looking for the  reason.

    I found another problem.
    These are my operations:

    1.G28(Home)
    2.M280 S1(set to ditto mode)
    3.Extruder 5mm(G90 + G0 E5)

    X Axis will do a error moving action.
    I found this cause from M280
    After PrintLine::moveRelativeDistanceInSteps
    destinationSteps[X_AXIS] will be set to a negative integer 
    After G0 E** is sent  , this value will become a new X moving target(currentPositionSteps[X_AXIS]=0 , destinationSteps[X_AXIS]=-XXXX)

    I add a code to M280 like this :

    Printer::currentPositionSteps[X_AXIS] = Printer::xMinSteps;
    Printer:: destinationSteps[X_AXIS] = Printer::xMinSteps; // add this line

    The problem seems to be resolved.
    Is this a correct modification?

  • edited January 2018
    I found something yesterday.
    After exchange motor setting between X1 And E1 , the same problem happen on X1 , E1 is work fine.
    I think the problem caused from pin of due....
    Because of driver socket is not enough , my extruder is connected to Ramps-FD AUX2 with external module.
    The pins on AUX2 can be use as analog input or digital pin , maybe cause some problems? I'm not sure...
  • Some boards use a shared enable signal for several motor drivers. Works good if you do not disable stepper drivers and all drivers have set the correct enable signal. If only one has right enable pin, it would not work until you enable that motor.

    I want to test on my dual x printer when I get some time. Just to be sure also with last update I did not see problems, but maybe never tested your case.
  • edited January 2018
    Hi,

    I found the reason of the problem.

    Extruder.cpp  line:1781  in enable()

    digitalWrite(Extruder::current->enablePin, Extruder::current->enableOn);

    change to

    HAL::digitalWrite(Extruder::current->enablePin, Extruder::current->enableOn);

    Problem will be solved.

    I also found the same in line 1785 , 1792 , 1800

    I'm not sure if these are bugs.

    I had tested the same operation on Mega2560 yesterday , this seems works fine.

    But this  seems don't work on Arduino Due.



    Thanks for help :)
  • Well....
    I think I'm wrong....
    I did not solve the problem by this way.
    The really reason is I enable all extruder in initExtruder()(default is disable)
    But this way still not really solve the problem .
    If the extruder is disabled , it can't enable again.

    I give up use these pins to drive extruder

    These are my setting....maybe someone know why?

    use E3 for EXT0 , E4 for EXT1
    Board is Arduino Due + Ramps-FD V2.1  connected to AUX2

    #define ORIG_E3_STEP_PIN    61

    #define ORIG_E3_DIR_PIN     59

    #define ORIG_E3_ENABLE_PIN  68

    #define ORIG_E4_STEP_PIN    60

    #define ORIG_E4_DIR_PIN     58

    #define ORIG_E4_ENABLE_PIN  69

    Finally I change these pins to another digital pins.
    The extruders are all work fine now.
    Just no pin can be used for the LCD panel..... :D

  • Ok, so it is the selection of pins. So maybe an other function used same pin number for something else causing conflicts.

    LCD Panel is not the way for the future anyway. Tiny pc like odroid or raspberry with touchscreen and repetier-server is much nicer.
Sign In or Register to comment.