Firmware upgrade issues

If you are having problems with your 3D printer or have had a problem and discovered a great solution, then share your experiences here.
User avatar
ge_rik
Administrator
Administrator
Posts: 6497
Joined: Sun Oct 25, 2009 10:20 pm
Location: Cheshire
Contact:

Re: Firmware upgrade issues

Post by ge_rik » Wed Jun 08, 2022 11:36 am

Hmmm .... interesting
When I loaded Marlin 2.0 into Arduino IDE, it only shows the configuration file libraries - it doesn't show all the other library files wherein the main firmware code is stored. There's a baffling array of folders and files - and so far I've not tracked down the file for the feedrates.

So, I did a bit of googling and discovered that M220 enables us to reset the feedrate as a percentage. I found that 80% slows everything down to a speed which is a lot less frenetic. Unfortunately, once reset, the new value isn't stored on the EEPROM and so would need to be re-entered every time th printer is powered up.

So..... I decided to add the instruction ( M220 S80 ;Set feedrate to 80% ) to the Start G-Code for this machine in Cura - so that every time I slice and create gcode for an object the feedrate is reset to 80%

Not as elegant as editing the firmware code but a lot easier

Rik
------------------------
Peckforton Light Railway - Blog Facebook Youtube

User avatar
ge_rik
Administrator
Administrator
Posts: 6497
Joined: Sun Oct 25, 2009 10:20 pm
Location: Cheshire
Contact:

Re: Firmware upgrade issues

Post by ge_rik » Thu Jun 09, 2022 3:55 pm

I did some digging in the various folders and eventually tracked down the motion.h library file. The feedrate section looks very complicated - it looks like it checks whether an M220 percentage value has been applied. So far, I've not tracked down where the default values are defined. I'm reluctant to tinker with this bit of code so, for now I think I will stick with the M220 gcode command.

Code: Select all

/**
 * Feed rates are often configured with mm/m
 * but the planner and stepper like mm/s units.
 */
constexpr xyz_feedrate_t homing_feedrate_mm_m = HOMING_FEEDRATE_MM_M;
FORCE_INLINE feedRate_t homing_feedrate(const AxisEnum a) {
  float v = TERN0(HAS_Z_AXIS, homing_feedrate_mm_m.z);
  #if DISABLED(DELTA)
    LINEAR_AXIS_CODE(
           if (a == X_AXIS) v = homing_feedrate_mm_m.x,
      else if (a == Y_AXIS) v = homing_feedrate_mm_m.y,
      else if (a == Z_AXIS) v = homing_feedrate_mm_m.z,
      else if (a == I_AXIS) v = homing_feedrate_mm_m.i,
      else if (a == J_AXIS) v = homing_feedrate_mm_m.j,
      else if (a == K_AXIS) v = homing_feedrate_mm_m.k
    );
  #endif
  return MMM_TO_MMS(v);
}

feedRate_t get_homing_bump_feedrate(const AxisEnum axis);

/**
 * The default feedrate for many moves, set by the most recent move
 */
extern feedRate_t feedrate_mm_s;

/**
 * Feedrate scaling is applied to all G0/G1, G2/G3, and G5 moves
 */
extern int16_t feedrate_percentage;
#define MMS_SCALED(V) ((V) * 0.01f * feedrate_percentage)
Rik
------------------------
Peckforton Light Railway - Blog Facebook Youtube

metalmuncher
Cleaner
Cleaner
Posts: 95
Joined: Sat Oct 20, 2012 4:15 pm

Re: Firmware upgrade issues

Post by metalmuncher » Thu Jun 09, 2022 4:47 pm

If the Arduino IDE is playing up, you can just open configuration.h in any text editor, its in the same folder as the Marlin.ino file you open with the Arduino IDE.

User avatar
ge_rik
Administrator
Administrator
Posts: 6497
Joined: Sun Oct 25, 2009 10:20 pm
Location: Cheshire
Contact:

Re: Firmware upgrade issues

Post by ge_rik » Fri Jun 10, 2022 8:01 pm

Eventually tracked down the homing feed rate setting in the configuration.h file. It was tucked away in a section I least expected to find it ("Mesh"???). I loaded the file into WordPad so I could use 'Find'. Then tracked it down in Arduino IDE (line 1830!) so I could edit it without adding the gobbledegook which Word adds to files. A bit convoluted, but got there in the end. I've not yet uploaded it to the printer as I want to be sure there's nothing else I want to change.

I've found that, despite what is portrayed on a load of websites and YouTube videos, updating firmware isn't as straightforward as they make out. All sorts of error messages flash up and sometimes the relevant COMS port doesn't seem to be recognised - it can take several attempts before the files upload successfully - unless my set-up is faulty. So, I'll wait a little while until I make another attempt. In the meantime, the printer seems quite happy. It even warned me that there was a thermal runaway while pre-heating for PLA. No idea why, but it's reassuring to know it is checking for such events....

Rik
------------------------
Peckforton Light Railway - Blog Facebook Youtube

User avatar
Jimmyb
Fireman
Fireman
Posts: 492
Joined: Sat Nov 23, 2019 10:43 pm
Location: Weston-super-Mare

Re: Firmware upgrade issues

Post by Jimmyb » Sat Jun 11, 2022 9:00 am

Rik, that is why I am cautious about updating firmware on any device, especially my PC, unless you can gain access to read the file you have an expensive paper weight.

User avatar
ge_rik
Administrator
Administrator
Posts: 6497
Joined: Sun Oct 25, 2009 10:20 pm
Location: Cheshire
Contact:

Re: Firmware upgrade issues

Post by ge_rik » Sat Jun 11, 2022 12:39 pm

Jimmyb wrote: Sat Jun 11, 2022 9:00 am Rik, that is why I am cautious about updating firmware on any device, especially my PC, unless you can gain access to read the file you have an expensive paper weight.
I've successfully uploaded the firmware three times now so I know, with persistence, it is possible. I quite like tinkering with the coding. I've just added an extra instruction to the start-up script so some filament is extruded before it starts printing properly. I've been finding, on my cheapo printer, that it takes quite a while before the filament flows which, until now, I've overcome by printing a large brim. Now I've started using hairspray on the bed I don't really need a brim so I want the extruder to be primed before it starts printing.

Rik
------------------------
Peckforton Light Railway - Blog Facebook Youtube

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest