Dual motor Z axis homing

Im using a 4 motor (plus extruders) setup with 2 Z axis motors. Second Z motor is mirrored and operated as extruder three. Setup works fine and both motors are in sync but homing only references the Z and ignores the mirrored axis. Is it possible to add an additional home switch and effectively home extruder 3 in the same manor as the other axis to level the gantry? Cheers :-)

Comments

  • I'm quite sure I programmed something like this, but lacking a printer with this setup I never tested it. But I do not see that option in config tool, so I have to check how this should be done.
  • How is this coming along?

    I am concidering converting from Marlin to Repetier on my E3D BigBox. But I have done a mod so I have two Z stepper drivers. 

    What would really be the icing on the cake is if I could use two Z endstops at Z-max to level and then do a grid Z-probing and have everything set. 
  • Just added the config to online config tool.

    Use dev version in config tool. Selecting dual z stepper now shows "Multiple Z Endstops (MULTI_ZENDSTOP_HOMING)" whcih allows setting a second endstop for second z motor.
  • Can you add this for the X and Y axes as well?  I have dual Y's and dual Z's.  This is a very useful feature, especially for dual purpose 3D printers and mills.
  • How does a printe rlook liek where that is required for x/y? All versions I know have both motors on same belt and there you only need one endstop.
  • Repetier, thank you for the second Z home switch addition in development file :)

    Setup is almost perfect with homing positive to level the two sides and probing negative. As my Z travel is fairly large (750mm) I was wondering if it is possible to have the home switches mid way along the travel and an offset applied once the switch triggers? This would save having to move to the full positive limit each time power is cycled / homing performed.


    Thanks again.
  • No, they are called END STOP as they mark the end. Once triggered they prevent further movement, so having this mid printer is not good. Also you would need to know if you are below or above endstop when homing as it always assumes z=0 on startup regardless of start position. So forget that thought.
  • Ok thanks, so homing always has to be done against an end stop at one limit of travel? Can probing be used to set Z zero position? Or is this purely a setup function to be used independent of homing at the start of print?
  • As a separate solution is it possible to write a custom "homing" script? Either as a seperate macro or by editing the existing g-code?

    Thank you for your help :-)
  • Sure homing z is z=0 or z=zlength.

    You can also edit Printer.cpp homeZAxis if you want a custom solution. You will easily find how it works. Just make sure to use the cartesian version - functions exists 2 times.
  • Thanks again,

    I'm getting an error during compiling when setting up the second Z axis home switch.
    'DIOZ2_MINMAX_PIN_PORT' was not declared in this scope

    It appears under the HAL.h tab

    Is there an additional setting I'm missing?
  • Further to the above this is the HAL.h line that is failing.

    #define _READ(pin) (DIO ##  pin ## _PORT->PIO_PDSR & DIO ##  pin ## _PIN ? 1 : 0) // does return 0 or pin value

    and this the error message. Any ideas what I'm doing wrong?!

    Arduino: 1.6.9 (Windows 10), Board: "Arduino Due (Programming Port)"

    In file included from sketch\Repetier.h:567:0,

                     from sketch\Printer.cpp:19:

    sketch\Printer.cpp: In static member function 'static void Endstops::update()':

    HAL.h:166: error: 'DIOZ2_MINMAX_PIN_PORT' was not declared in this scope

     #define _READ(pin) (DIO ##  pin ## _PORT->PIO_PDSR & DIO ##  pin ## _PIN ? 1 : 0) // does return 0 or pin value

                         ^

    sketch\HAL.h:167:19: note: in expansion of macro '_READ'

     #define READ(pin) _READ(pin)

                       ^

    sketch\Printer.cpp:221:12: note: in expansion of macro 'READ'

             if(READ(Z2_MINMAX_PIN) != ENDSTOP_Z2_MINMAX_INVERTING)

                ^

    HAL.h:166: error: 'DIOZ2_MINMAX_PIN_PIN' was not declared in this scope

     #define _READ(pin) (DIO ##  pin ## _PORT->PIO_PDSR & DIO ##  pin ## _PIN ? 1 : 0) // does return 0 or pin value

                                                          ^

    sketch\HAL.h:167:19: note: in expansion of macro '_READ'

     #define READ(pin) _READ(pin)

                       ^

    sketch\Printer.cpp:221:12: note: in expansion of macro 'READ'

             if(READ(Z2_MINMAX_PIN) != ENDSTOP_Z2_MINMAX_INVERTING)

                ^

    sketch\Printer.cpp: In static member function 'static void Printer::setup()':

    Printer.cpp:1026: error: 'Z2_MINMAX_PIN' was not declared in this scope

     SET_INPUT(Z2_MINMAX_PIN);

               ^

    sketch\HAL.h:173:64: note: in definition of macro 'SET_INPUT'

     #define SET_INPUT(pin) pmc_enable_periph_clk(g_APinDescription[pin].ulPeripheralId); \

                                                                    ^

    exit status 1
    'DIOZ2_MINMAX_PIN_PORT' was not declared in this scope

    This report would have more information with
    "Show verbose output during compilation"
    option enabled in File -> Preferences.



  • you have to add
    #define Z2_MINMAX_PIN pinnumber

    in your configuration.h
    Config tool should now add it (at least dev version). It was missing before now:-)
  • It works thank you :-)
  • GoBig said:
    Can you add this for the X and Y axes as well?  I have dual Y's and dual Z's.  This is a very useful feature, especially for dual purpose 3D printers and mills.
    I'd like to have this function also.
    I have 2 motors running on the Y axis which moves the X bar, they both work separate, not connected to each other with a belt.
    Works good, but homing both motors will make sure the X axis is perpendicular to the Y axis. 
  • I would also benefit from having the option of dual X endstops, as I just built a 1500mm^2 laser cutter with dual X motors to keep things perpendicular.
  • Did not think the demand would be that high. I need to check if we have some flags free for this. And I hope I do not forget it as I have some other firmware wishes to implement first.
  • edited December 2016
    Thanks Repetier for looking into this. As an aside, I intend to stick with Repetier Firmware in my 4 watt blue diode laser cutting endeavors, using the new LaserWeb open source project.  Those folks are strongly preferring Smoothieware due to variable laser PWM proportionate to acceleration.  For this machine, I've got a lil' Sanguinololu with 1284p available, and I don't want to switch to Marlin.

    I'm hoping to try out patch 524 by Links2004, and hope to get Repetier a little more filled in on the LaserWeb table.

  • Repetier said:
    Did not think the demand would be that high. I need to check if we have some flags free for this. And I hope I do not forget it as I have some other firmware wishes to implement first.
    Would be very much appreciated !
  • I'm making now a router with two motor on X axis, many routers having this configuration, it will be very usefull.
    At least if there aren't flags free, will be possible to choose which axis having two end stop (dev version)?
  • As I´m just wondering about the necessarity of two motors on one axis.
    can somebody explain why please?

    so for me in a cartesian machine the only two reliable ways to drive two rods on one axis is

    -a) one motor, rods coupled via timing belt
    -b) if two motors, use servo drives to avoid step losses.

    only reason for two steppers in configuration with two endstops might be (even slightly) different rods.

    i use  belt coupled dual z-axis(ball screws) on my home made cnc as i have to lift more than 20Kg of weight
    and my x-axis is 800 mm wide.

    so may be i do not see the advantage for the two motors, so please explain

  • edited May 2017
    I've make a router 1000x700x300, I've two x motor because I don't want the lead screew in the middle, I want to run it also directly on the material to be engraved and that can be larger than my router bed, so I put the material below the frame.
    My main problem is the homing of x axes,  it's needed indipendently adjustable in order to square x axis with y axis.
  • ok, so i understand, the portal is not closed on the bottom and you place the router on top of material.
    but anyway , don´t you have a closed frame ?
  • edited May 2017
    yes I've closed frame but if for any reason a motor loose a step I'm loosing the square between x and y, also if I homing.
    Another problem is to check the square everytime I power on
  • how did you hook up the two motors?

    2 drivers?

    or 1 driver, motors parallel?

    or 1 driver, motors in series?


  • two separate tb6600 4A drivers
  • so i guess you use nema23 motors, hopefully driven with more than 24 Volts...
    i also use them in my experimental machine.

    i also guess you have the ones with the dipswitch current setting...
    so from these i have two versions... from outside they look exactly the same, but they differ in the way
    the current reduction is done when not moving.

    you should set up the configuration.h to:

    STEPPER_HIGH_DELAY 1
    and
    DIRECTION_DELAY 2

    these drivers sometimes don´t recognize steps when changing direction.

    so what i found during build of my machines is, if you use rigid couplers from motor to rod  and they are not exactly centered,
    motors loose steps caused by resonances.
    so i know ( and i also bought some cheap stuff which i had simply to throw away).

    for example with rigid couplers(cheap ones) i was not able to turn the motors faster than 500 rpm.
    then changed to precision ones and can spin up to 1000 rpm now.
    on another machine i use short belts to decouple vibrations and they spin up to 1400 rpm.
    (so you can see why i´m a friend of the belt solution)
    don´t know what couplers you use but you should avoid the full metal ones.
    choose something looking like these
    http://www.ebay.de/itm/Wellenkupplung-CNC-fur-Schrittmotoren-Kupplung-5mm-10mm-5Nm-/111982918402?hash=item1a12b3bb02:g:ZM
  • edited May 2017
    you are correct, it's important the delay with tb6600; thanks for all your suggestion, but all this caution are already applied; everything is supplied with 36V/600W.
    I don't have problem of loosing steps, my problem is to have the machine squared every power on, the only way is to have two indipendent end stop for X axis.
    With mach3 I don't have problem doing that, is supported; but now I would like to move on repetier, so I can also print
Sign In or Register to comment.