Skip to main content
Improved formatting
Source Link
0scar
  • 37.1k
  • 12
  • 67
  • 155

As Mark said, Marlin supports a number of menu items in it's advanced configuration. These items are mentmeant to run custom GcodeG-code, which in this case (adding a preheat action with custom target extruder and bed temp) is enough to fill your needs. Right now I'm at the office so I can't provide an example, but I'll be back tonight with some better explanation and a code snippet.

sup? I'm back, sry for the delay. So, let's see that advanced configuration file: Configuration_adv.h. The section we are looking for is almost at the end of the file, you can ctrl+f for "CUSTOM_USER_MENUS" to find it.

#define CUSTOM_USER_MENUS
#if ENABLED(CUSTOM_USER_MENUS)
  #define USER_SCRIPT_DONE "M117 User Script Done"
  #define USER_SCRIPT_AUDIBLE_FEEDBACK
  //#define USER_SCRIPT_RETURN  // Return to status screen after a script

  #define USER_DESC_1 "Do the trick"
  #define USER_GCODE_1 "G91\nG0 z5\nG0 y10"

  #define USER_DESC_2 "Park"
  #define USER_GCODE_2 "G27 P2"

  //#define USER_DESC_2 "Preheat for PLA"
  //#define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND)

  //#define USER_DESC_3 "Preheat for ABS"
  //#define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND)

  //#define USER_DESC_4 "Heat Bed/Home/Level"
  //#define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29"

  //#define USER_DESC_5 "Home & Info"
  //#define USER_GCODE_5 "G28\nM503"
#endif

The source code downloaded from the official repo actually comes with some examples (the ones commented) and I added two more just for fun. To get your custom preheat menu item working you'll make use of the following Gcodes:

That's all, see ya

As Mark said, Marlin supports a number of menu items in it's advanced configuration. These items are ment to run custom Gcode, which in this case (adding a preheat action with custom target extruder and bed temp) is enough to fill your needs. Right now I'm at the office so I can't provide an example, but I'll be back tonight with some better explanation and a code snippet.

sup? I'm back, sry for the delay. So, let's see that advanced configuration file: Configuration_adv.h. The section we are looking for is almost at the end of the file, you can ctrl+f for "CUSTOM_USER_MENUS" to find it.

#define CUSTOM_USER_MENUS
#if ENABLED(CUSTOM_USER_MENUS)
  #define USER_SCRIPT_DONE "M117 User Script Done"
  #define USER_SCRIPT_AUDIBLE_FEEDBACK
  //#define USER_SCRIPT_RETURN  // Return to status screen after a script

  #define USER_DESC_1 "Do the trick"
  #define USER_GCODE_1 "G91\nG0 z5\nG0 y10"

  #define USER_DESC_2 "Park"
  #define USER_GCODE_2 "G27 P2"

  //#define USER_DESC_2 "Preheat for PLA"
  //#define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND)

  //#define USER_DESC_3 "Preheat for ABS"
  //#define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND)

  //#define USER_DESC_4 "Heat Bed/Home/Level"
  //#define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29"

  //#define USER_DESC_5 "Home & Info"
  //#define USER_GCODE_5 "G28\nM503"
#endif

The source code downloaded from the official repo actually comes with some examples (the ones commented) and I added two more just for fun. To get your custom preheat menu item working you'll make use of the following Gcodes:

That's all, see ya

As Mark said, Marlin supports a number of menu items in it's advanced configuration. These items are meant to run custom G-code, which in this case (adding a preheat action with custom target extruder and bed temp) is enough to fill your needs. So, let's see that advanced configuration file: Configuration_adv.h. The section we are looking for is almost at the end of the file, you can ctrl+f for "CUSTOM_USER_MENUS" to find it.

#define CUSTOM_USER_MENUS
#if ENABLED(CUSTOM_USER_MENUS)
  #define USER_SCRIPT_DONE "M117 User Script Done"
  #define USER_SCRIPT_AUDIBLE_FEEDBACK
  //#define USER_SCRIPT_RETURN  // Return to status screen after a script

  #define USER_DESC_1 "Do the trick"
  #define USER_GCODE_1 "G91\nG0 z5\nG0 y10"

  #define USER_DESC_2 "Park"
  #define USER_GCODE_2 "G27 P2"

  //#define USER_DESC_2 "Preheat for PLA"
  //#define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND)

  //#define USER_DESC_3 "Preheat for ABS"
  //#define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND)

  //#define USER_DESC_4 "Heat Bed/Home/Level"
  //#define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29"

  //#define USER_DESC_5 "Home & Info"
  //#define USER_GCODE_5 "G28\nM503"
#endif

The source code downloaded from the official repo actually comes with some examples (the ones commented) and I added two more just for fun. To get your custom preheat menu item working you'll make use of the following Gcodes:

improved answer
Source Link

As Mark said, Marlin supports a number of menu items in it's advanceadvanced configuration. These items are ment to run custom Gcode, which in this case (adding a preheat action with custom target extruder and bed temp) is enough to fill your needs. Right now I'm at the office so I can't provide an example, but I'll be back tonight with some better explanation and a code snippet.

sup? I'm back, sry for the delay. So, let's see that advanced configuration file: Configuration_adv.h. The section we are looking for is almost at the end of the file, you can ctrl+f for "CUSTOM_USER_MENUS" to find it.

#define CUSTOM_USER_MENUS
#if ENABLED(CUSTOM_USER_MENUS)
  #define USER_SCRIPT_DONE "M117 User Script Done"
  #define USER_SCRIPT_AUDIBLE_FEEDBACK
  //#define USER_SCRIPT_RETURN  // Return to status screen after a script

  #define USER_DESC_1 "Do the trick"
  #define USER_GCODE_1 "G91\nG0 z5\nG0 y10"

  #define USER_DESC_2 "Park"
  #define USER_GCODE_2 "G27 P2"

  //#define USER_DESC_2 "Preheat for PLA"
  //#define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND)

  //#define USER_DESC_3 "Preheat for ABS"
  //#define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND)

  //#define USER_DESC_4 "Heat Bed/Home/Level"
  //#define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29"

  //#define USER_DESC_5 "Home & Info"
  //#define USER_GCODE_5 "G28\nM503"
#endif

The source code downloaded from the official repo actually comes with some examples (the ones commented) and I added two more just for fun. To get your custom preheat menu item working you'll make use of the following Gcodes:

That's all, see ya

As Mark said, Marlin supports a number of menu items in it's advance configuration. These items are ment to run custom Gcode, which in this case (adding a preheat action with custom target extruder and bed temp) is enough to fill your needs. Right now I'm at the office so I can't provide an example, but I'll be back tonight with some better explanation and a code snippet.

As Mark said, Marlin supports a number of menu items in it's advanced configuration. These items are ment to run custom Gcode, which in this case (adding a preheat action with custom target extruder and bed temp) is enough to fill your needs. Right now I'm at the office so I can't provide an example, but I'll be back tonight with some better explanation and a code snippet.

sup? I'm back, sry for the delay. So, let's see that advanced configuration file: Configuration_adv.h. The section we are looking for is almost at the end of the file, you can ctrl+f for "CUSTOM_USER_MENUS" to find it.

#define CUSTOM_USER_MENUS
#if ENABLED(CUSTOM_USER_MENUS)
  #define USER_SCRIPT_DONE "M117 User Script Done"
  #define USER_SCRIPT_AUDIBLE_FEEDBACK
  //#define USER_SCRIPT_RETURN  // Return to status screen after a script

  #define USER_DESC_1 "Do the trick"
  #define USER_GCODE_1 "G91\nG0 z5\nG0 y10"

  #define USER_DESC_2 "Park"
  #define USER_GCODE_2 "G27 P2"

  //#define USER_DESC_2 "Preheat for PLA"
  //#define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND)

  //#define USER_DESC_3 "Preheat for ABS"
  //#define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND)

  //#define USER_DESC_4 "Heat Bed/Home/Level"
  //#define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29"

  //#define USER_DESC_5 "Home & Info"
  //#define USER_GCODE_5 "G28\nM503"
#endif

The source code downloaded from the official repo actually comes with some examples (the ones commented) and I added two more just for fun. To get your custom preheat menu item working you'll make use of the following Gcodes:

That's all, see ya

Source Link

As Mark said, Marlin supports a number of menu items in it's advance configuration. These items are ment to run custom Gcode, which in this case (adding a preheat action with custom target extruder and bed temp) is enough to fill your needs. Right now I'm at the office so I can't provide an example, but I'll be back tonight with some better explanation and a code snippet.