Problem with marlin FW feedrate SOLUTION

105 views
Skip to first unread message

Martin Zabojnik

unread,
Feb 5, 2014, 4:41:50 PM2/5/14
to cyclone-p...@googlegroups.com
I have one problem .

if I send this

G1 Z15 F50
G1 X10 Y10 F300

firmware ignores F300 and still going feedrate 50

If you have the same problem the solution is to comment on this part marlin_main.cpp


void get_coordinates()
{
  bool seen[4]={false,false,false,false};
  for(int8_t i=0; i < NUM_AXIS; i++) {
    if(code_seen(axis_codes[i]))
    {
      destination[i] = (float)code_value() + (axis_relative_modes[i] || relative_mode)*current_position[i];
      seen[i]=true;
    }
    else destination[i] = current_position[i]; //Are these else lines really needed?
  }
  if(code_seen('F')) {
    next_feedrate = code_value();
    if(next_feedrate > 0.0) feedrate = next_feedrate;
  }
  /* #ifdef FWRETRACT
  if(autoretract_enabled)
  if( !(seen[X_AXIS] || seen[Y_AXIS] || seen[Z_AXIS]) && seen[E_AXIS])
  {
    float echange=destination[E_AXIS]-current_position[E_AXIS];
    if(echange<-MIN_RETRACT) //retract
    {
      if(!retracted)
      {

      destination[Z_AXIS]+=retract_zlift; //not sure why chaninging current_position negatively does not work.
      //if slicer retracted by echange=-1mm and you want to retract 3mm, corrrectede=-2mm additionally
      float correctede=-echange-retract_length;
      //to generate the additional steps, not the destination is changed, but inversely the current position
      current_position[E_AXIS]+=-correctede;
      feedrate=retract_feedrate;
      retracted=true;
      }

    }
    else
      if(echange>MIN_RETRACT) //retract_recover
    {
      if(retracted)
      {
      //current_position[Z_AXIS]+=-retract_zlift;
      //if slicer retracted_recovered by echange=+1mm and you want to retract_recover 3mm, corrrectede=2mm additionally
      float correctede=-echange+1*retract_length+retract_recover_length; //total unretract=retract_length+retract_recover_length[surplus]
      current_position[E_AXIS]+=correctede; //to generate the additional steps, not the destination is changed, but inversely the current position
      feedrate=retract_recover_feedrate;
      retracted=false;
      }
    }

  }
  #endif //FWRETRACT */
}

Jiri

unread,
Feb 6, 2014, 2:20:52 AM2/6/14
to cyclone-p...@googlegroups.com
Sorry, one additional question to it:
I don't see on Erik Zalm's page any F-code mentioned at all (neither as a parameter of G1). So should Marlin even know feedrate command? Or has anybody modified - Carlos?- Marlin to know it?


Dne středa, 5. února 2014 22:41:50 UTC+1 Martin Zabojnik napsal(a):
Reply all
Reply to author
Forward
0 new messages