Limit only Z speed

I need to limit Z speed to 80, but keep X and Y at 500.

#define MAX_FEEDRATE_X 500
#define MAX_FEEDRATE_Y 500
#define MAX_FEEDRATE_Z 80

doesn't seem to cut it.

and if I change MaxFeedrate in EEPROM, it changes the max speed for XY and Z

Comments

  • What you described is only valid for delta printers. Cartesian printers have x,y and z as separate values in eeprom. For delta this is not required.
  • I have a delta. I would like to limit the Z-speed, but not the XY. What is required?
  • This is why


  • You need to change the firmware a bit. In Printer.cpp go to void Printer::updateDerivedParameter()

    and find this line
    maxFeedrate[X_AXIS] = maxFeedrate[Y_AXIS] = maxFeedrate[Z_AXIS];

    where you see xy max feedrate is replaced by z feedrate. Assign here your xy max speed instead.

  • I can't seem to figure out the syntax...triple equal signs are strange. none of these worked

    --------------------------------------------------------------------------------
    maxFeedrate[X_AXIS] = 500;
    maxFeedrate[Y_AXIS] = 500;
    maxFeedrate[Z_AXIS] = 80;
    --------------------------------------------------------------------------------
    maxFeedrate[X_AXIS] = maxFeedrate[Y_AXIS] = 500;
    maxFeedrate[Z_AXIS] = 80;
    --------------------------------------------------------------------------------
    maxFeedrate[500] = maxFeedrate[500] = maxFeedrate[80];
    --------------------------------------------------------------------------------
    maxFeedrate[X_AXIS] = maxFeedrate[Y_AXIS] = maxFeedrate[Z_AXIS];
    --------------------------------------------------------------------------------
    maxFeedrate[X_AXIS] = maxFeedrate[Y_AXIS] = maxFeedrate[Z_AXIS];
    maxFeedrate[Z_AXIS] = 80;
    --------------------------------------------------------------------------------
    500 = 500 = 80;
    --------------------------------------------------------------------------------
    500[X_AXIS] = 500[Y_AXIS] = 80[Z_AXIS];




    I also tried changing

    float Printer::maxFeedrate[E_AXIS_ARRAY] = {MAX_FEEDRATE_X, MAX_FEEDRATE_Y, MAX_FEEDRATE_Z}; ///< Maximum allowed feedrate.
    to

    float Printer::maxFeedrate[E_AXIS_ARRAY] = {500, 500, 90}; ///< Maximum allowed feedrate.
  • Replacing it with
    maxFeedrate[X_AXIS] = maxFeedrate[Y_AXIS] = 500;

    should work. What is the error message when you do so?
  • There is no Error message, it just runs everything at 80. 

    I tried again to be sure, I replaced:
    maxFeedrate[X_AXIS] = maxFeedrate[Y_AXIS] = maxFeedrate[Z_AXIS];
    with 
    maxFeedrate[X_AXIS] = maxFeedrate[Y_AXIS] = 500;

    congiuration.h
    #define MAX_FEEDRATE_X 80
    #define MAX_FEEDRATE_Y 80
    #define MAX_FEEDRATE_Z 80

    and made sure to set maxfeedrate to 80 in EEPROM


    Just for fun I also tried:
    #define MAX_FEEDRATE_X 500
    #define MAX_FEEDRATE_Y 500
    #define MAX_FEEDRATE_Z 500

    and 
    maxFeedrate[Z_AXIS] = 80

    This also runs everything at 80.
    If I put everything back It still works at 500
  • You are right, there is a second position that prevents this. That is in motion.cpp line 474







        if(isXMove())

        {

            axisInterval[X_AXIS] = axisDistanceMM[X_AXIS] * toTicks / (Printer::maxFeedrate[X_AXIS]); // mm*ticks/s/(mm/s*steps) = ticks/step

    #if !NONLINEAR_SYSTEM || defined(FAST_COREXYZ)

            limitInterval = RMath::max(axisInterval[X_AXIS], limitInterval);

    #endif

        }

        else axisInterval[X_AXIS] = 0;

        if(isYMove())

        {

            axisInterval[Y_AXIS] = axisDistanceMM[Y_AXIS] * toTicks / Printer::maxFeedrate[Y_AXIS];

    #if !NONLINEAR_SYSTEM || defined(FAST_COREXYZ)

            limitInterval = RMath::max(axisInterval[Y_AXIS], limitInterval);

    #endif

        }

        else axisInterval[Y_AXIS] = 0;

        if(isZMove())   // normally no move in z direction

        {

            axisInterval[Z_AXIS] = axisDistanceMM[Z_AXIS] * toTicks / Printer::maxFeedrate[Z_AXIS]; // must prevent overflow!

    #if !NONLINEAR_SYSTEM || defined(FAST_COREXYZ)

            limitInterval = RMath::max(axisInterval[Z_AXIS], limitInterval);

    #endif

        }


















        else axisInterval[Z_AXIS] = 0;

    Here you see that the new limit is only taken for non delta systems. Remove the #if / #end lines to store reduced limit


Sign In or Register to comment.