Disable M9 at the start

Hello
i’m using Arduino nano GRBL 1.1h
how to disable M9 command at the start of the gcodes?
because i’m using M8 for cooling water and M7 for air assist
so i need M8 at the start of gcodes and keep it till end of the program

; LightBurn 0.9.16
; GRBL device profile, absolute coords
; Bounds: X13 Y10 to X33 Y32

;USER START SCRIPT
M08
;USER START SCRIPT

G00 G17 G40 G21 G54
G90
M4
; Cut @ 6000 mm/min, 2% power
M9
G0X19.83Y19.36
G0Z-25
; Layer C01
G1X19.54Y19.51S5.1F6000
G1X19.27Y19.69
G1X19.03Y19.88
G1X18.8Y20.09
G1X18.6Y20.32
G1X18.42Y20.57
G1X18.28Y20.83
G1X18.16Y21.11
G1X18.07Y21.4
G1X18.02Y21.69
G1X18Y22
G1X18.02Y22.31
G1X18.07Y22.6
G1X18.16Y22.89
G1X18.28Y23.17
G1X18.42Y23.43
G1X18.6Y23.68
G1X18.8Y23.91
G1X19.03Y24.12
G1X19.27Y24.31
G1X19.54Y24.49
G1X19.83Y24.64
G1X20.14Y24.76
G1X20.46Y24.87
G1X20.79Y24.94
G1X21.14Y24.98
G1X21.5Y25
G1X21.86Y24.98
G1X22.21Y24.94
G1X22.54Y24.87
G1X22.86Y24.76
G1X23.17Y24.64
G1X23.46Y24.49
G1X23.73Y24.31
G1X23.97Y24.12
G1X24.2Y23.91
G1X24.4Y23.68
G1X24.58Y23.43
G1X24.72Y23.17
G1X24.84Y22.89
G1X24.93Y22.6
G1X24.98Y22.31
G1X25Y22
G1X24.98Y21.69
G1X24.93Y21.4
G1X24.84Y21.11
G1X24.72Y20.83
G1X24.58Y20.57
G1X24.4Y20.32
G1X24.2Y20.09
G1X23.97Y19.88
G1X23.73Y19.69
G1X23.46Y19.51
G1X23.17Y19.36
G1X22.86Y19.24
G1X22.54Y19.13
G1X22.21Y19.06
G1X21.86Y19.02
G1X21.5Y19
G1X21.14Y19.02
G1X20.79Y19.06
G1X20.46Y19.13
G1X20.14Y19.24
G1X19.83Y19.36
; Cut @ 300 mm/min, 2% power
M7
G0X13Y10
; Layer C00
G1Y32F300
G1X33
G1Y10
G1X13
G0Z0
M9
G1S0
M5
G90
; return to user-defined finish pos
G0 X0 Y0
M2

;USER END SCRIPT
M09
;USER END SCRIPT

Hello Rick
yes i’m using both M7 for air assist and M8 for cooling water but when lightburn generate the Gcode and make M( at the begaining so M8 will disable

These cannot be independently controlled. M7 is mist, M8 is flood, and M9 is off for both.

You will need to leave ‘Air Assist’ enabled for all layers, or it will emit the M9 command to turn off the air assist, and that command also turns off the mist coolant - this is how GRBL works and isn’t something I can control.

1 Like

thanks so much
I tried to use ramps board with marlin 2.7.2
when I do configure for M7/M8 i get this error
can you please help me to solved

Arduino: 1.8.13 (Windows 10), Board: “Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)”

Invalid library found in C:\Users\armat\OneDrive\Documents\Arduino\libraries\ESP8266-SerialWebSocket-master: no headers files (.h) found in C:\Users\armat\OneDrive\Documents\Arduino\libraries\ESP8266-SerialWebSocket-master

Invalid library found in C:\Users\armat\OneDrive\Documents\Arduino\libraries\websocketserver: no headers files (.h) found in C:\Users\armat\OneDrive\Documents\Arduino\libraries\websocketserver

In file included from c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\avr\hal.h:22:0,

             from c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\hal.h:26,

             from sketch\src\inc/MarlinConfig.h:31,

             from sketch\src\MarlinCore.h:24,

             from sketch\src\MarlinCore.cpp:31:

sketch\src\MarlinCore.cpp: In function ‘void setup()’:

c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\avr\fastio.h:87:35: error: ‘DIOCOOLANT_FLOOD_PIN_DDR’ was not declared in this scope

#define _SET_OUTPUT(IO) SBI(DIO ## IO ## _DDR, DIO ## IO ## _PIN)

                               ^

c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\shared\marduino.h:48:21: note: in definition of macro ‘SBI’

#define SBI(A,B) (A |= (1 << (B)))

                 ^

c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\avr\fastio.h:108:31: note: in expansion of macro ‘_SET_OUTPUT’

#define SET_OUTPUT(IO) _SET_OUTPUT(IO)

                           ^~~~~~~~~~~

c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\avr\fastio.h:114:35: note: in expansion of macro ‘SET_OUTPUT’

#define OUT_WRITE(IO,V) do{ SET_OUTPUT(IO); WRITE(IO,V); }while(0)

                               ^~~~~~~~~~

sketch\src\MarlinCore.cpp:1129:5: note: in expansion of macro ‘OUT_WRITE’

 OUT_WRITE(COOLANT_FLOOD_PIN, COOLANT_FLOOD_INVERT); // Init Flood Coolant OFF

 ^~~~~~~~~

c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\avr\fastio.h:87:35: note: suggested alternative: ‘COOLANT_FLOOD_INVERT’

#define _SET_OUTPUT(IO) SBI(DIO ## IO ## _DDR, DIO ## IO ## _PIN)

                               ^

c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\shared\marduino.h:48:21: note: in definition of macro ‘SBI’

#define SBI(A,B) (A |= (1 << (B)))

                 ^

c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\avr\fastio.h:108:31: note: in expansion of macro ‘_SET_OUTPUT’

#define SET_OUTPUT(IO) _SET_OUTPUT(IO)

                           ^~~~~~~~~~~

c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\avr\fastio.h:114:35: note: in expansion of macro ‘SET_OUTPUT’

#define OUT_WRITE(IO,V) do{ SET_OUTPUT(IO); WRITE(IO,V); }while(0)

                               ^~~~~~~~~~

sketch\src\MarlinCore.cpp:1129:5: note: in expansion of macro ‘OUT_WRITE’

 OUT_WRITE(COOLANT_FLOOD_PIN, COOLANT_FLOOD_INVERT); // Init Flood Coolant OFF

 ^~~~~~~~~

c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\avr\fastio.h:87:54: error: ‘DIOCOOLANT_FLOOD_PIN_PIN’ was not declared in this scope

#define _SET_OUTPUT(IO) SBI(DIO ## IO ## _DDR, DIO ## IO ## _PIN)

                                                  ^

c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\shared\marduino.h:48:33: note: in definition of macro ‘SBI’

#define SBI(A,B) (A |= (1 << (B)))

                             ^

c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\avr\fastio.h:108:31: note: in expansion of macro ‘_SET_OUTPUT’

#define SET_OUTPUT(IO) _SET_OUTPUT(IO)

                           ^~~~~~~~~~~

c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\avr\fastio.h:114:35: note: in expansion of macro ‘SET_OUTPUT’

#define OUT_WRITE(IO,V) do{ SET_OUTPUT(IO); WRITE(IO,V); }while(0)

                               ^~~~~~~~~~

sketch\src\MarlinCore.cpp:1129:5: note: in expansion of macro ‘OUT_WRITE’

 OUT_WRITE(COOLANT_FLOOD_PIN, COOLANT_FLOOD_INVERT); // Init Flood Coolant OFF

 ^~~~~~~~~

c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\avr\fastio.h:87:54: note: suggested alternative: ‘COOLANT_FLOOD_INVERT’

#define _SET_OUTPUT(IO) SBI(DIO ## IO ## _DDR, DIO ## IO ## _PIN)

                                                  ^

c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\shared\marduino.h:48:33: note: in definition of macro ‘SBI’

#define SBI(A,B) (A |= (1 << (B)))

                             ^

c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\avr\fastio.h:108:31: note: in expansion of macro ‘_SET_OUTPUT’

#define SET_OUTPUT(IO) _SET_OUTPUT(IO)

                           ^~~~~~~~~~~

c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\avr\fastio.h:114:35: note: in expansion of macro ‘SET_OUTPUT’

#define OUT_WRITE(IO,V) do{ SET_OUTPUT(IO); WRITE(IO,V); }while(0)

                               ^~~~~~~~~~

sketch\src\MarlinCore.cpp:1129:5: note: in expansion of macro ‘OUT_WRITE’

 OUT_WRITE(COOLANT_FLOOD_PIN, COOLANT_FLOOD_INVERT); // Init Flood Coolant OFF

 ^~~~~~~~~

In file included from c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\avr\hal.h:24:0,

             from c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\hal.h:26,

             from sketch\src\inc/MarlinConfig.h:31,

             from sketch\src\MarlinCore.h:24,

             from sketch\src\MarlinCore.cpp:31:

c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\avr\fastio.h:82:41: error: ‘DIOCOOLANT_FLOOD_PIN_RPORT’ was not declared in this scope

#define _WRITE(IO,V) do{ if (&(DIO ## IO ## _RPORT) < (uint8_t*)0x100) _WRITE_NC(IO,V); else _WRITE_C(IO,V); }while(0)

                                     ^

c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\avr\fastio.h:102:31: note: in expansion of macro ‘_WRITE’

#define WRITE(IO,V) _WRITE(IO,V)

                           ^~~~~~

c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\avr\fastio.h:114:51: note: in expansion of macro ‘WRITE’

#define OUT_WRITE(IO,V) do{ SET_OUTPUT(IO); WRITE(IO,V); }while(0)

                                               ^~~~~

sketch\src\MarlinCore.cpp:1129:5: note: in expansion of macro ‘OUT_WRITE’

 OUT_WRITE(COOLANT_FLOOD_PIN, COOLANT_FLOOD_INVERT); // Init Flood Coolant OFF

 ^~~~~~~~~

c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\avr\fastio.h:82:41: note: suggested alternative: ‘COOLANT_FLOOD_INVERT’

#define _WRITE(IO,V) do{ if (&(DIO ## IO ## _RPORT) < (uint8_t*)0x100) _WRITE_NC(IO,V); else _WRITE_C(IO,V); }while(0)

                                     ^

c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\avr\fastio.h:102:31: note: in expansion of macro ‘_WRITE’

#define WRITE(IO,V) _WRITE(IO,V)

                           ^~~~~~

c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\avr\fastio.h:114:51: note: in expansion of macro ‘WRITE’

#define OUT_WRITE(IO,V) do{ SET_OUTPUT(IO); WRITE(IO,V); }while(0)

                                               ^~~~~

sketch\src\MarlinCore.cpp:1129:5: note: in expansion of macro ‘OUT_WRITE’

 OUT_WRITE(COOLANT_FLOOD_PIN, COOLANT_FLOOD_INVERT); // Init Flood Coolant OFF

 ^~~~~~~~~

In file included from c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\avr\hal.h:22:0,

             from c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\hal.h:26,

             from sketch\src\inc/MarlinConfig.h:31,

             from sketch\src\MarlinCore.h:24,

             from sketch\src\MarlinCore.cpp:31:

c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\avr\fastio.h:72:14: error: ‘DIOCOOLANT_FLOOD_PIN_WPORT’ was not declared in this scope

if (V) SBI(DIO ## IO ## _WPORT, DIO ## IO ## _PIN); \

          ^

c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\shared\marduino.h:48:21: note: in definition of macro ‘SBI’

#define SBI(A,B) (A |= (1 << (B)))

                 ^

c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\avr\fastio.h:82:81: note: in expansion of macro ‘_WRITE_NC’

#define _WRITE(IO,V) do{ if (&(DIO ## IO ## _RPORT) < (uint8_t*)0x100) _WRITE_NC(IO,V); else _WRITE_C(IO,V); }while(0)

                                                                             ^~~~~~~~~

c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\avr\fastio.h:102:31: note: in expansion of macro ‘_WRITE’

#define WRITE(IO,V) _WRITE(IO,V)

                           ^~~~~~

c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\avr\fastio.h:114:51: note: in expansion of macro ‘WRITE’

#define OUT_WRITE(IO,V) do{ SET_OUTPUT(IO); WRITE(IO,V); }while(0)

                                               ^~~~~

sketch\src\MarlinCore.cpp:1129:5: note: in expansion of macro ‘OUT_WRITE’

 OUT_WRITE(COOLANT_FLOOD_PIN, COOLANT_FLOOD_INVERT); // Init Flood Coolant OFF

 ^~~~~~~~~

c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\avr\fastio.h:72:14: note: suggested alternative: ‘COOLANT_FLOOD_INVERT’

if (V) SBI(DIO ## IO ## _WPORT, DIO ## IO ## _PIN); \

          ^

c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\shared\marduino.h:48:21: note: in definition of macro ‘SBI’

#define SBI(A,B) (A |= (1 << (B)))

                 ^

c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\avr\fastio.h:82:81: note: in expansion of macro ‘_WRITE_NC’

#define _WRITE(IO,V) do{ if (&(DIO ## IO ## _RPORT) < (uint8_t*)0x100) _WRITE_NC(IO,V); else _WRITE_C(IO,V); }while(0)

                                                                             ^~~~~~~~~

c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\avr\fastio.h:102:31: note: in expansion of macro ‘_WRITE’

#define WRITE(IO,V) _WRITE(IO,V)

                           ^~~~~~

c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\avr\fastio.h:114:51: note: in expansion of macro ‘WRITE’

#define OUT_WRITE(IO,V) do{ SET_OUTPUT(IO); WRITE(IO,V); }while(0)

                                               ^~~~~

sketch\src\MarlinCore.cpp:1129:5: note: in expansion of macro ‘OUT_WRITE’

 OUT_WRITE(COOLANT_FLOOD_PIN, COOLANT_FLOOD_INVERT); // Init Flood Coolant OFF

 ^~~~~~~~~

c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\avr\fastio.h:73:14: error: ‘DIOCOOLANT_FLOOD_PIN_WPORT’ was not declared in this scope

else CBI(DIO ## IO ## _WPORT, DIO ## IO ## _PIN); \

          ^

c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\shared\marduino.h:52:21: note: in definition of macro ‘CBI’

#define CBI(A,B) (A &= ~(1 << (B)))

                 ^

c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\avr\fastio.h:82:81: note: in expansion of macro ‘_WRITE_NC’

#define _WRITE(IO,V) do{ if (&(DIO ## IO ## _RPORT) < (uint8_t*)0x100) _WRITE_NC(IO,V); else _WRITE_C(IO,V); }while(0)

                                                                             ^~~~~~~~~

c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\avr\fastio.h:102:31: note: in expansion of macro ‘_WRITE’

#define WRITE(IO,V) _WRITE(IO,V)

                           ^~~~~~

c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\avr\fastio.h:114:51: note: in expansion of macro ‘WRITE’

#define OUT_WRITE(IO,V) do{ SET_OUTPUT(IO); WRITE(IO,V); }while(0)

                                               ^~~~~

sketch\src\MarlinCore.cpp:1129:5: note: in expansion of macro ‘OUT_WRITE’

 OUT_WRITE(COOLANT_FLOOD_PIN, COOLANT_FLOOD_INVERT); // Init Flood Coolant OFF

 ^~~~~~~~~

c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\avr\fastio.h:73:14: note: suggested alternative: ‘COOLANT_FLOOD_INVERT’

else CBI(DIO ## IO ## _WPORT, DIO ## IO ## _PIN); \

          ^

c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\shared\marduino.h:52:21: note: in definition of macro ‘CBI’

#define CBI(A,B) (A &= ~(1 << (B)))

                 ^

c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\avr\fastio.h:82:81: note: in expansion of macro ‘_WRITE_NC’

#define _WRITE(IO,V) do{ if (&(DIO ## IO ## _RPORT) < (uint8_t*)0x100) _WRITE_NC(IO,V); else _WRITE_C(IO,V); }while(0)

                                                                             ^~~~~~~~~

c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\avr\fastio.h:102:31: note: in expansion of macro ‘_WRITE’

#define WRITE(IO,V) _WRITE(IO,V)

                           ^~~~~~

c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\avr\fastio.h:114:51: note: in expansion of macro ‘WRITE’

#define OUT_WRITE(IO,V) do{ SET_OUTPUT(IO); WRITE(IO,V); }while(0)

                                               ^~~~~

sketch\src\MarlinCore.cpp:1129:5: note: in expansion of macro ‘OUT_WRITE’

 OUT_WRITE(COOLANT_FLOOD_PIN, COOLANT_FLOOD_INVERT); // Init Flood Coolant OFF

 ^~~~~~~~~

In file included from c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\avr\hal.h:24:0,

             from c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\hal.h:26,

             from sketch\src\inc/MarlinConfig.h:31,

             from sketch\src\MarlinCore.h:24,

             from sketch\src\MarlinCore.cpp:31:

c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\avr\fastio.h:77:23: error: ‘DIOCOOLANT_FLOOD_PIN_WPORT’ was not declared in this scope

uint8_t port_bits = DIO ## IO ## _WPORT; /* Get a mask from the current port bits */ \

                   ^

c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\avr\fastio.h:82:103: note: in expansion of macro ‘_WRITE_C’

#define _WRITE(IO,V) do{ if (&(DIO ## IO ## _RPORT) < (uint8_t*)0x100) _WRITE_NC(IO,V); else _WRITE_C(IO,V); }while(0)

                                                                                                   ^~~~~~~~

c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\avr\fastio.h:102:31: note: in expansion of macro ‘_WRITE’

#define WRITE(IO,V) _WRITE(IO,V)

                           ^~~~~~

c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\avr\fastio.h:114:51: note: in expansion of macro ‘WRITE’

#define OUT_WRITE(IO,V) do{ SET_OUTPUT(IO); WRITE(IO,V); }while(0)

                                               ^~~~~

sketch\src\MarlinCore.cpp:1129:5: note: in expansion of macro ‘OUT_WRITE’

 OUT_WRITE(COOLANT_FLOOD_PIN, COOLANT_FLOOD_INVERT); // Init Flood Coolant OFF

 ^~~~~~~~~

c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\avr\fastio.h:77:23: note: suggested alternative: ‘COOLANT_FLOOD_INVERT’

uint8_t port_bits = DIO ## IO ## _WPORT; /* Get a mask from the current port bits */ \

                   ^

c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\avr\fastio.h:82:103: note: in expansion of macro ‘_WRITE_C’

#define _WRITE(IO,V) do{ if (&(DIO ## IO ## _RPORT) < (uint8_t*)0x100) _WRITE_NC(IO,V); else _WRITE_C(IO,V); }while(0)

                                                                                                   ^~~~~~~~

c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\avr\fastio.h:102:31: note: in expansion of macro ‘_WRITE’

#define WRITE(IO,V) _WRITE(IO,V)

                           ^~~~~~

c:\users\armat\appdata\local\temp\arduino_build_252812\sketch\src\hal\avr\fastio.h:114:51: note: in expansion of macro ‘WRITE’

#define OUT_WRITE(IO,V) do{ SET_OUTPUT(IO); WRITE(IO,V); }while(0)

                                               ^~~~~

sketch\src\MarlinCore.cpp:1129:5: note: in expansion of macro ‘OUT_WRITE’

 OUT_WRITE(COOLANT_FLOOD_PIN, COOLANT_FLOOD_INVERT); // Init Flood Coolant OFF

 ^~~~~~~~~

exit status 1

Error compiling for board Arduino Mega or Mega 2560.

Invalid library found in C:\Users\armat\OneDrive\Documents\Arduino\libraries\ESP8266-SerialWebSocket-master: no headers files (.h) found in C:\Users\armat\OneDrive\Documents\Arduino\libraries\ESP8266-SerialWebSocket-master

Invalid library found in C:\Users\armat\OneDrive\Documents\Arduino\libraries\websocketserver: no headers files (.h) found in C:\Users\armat\OneDrive\Documents\Arduino\libraries\websocketserver

This report would have more information with
“Show verbose output during compilation”
option enabled in File -> Preferences.

You are having errors compiling Marlin, so you’d need to talk to someone involved in the Marlin project for help with that - I’ve never done it.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.