Welcome! Log In Create A New Profile

Advanced

M7 M8 M9 "unrecognized command" even with #define COOLANT_CONTROL

Posted by rc3105 
M7 M8 M9 "unrecognized command" even with #define COOLANT_CONTROL
March 04, 2021 11:51PM
Cans someone sanity check me please?

I'm trying to use M7 / M8 / M9 for an ink pump, but all I get is

echo:Unknown command: "M8" (same for M7, or M9)


This is Marlin 020007 and I have these defined.

#define COOLANT_CONTROL
#if ENABLED(COOLANT_CONTROL)
#define COOLANT_MIST A5 // Enable if mist coolant is present
#define COOLANT_FLOOD A4


What am I missing???

thx
Re: M7 M8 M9 "unrecognized command" even with #define COOLANT_CONTROL
March 05, 2021 02:04AM
#if ENABLED(COOLANT_CONTROL)
        #if ENABLED(COOLANT_MIST)
          case 7: M7(); break;                                    // M7: Mist coolant ON
        #endif
        #if ENABLED(COOLANT_FLOOD)
          case 8: M8(); break;                                    // M8: Flood coolant ON
        #endif
        case 9: M9(); break;                                      // M9: Coolant OFF
      #endif

So you need COOLANT_CONTROL for M9 and you need COOLANT_MIST for M7 and COOLANT_FLOOD for M8

you should not have things after the define name, eg
#define COOLANT_CONTROL
#if ENABLED(COOLANT_CONTROL)
  #define COOLANT_MIST                // Enable if mist coolant is present
  #define COOLANT_FLOOD               // Enable if flood coolant is present

the pins are defined with COOLANT_MIST_PIN and COOLANT_FLOOD_PIN not in the above defines.

Cant explane M9 though...

Edited 1 time(s). Last edit at 03/05/2021 02:13AM by Dust.
Re: M7 M8 M9 "unrecognized command" even with #define COOLANT_CONTROL
March 05, 2021 02:25AM
duh@me, thx

#define COOLANT_CONTROL
#if ENABLED(COOLANT_CONTROL)
#define COOLANT_MIST // Enable if mist coolant is present
#define COOLANT_FLOOD // Enable if flood coolant is present
#define COOLANT_MIST_PIN 22
#define COOLANT_FLOOD_PIN 44

workin fine...
Sorry, only registered users may post in this forum.

Click here to login