M7/M8 configuration error

hi 
i'm using arduino mega and  ramps 1.6 and i want attached laser module to my 3D printer as i need to activat air assist option for lightburn software
but i'm getting an error while confuigure coolant control option m7/m8

 * Coolant Control
 *
 * Add the M7, M8, and M9 commands to turn mist or flood coolant on and off.
 *
 * Note: COOLANT_MIST_PIN and/or COOLANT_FLOOD_PIN must also be defined.
 */
#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_INVERT  false  // Set "true" if the on/off function is reversed
  #define COOLANT_FLOOD_INVERT false  // Set "true" if the on/off function is reversed

her below the error message 
it's asking to figurout the M7/M8 pin 
i'm beganner so i have no much experiance

please your help will be thankfull 


> Executing task in folder MEGA: C:\Users\ahmed\.platformio\penv\Scripts\pio.exe run <

 

Processing mega2560 (platform: atmelavr; board: megaatmega2560; framework: arduino)

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via `-v, --verbose` option

CONFIGURATION: https://docs.platformio.org/page/boards/atmelavr/megaatmega2560.html

PLATFORM: Atmel AVR (3.0.0) > Arduino Mega or Mega 2560 ATmega2560 (Mega 2560)

HARDWARE: ATMEGA2560 16MHz, 8KB RAM, 248KB Flash

DEBUG: Current (avr-stub) On-board (avr-stub, simavr)

PACKAGES:

 - framework-arduino-avr 5.1.0

 - toolchain-atmelavr 1.50400.190710 (5.4.0)

Converting Marlin.ino

LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf

LDF Modes: Finder ~ chain, Compatibility ~ soft

Found 5 compatible libraries

Scanning dependencies...

Dependency Graph

|-- <Wire> 1.0

|-- <SPI> 1.0

|-- <EEPROM> 2.0

|-- <SoftwareSerial> 1.0

Building in release mode

Compiling .pio\build\mega2560\src\src\MarlinCore.cpp.o

Compiling .pio\build\mega2560\src\src\gcode\config\M221.cpp.o

Compiling .pio\build\mega2560\src\src\gcode\config\M301.cpp.o

Compiling .pio\build\mega2560\src\src\gcode\config\M302.cpp.o

In file included from Marlin\src\inc/../HAL/./AVR/HAL.h:22:0,

                 from Marlin\src\inc/../HAL/HAL.h:26,

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

                 from Marlin\src\MarlinCore.h:24,

                 from Marlin\src\MarlinCore.cpp:31:

Marlin\src\MarlinCore.cpp: In function 'void setup()':

Marlin\src\inc/../HAL/./AVR/fastio.h:87:35: error: 'DIOCOOLANT_MIST_PIN_DDR' was not declared in this scope

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

                                   ^

Marlin\src\inc/../HAL/./AVR/../shared/Marduino.h:48:21: note: in definition of macro 'SBI'

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

                     ^

Marlin\src\inc/../HAL/./AVR/fastio.h:108:31: note: in expansion of macro '_SET_OUTPUT'

 #define SET_OUTPUT(IO)        _SET_OUTPUT(IO)

                               ^

Marlin\src\inc/../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)

                                   ^

Marlin\src\MarlinCore.cpp:1145:5: note: in expansion of macro 'OUT_WRITE'

     OUT_WRITE(COOLANT_MIST_PIN, COOLANT_MIST_INVERT);   // Init Mist Coolant OFF

     ^

Marlin\src\inc/../HAL/./AVR/fastio.h:87:54: error: 'DIOCOOLANT_MIST_PIN_PIN' was not declared in this scope

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

                                                      ^

Marlin\src\inc/../HAL/./AVR/../shared/Marduino.h:48:33: note: in definition of macro 'SBI'

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

                                 ^

Marlin\src\inc/../HAL/./AVR/fastio.h:108:31: note: in expansion of macro '_SET_OUTPUT'

 #define SET_OUTPUT(IO)        _SET_OUTPUT(IO)

                               ^

Marlin\src\inc/../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)

                                   ^

Marlin\src\MarlinCore.cpp:1145:5: note: in expansion of macro 'OUT_WRITE'

     OUT_WRITE(COOLANT_MIST_PIN, COOLANT_MIST_INVERT);   // Init Mist Coolant OFF

     ^

In file included from Marlin\src\inc/../HAL/./AVR/HAL.h:24:0,

                 from Marlin\src\inc/../HAL/HAL.h:26,

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

                 from Marlin\src\MarlinCore.h:24,

                 from Marlin\src\MarlinCore.cpp:31:

Marlin\src\inc/../HAL/./AVR/fastio.h:82:41: error: 'DIOCOOLANT_MIST_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)

                                         ^

Marlin\src\inc/../HAL/./AVR/fastio.h:102:31: note: in expansion of macro '_WRITE'

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

                               ^

Marlin\src\inc/../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)

                                                   ^

Marlin\src\MarlinCore.cpp:1145:5: note: in expansion of macro 'OUT_WRITE'

     OUT_WRITE(COOLANT_MIST_PIN, COOLANT_MIST_INVERT);   // Init Mist Coolant OFF

     ^

In file included from Marlin\src\inc/../HAL/./AVR/HAL.h:22:0,

                 from Marlin\src\inc/../HAL/HAL.h:26,

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

                 from Marlin\src\MarlinCore.h:24,

                 from Marlin\src\MarlinCore.cpp:31:

Marlin\src\inc/../HAL/./AVR/fastio.h:72:14: error: 'DIOCOOLANT_MIST_PIN_WPORT' was not declared in this scope

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

              ^

Marlin\src\inc/../HAL/./AVR/../shared/Marduino.h:48:21: note: in definition of macro 'SBI'

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

                     ^

Marlin\src\inc/../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)

                                                                                 ^

Marlin\src\inc/../HAL/./AVR/fastio.h:102:31: note: in expansion of macro '_WRITE'

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

                               ^

Marlin\src\inc/../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)

                                                   ^

Marlin\src\MarlinCore.cpp:1145:5: note: in expansion of macro 'OUT_WRITE'

     OUT_WRITE(COOLANT_MIST_PIN, COOLANT_MIST_INVERT);   // Init Mist Coolant OFF

     ^

Marlin\src\inc/../HAL/./AVR/fastio.h:73:14: error: 'DIOCOOLANT_MIST_PIN_WPORT' was not declared in this scope

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

              ^

Marlin\src\inc/../HAL/./AVR/../shared/Marduino.h:52:21: note: in definition of macro 'CBI'

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

                     ^

Marlin\src\inc/../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)

                                                                                 ^

Marlin\src\inc/../HAL/./AVR/fastio.h:102:31: note: in expansion of macro '_WRITE'

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

                               ^

Marlin\src\inc/../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)

                                                   ^

Marlin\src\MarlinCore.cpp:1145:5: note: in expansion of macro 'OUT_WRITE'

     OUT_WRITE(COOLANT_MIST_PIN, COOLANT_MIST_INVERT);   // Init Mist Coolant OFF

     ^

compilation terminated due to -fmax-errors=5.

*** [.pio\build\mega2560\src\src\MarlinCore.cpp.o] Error 1

=========================================================================== [FAILED] Took 9.26 seconds ===========================================================================

 

Environment    Status    Duration

-------------  --------  ------------

mega2560       FAILED    00:00:09.257

====================================================================== 1 failed, 0 succeeded in 00:00:09.257 ======================================================================The terminal process "C:\Users\ahmed\.platformio\penv\Scripts\pio.exe 'run'" terminated with exit code: 1.

 

Terminal will be reused by tasks, press any key to close it.


Comments

  • edited November 21
    Guess you simply have to assign the pins. try with the pin numbers you want to use.
    take care that these pins must not be used in other settings.
    I´m not familiar with Marlin ,so if it does not work try to find solution in a Marlin related Forum

     * Add the M7, M8, and M9 commands to turn mist or flood coolant on and off.
     *
     * Note: COOLANT_MIST_PIN and/or COOLANT_FLOOD_PIN must also be defined.
     */
    #define COOLANT_CONTROL
    #if ENABLED(COOLANT_CONTROL)
      #define COOLANT_MIST_PIN   X   //where x is the pinnumber for mist
      #define COOLANT_MIST                // Enable if mist coolant is present
      #define COOLANT_FLOOD_PIN Y  //where Y is the pinnumber for Flood
      #define COOLANT_FLOOD               // Enable if flood coolant is present
      #define COOLANT_MIST_INVERT  false  // Set "true" if the on/off function is reversed
      #define COOLANT_FLOOD_INVERT false  // Set "true" if the on/off function is reversed



    Further information see here:

    Marlin Support

    For best results getting help with configuration and troubleshooting, please use the following resources:




Sign In or Register to comment.