Welcome! Log In Create A New Profile

Advanced

M900 = unknown command

Posted by luckyflyer 
M900 = unknown command
January 03, 2020 06:38PM
I'm trying to enter the K value M900 for linear advance and get unknown command on both ponterface and octoprint. Anyone else experience this, is there a fix?
Re: M900 = unknown command
January 03, 2020 08:55PM
You have to enable LIN_ADVANCE in Configuration_adv.h to activate that gcode.
Re: M900 = unknown command
January 03, 2020 11:00PM
It is enabled, I followed teaching tech's video and ran the routine until I found the best k factor. I then tried entering the k factor with M900 and got the unknown command error. The only thing I can think of is I'm running bugfix 2.0 from late September I may need to upgrade to 2.0 final, which may be more trouble than it's worth since everything else is working pretty well.
Re: M900 = unknown command
January 04, 2020 12:10AM
take a look at your Marlin/src/gcode/gcode.cpp file

It should have something like
  #if ENABLED(LIN_ADVANCE)
        case 900: M900(); break;                                  // M900: Set advance K factor.
 #endif

Change it to:
      case 900: M900(); break;                                  // M900: Set advance K factor.


then there is no excuse for it not to have that gcode.

Edited 1 time(s). Last edit at 01/04/2020 12:11AM by Dust.
Re: M900 = unknown command
January 04, 2020 12:49AM
Thanks for that dust, I'll check that, be tomorrow now.
Re: M900 = unknown command
January 04, 2020 11:08AM
Mr Dust, that edit fixed the problem, it works now, many thanks! spinning smiley sticking its tongue out

Edited 2 time(s). Last edit at 01/04/2020 11:10AM by luckyflyer.
Re: M900 = unknown command
December 31, 2022 08:19AM
While this is a pretty old post, I still want to add something.

I also had to make changes to gcode.h:

From:
#if ENABLED(LIN_ADVANCE)
    static void M900();
    static void M900_report(const bool forReplay=true);
  #endif

To:
    static void M900();
    static void M900_report(const bool forReplay=true);
Re: M900 = unknown command
December 31, 2022 08:34AM
you cannot have M900 without LIN_ADVANCE

There is zero sane reason to remove that #if
Sorry, only registered users may post in this forum.

Click here to login