More sanity-checking for ABL
- Moved sanity-checks to Marlin_main.cpp - Applied to other configuration files - Fixed formatting of ABL output - Passing verbose level to probe_pt - Miscellaneous cleanup - Put CONFIG_STEPPERS_TOSHIBA into Configuration.h
This commit is contained in:
		| @@ -3,13 +3,12 @@ | ||||
|  | ||||
| #include "boards.h" | ||||
|  | ||||
|  | ||||
| //=========================================================================== | ||||
| //============================= Getting Started ============================= | ||||
| //=========================================================================== | ||||
| /* | ||||
| Here are some standard links for getting your machine calibrated: | ||||
|  * http://reprap.org/wiki/Calibration  | ||||
|  * http://reprap.org/wiki/Calibration | ||||
|  * http://youtu.be/wAL9d7FgInk | ||||
|  * http://calculator.josefprusa.cz | ||||
|  * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide | ||||
| @@ -18,7 +17,6 @@ Here are some standard links for getting your machine calibrated: | ||||
|  * http://www.thingiverse.com/thing:298812 | ||||
| */ | ||||
|  | ||||
|  | ||||
| // This configuration file contains the basic settings. | ||||
| // Advanced settings can be found in Configuration_adv.h | ||||
| // BASIC SETTINGS: select your board type, temperature sensor type, axis scaling, and endstop configuration | ||||
| @@ -52,7 +50,7 @@ Here are some standard links for getting your machine calibrated: | ||||
| #define L2_2 sq(Linkage_2) // do not change | ||||
|  | ||||
| //=========================================================================== | ||||
| //========================= SCARA Settings end ================================== | ||||
| //========================= SCARA Settings end ============================== | ||||
| //=========================================================================== | ||||
|  | ||||
| // User-specified version info of this build to display in [Pronterface, etc] terminal window during | ||||
| @@ -70,7 +68,6 @@ Here are some standard links for getting your machine calibrated: | ||||
| // Serial port 0 is still used by the Arduino bootloader regardless of this setting. | ||||
| #define SERIAL_PORT 0 | ||||
|  | ||||
| // This determines the communication speed of the printer | ||||
| // This determines the communication speed of the printer | ||||
| #define BAUDRATE 250000 | ||||
|  | ||||
| @@ -125,6 +122,7 @@ Here are some standard links for getting your machine calibrated: | ||||
| // 10 is 100k RS thermistor 198-961 (4.7k pullup) | ||||
| // 11 is 100k beta 3950 1% thermistor (4.7k pullup) | ||||
| // 12 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed) | ||||
| // 13 is 100k Hisens 3950  1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"  | ||||
| // 20 is the PT100 circuit found in the Ultimainboard V2.x | ||||
| // 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950 | ||||
| // | ||||
| @@ -138,6 +136,10 @@ Here are some standard links for getting your machine calibrated: | ||||
| // 1010 is Pt1000 with 1k pullup (non standard) | ||||
| // 147 is Pt100 with 4k7 pullup | ||||
| // 110 is Pt100 with 1k pullup (non standard) | ||||
| // 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below.  | ||||
| //     Use it for Testing or Development purposes. NEVER for production machine. | ||||
| //     #define DUMMY_THERMISTOR_998_VALUE 25 | ||||
| //     #define DUMMY_THERMISTOR_999_VALUE 100 | ||||
|  | ||||
| #define TEMP_SENSOR_0 1 | ||||
| #define TEMP_SENSOR_1 0 | ||||
| @@ -189,31 +191,24 @@ Here are some standard links for getting your machine calibrated: | ||||
| // Comment the following line to disable PID and enable bang-bang. | ||||
| #define PIDTEMP | ||||
| #define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current | ||||
| #define PID_MAX 255 // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current | ||||
| #define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current | ||||
| #ifdef PIDTEMP | ||||
|   //#define PID_DEBUG // Sends debug data to the serial port. | ||||
|   //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX | ||||
|   //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay | ||||
|   //#define PID_PARAMS_PER_EXTRUDER // Uses separate PID parameters for each extruder (useful for mismatched extruders) | ||||
|                                     // Set/get with gcode: M301 E[extruder number, 0-2] | ||||
|   #define PID_FUNCTIONAL_RANGE 20 // If the temperature difference between the target temperature and the actual temperature | ||||
|                                   // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. | ||||
|   #define PID_INTEGRAL_DRIVE_MAX 255  //limit for the integral term | ||||
|   #define PID_INTEGRAL_DRIVE_MAX PID_MAX  //limit for the integral term | ||||
|   #define K1 0.95 //smoothing factor within the PID | ||||
|   #define PID_dT ((OVERSAMPLENR * 8.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine | ||||
|   #define PID_dT ((OVERSAMPLENR * 10.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine | ||||
|  | ||||
| // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it | ||||
| // Ultimaker | ||||
|   //  #define  DEFAULT_Kp 22.2 | ||||
|   //  #define  DEFAULT_Ki 1.08 | ||||
|    // #define  DEFAULT_Kd 114 | ||||
|    | ||||
|  // Jhead MK5: From Autotune   | ||||
|   //  #define  DEFAULT_Kp 20.92 | ||||
|    // #define  DEFAULT_Ki 1.51 | ||||
|   //  #define  DEFAULT_Kd 72.34 | ||||
|      | ||||
|  //Merlin Hotend: From Autotune   | ||||
|     #define  DEFAULT_Kp 24.5 | ||||
|     #define  DEFAULT_Ki 1.72 | ||||
|     #define  DEFAULT_Kd 87.73 | ||||
| //    #define  DEFAULT_Kp 22.2 | ||||
| //    #define  DEFAULT_Ki 1.08 | ||||
| //    #define  DEFAULT_Kd 114 | ||||
|  | ||||
| // MakerGear | ||||
| //    #define  DEFAULT_Kp 7.0 | ||||
| @@ -221,9 +216,20 @@ Here are some standard links for getting your machine calibrated: | ||||
| //    #define  DEFAULT_Kd 12 | ||||
|  | ||||
| // Mendel Parts V9 on 12V | ||||
|   //  #define  DEFAULT_Kp 63.0 | ||||
|    // #define  DEFAULT_Ki 2.25 | ||||
|    // #define  DEFAULT_Kd 440 | ||||
| //    #define  DEFAULT_Kp 63.0 | ||||
| //    #define  DEFAULT_Ki 2.25 | ||||
| //    #define  DEFAULT_Kd 440 | ||||
|    | ||||
| // Jhead MK5: From Autotune | ||||
| //    #define  DEFAULT_Kp 20.92 | ||||
| //    #define  DEFAULT_Ki 1.51 | ||||
| //    #define  DEFAULT_Kd 72.34 | ||||
|      | ||||
| // Merlin Hotend: From Autotune | ||||
|     #define  DEFAULT_Kp 24.5 | ||||
|     #define  DEFAULT_Ki 1.72 | ||||
|     #define  DEFAULT_Kd 87.73 | ||||
|  | ||||
| #endif // PIDTEMP | ||||
|  | ||||
| //=========================================================================== | ||||
| @@ -251,9 +257,9 @@ Here are some standard links for getting your machine calibrated: | ||||
| #ifdef PIDTEMPBED | ||||
| //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) | ||||
| //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) | ||||
|   //  #define  DEFAULT_bedKp 10.00 | ||||
|   //  #define  DEFAULT_bedKi .023 | ||||
|   //  #define  DEFAULT_bedKd 305.4 | ||||
| //    #define  DEFAULT_bedKp 10.00 | ||||
| //    #define  DEFAULT_bedKi .023 | ||||
| //    #define  DEFAULT_bedKd 305.4 | ||||
|  | ||||
| //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) | ||||
| //from pidautotune | ||||
| @@ -271,7 +277,6 @@ Here are some standard links for getting your machine calibrated: | ||||
| #endif // PIDTEMPBED | ||||
|  | ||||
|  | ||||
|  | ||||
| //this prevents dangerous Extruder moves, i.e. if the temperature is under the limit | ||||
| //can be software-disabled for whatever purposes by | ||||
| //#define PREVENT_DANGEROUS_EXTRUDE | ||||
| @@ -281,7 +286,6 @@ Here are some standard links for getting your machine calibrated: | ||||
| #define EXTRUDE_MINTEMP 150 | ||||
| #define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances. | ||||
|  | ||||
|  | ||||
| //=========================================================================== | ||||
| //============================= Thermal Runaway Protection ================== | ||||
| //=========================================================================== | ||||
| @@ -323,12 +327,15 @@ your extruder heater takes 2 minutes to hit the target on heating. | ||||
|  | ||||
|  | ||||
| //=========================================================================== | ||||
| //============================ Mechanical Settings ========================== | ||||
| //============================= Mechanical Settings ========================= | ||||
| //=========================================================================== | ||||
|  | ||||
| // Uncomment the following line to enable CoreXY kinematics | ||||
| // Uncomment this option to enable CoreXY kinematics | ||||
| // #define COREXY | ||||
|  | ||||
| // Enable this option for Toshiba steppers | ||||
| // #define CONFIG_STEPPERS_TOSHIBA | ||||
|  | ||||
| // coarse Endstop Settings | ||||
| //#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors | ||||
|  | ||||
| @@ -361,11 +368,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of | ||||
| //#define DISABLE_MAX_ENDSTOPS | ||||
| //#define DISABLE_MIN_ENDSTOPS | ||||
|  | ||||
| // Disable max endstops for compatibility with endstop checking routine | ||||
| #if defined(COREXY) && !defined(DISABLE_MAX_ENDSTOPS) | ||||
|   #define DISABLE_MAX_ENDSTOPS | ||||
| #endif | ||||
|  | ||||
| // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1 | ||||
| #define X_ENABLE_ON 0 | ||||
| #define Y_ENABLE_ON 0 | ||||
| @@ -388,7 +390,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of | ||||
| #define INVERT_E3_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false | ||||
|  | ||||
| // ENDSTOP SETTINGS: | ||||
| // Sets direction of endstop	s when homing; 1=MAX, -1=MIN | ||||
| // Sets direction of endstops when homing; 1=MAX, -1=MIN | ||||
| #define X_HOME_DIR 1 | ||||
| #define Y_HOME_DIR 1 | ||||
| #define Z_HOME_DIR -1 | ||||
| @@ -414,43 +416,42 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of | ||||
| //=========================================================================== | ||||
|  | ||||
| //#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line) | ||||
| #define Z_PROBE_REPEATABILITY_TEST  // If not commented out, Z-Probe Repeatability test will be included if Auto Bed Leveling is Enabled. | ||||
|  | ||||
| #ifdef ENABLE_AUTO_BED_LEVELING | ||||
|  | ||||
| // There are 2 different ways to pick the X and Y locations to probe: | ||||
|  | ||||
| //  - "grid" mode | ||||
| //    Probe every point in a rectangular grid | ||||
| //    You must specify the rectangle, and the density of sample points | ||||
| //    This mode is preferred because there are more measurements. | ||||
| //    It used to be called ACCURATE_BED_LEVELING but "grid" is more descriptive | ||||
|  | ||||
| //  - "3-point" mode | ||||
| //    Probe 3 arbitrary points on the bed (that aren't colinear) | ||||
| //    You must specify the X & Y coordinates of all 3 points | ||||
|   // There are 2 different ways to specify probing locations | ||||
|   // | ||||
|   // - "grid" mode | ||||
|   //   Probe several points in a rectangular grid. | ||||
|   //   You specify the rectangle and the density of sample points. | ||||
|   //   This mode is preferred because there are more measurements. | ||||
|   // | ||||
|   // - "3-point" mode | ||||
|   //   Probe 3 arbitrary points on the bed (that aren't colinear) | ||||
|   //   You specify the XY coordinates of all 3 points. | ||||
|  | ||||
|   // Enable this to sample the bed in a grid (least squares solution) | ||||
|   // Note: this feature generates 10KB extra code size | ||||
|   #define AUTO_BED_LEVELING_GRID | ||||
|   // with AUTO_BED_LEVELING_GRID, the bed is sampled in a | ||||
|   // AUTO_BED_LEVELING_GRID_POINTSxAUTO_BED_LEVELING_GRID_POINTS grid | ||||
|   // and least squares solution is calculated | ||||
|   // Note: this feature occupies 10'206 byte | ||||
|  | ||||
|   #ifdef AUTO_BED_LEVELING_GRID | ||||
|  | ||||
|     // set the rectangle in which to probe | ||||
|     // The edges of the rectangle in which to probe | ||||
|     #define LEFT_PROBE_BED_POSITION 15 | ||||
|     #define RIGHT_PROBE_BED_POSITION 170 | ||||
|     #define BACK_PROBE_BED_POSITION 180 | ||||
|     #define FRONT_PROBE_BED_POSITION 20 | ||||
|     #define BACK_PROBE_BED_POSITION 170 | ||||
|  | ||||
|      // set the number of grid points per dimension | ||||
|      // I wouldn't see a reason to go above 3 (=9 probing points on the bed) | ||||
|     // Set the number of grid points per dimension | ||||
|     // You probably don't need more than 3 (squared=9) | ||||
|     #define AUTO_BED_LEVELING_GRID_POINTS 2 | ||||
|  | ||||
|  | ||||
|   #else  // not AUTO_BED_LEVELING_GRID | ||||
|     // with no grid, just probe 3 arbitrary points.  A simple cross-product | ||||
|     // is used to esimate the plane of the print bed | ||||
|   #else  // !AUTO_BED_LEVELING_GRID | ||||
|  | ||||
|       // Arbitrary points to probe. A simple cross-product | ||||
|       // is used to estimate the plane of the bed. | ||||
|       #define ABL_PROBE_PT_1_X 15 | ||||
|       #define ABL_PROBE_PT_1_Y 180 | ||||
|       #define ABL_PROBE_PT_2_X 15 | ||||
| @@ -461,10 +462,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of | ||||
|   #endif // AUTO_BED_LEVELING_GRID | ||||
|  | ||||
|  | ||||
|   // these are the offsets to the probe relative to the extruder tip (Hotend - Probe) | ||||
|   #define X_PROBE_OFFSET_FROM_EXTRUDER -25 | ||||
|   #define Y_PROBE_OFFSET_FROM_EXTRUDER -29 | ||||
|   #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35 | ||||
|   // Offsets to the probe relative to the extruder tip (Hotend - Probe) | ||||
|   // X and Y offsets must be integers | ||||
|   #define X_PROBE_OFFSET_FROM_EXTRUDER -25     // -left  +right | ||||
|   #define Y_PROBE_OFFSET_FROM_EXTRUDER -29     // -front +behind | ||||
|   #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35  // -below (always!) | ||||
|  | ||||
|   //#define Z_RAISE_BEFORE_HOMING 4       // (in mm) Raise Z before homing (G28) for Probe Clearance. | ||||
|                                         // Be sure you have this distance over your Z_MAX_POS in case | ||||
| @@ -474,6 +476,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of | ||||
|   #define Z_RAISE_BEFORE_PROBING 15    //How much the extruder will be raised before traveling to the first probing point. | ||||
|   #define Z_RAISE_BETWEEN_PROBINGS 5  //How much the extruder will be raised when traveling from between next probing points | ||||
|  | ||||
|   //#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell | ||||
|   //#define SLED_DOCKING_OFFSET 5 // the extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like. | ||||
|  | ||||
|   //If defined, the Probe servo will be turned on only during movement and then turned off to avoid jerk | ||||
|   //The value is the delay to turn the servo off after powered on - depends on the servo speed; 300ms is good value, but you can try lower it. | ||||
| @@ -528,7 +532,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of | ||||
| #define DEFAULT_RETRACT_ACCELERATION  2000  // X, Y, Z and E max acceleration in mm/s^2 for retracts | ||||
|  | ||||
| // Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing). | ||||
| // The offset has to be X=0, Y=0 for extruder 0 hotend (default extruder). | ||||
| // The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder). | ||||
| // For the other hotends it is their distance from the extruder 0 hotend. | ||||
| // #define EXTRUDER_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis | ||||
| // #define EXTRUDER_OFFSET_Y {0.0, 5.00}  // (in mm) for each extruder, offset of the hotend on the Y axis | ||||
| @@ -539,9 +543,9 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of | ||||
| #define DEFAULT_EJERK                 3    // (mm/sec) | ||||
|  | ||||
|  | ||||
| //=========================================================================== | ||||
| //============================= Additional Features ========================= | ||||
| //=========================================================================== | ||||
| //============================================================================= | ||||
| //============================= Additional Features =========================== | ||||
| //============================================================================= | ||||
|  | ||||
| // Custom M code points | ||||
| //#define CUSTOM_M_CODES | ||||
| @@ -572,7 +576,12 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of | ||||
| #define ABS_PREHEAT_HPB_TEMP 100 | ||||
| #define ABS_PREHEAT_FAN_SPEED 255   // Insert Value between 0 and 255 | ||||
|  | ||||
| //LCD and SD support | ||||
| //==============================LCD and SD support============================= | ||||
|  | ||||
| // Define your display language below. Replace (en) with your language code and uncomment. | ||||
| // en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu | ||||
| // See also language.h | ||||
| //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) | ||||
|  | ||||
| // Character based displays can have different extended charsets. | ||||
| #define DISPLAY_CHARSET_HD44780_JAPAN     // "ääööüüß23°" | ||||
| @@ -738,11 +747,13 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of | ||||
| // Shift register panels | ||||
| // --------------------- | ||||
| // 2 wire Non-latching LCD SR from: | ||||
| // https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection | ||||
| //#define SR_LCD | ||||
| #ifdef SR_LCD | ||||
|    #define SR_LCD_2W_NL    // Non latching 2 wire shift register | ||||
|    //#define NEWPANEL | ||||
| // https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection  | ||||
|  | ||||
| //#define SAV_3DLCD | ||||
| #ifdef SAV_3DLCD | ||||
|    #define SR_LCD_2W_NL    // Non latching 2 wire shiftregister | ||||
|    #define NEWPANEL | ||||
|    #define ULTIPANEL | ||||
| #endif | ||||
|  | ||||
|  | ||||
| @@ -751,7 +762,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of | ||||
|   #define SDSUPPORT | ||||
|   #define ULTRA_LCD | ||||
|   #ifdef DOGLCD // Change number of lines to match the DOG graphic display | ||||
|     #define LCD_WIDTH 20 | ||||
|     #define LCD_WIDTH 22 | ||||
|     #define LCD_HEIGHT 5 | ||||
|   #else | ||||
|     #define LCD_WIDTH 20 | ||||
| @@ -760,7 +771,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of | ||||
| #else //no panel but just LCD | ||||
|   #ifdef ULTRA_LCD | ||||
|   #ifdef DOGLCD // Change number of lines to match the 128x64 graphics display | ||||
|     #define LCD_WIDTH 20 | ||||
|     #define LCD_WIDTH 22 | ||||
|     #define LCD_HEIGHT 5 | ||||
|   #else | ||||
|     #define LCD_WIDTH 16 | ||||
| @@ -844,13 +855,13 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of | ||||
| // Uncomment below to enable | ||||
| //#define FILAMENT_SENSOR | ||||
|  | ||||
| #define FILAMENT_SENSOR_EXTRUDER_NUM  0  //The number of the extruder that has the filament sensor (0,1,2) | ||||
| #define MEASUREMENT_DELAY_CM      14  //measurement delay in cm.  This is the distance from filament sensor to middle of barrel | ||||
| #define FILAMENT_SENSOR_EXTRUDER_NUM	0  //The number of the extruder that has the filament sensor (0,1,2) | ||||
| #define MEASUREMENT_DELAY_CM			14  //measurement delay in cm.  This is the distance from filament sensor to middle of barrel | ||||
|  | ||||
| #define DEFAULT_NOMINAL_FILAMENT_DIA  3.0  //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software.  Used for sensor reading validation | ||||
| #define MEASURED_UPPER_LIMIT          3.30  //upper limit factor used for sensor reading validation in mm | ||||
| #define MEASURED_LOWER_LIMIT          1.90  //lower limit factor for sensor reading validation in mm | ||||
| #define MAX_MEASUREMENT_DELAY     20  //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM  and lower number saves RAM) | ||||
| #define MAX_MEASUREMENT_DELAY			20  //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM  and lower number saves RAM) | ||||
|  | ||||
| //defines used in the code | ||||
| #define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user