Advertisement
Guest User

marlin settings

a guest
Nov 24th, 2015
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 6.18 KB | None | 0 0
  1. //============================= Bed Auto Leveling ===========================
  2.  
  3. #define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line)
  4. #define Z_PROBE_REPEATABILITY_TEST  // If not commented out, Z-Probe Repeatability test will be included if Auto Bed Leveling is Enabled.
  5.  
  6. #ifdef ENABLE_AUTO_BED_LEVELING
  7.  
  8. // There are 2 different ways to pick the X and Y locations to probe:
  9.  
  10. //  - "grid" mode
  11. //    Probe every point in a rectangular grid
  12. //    You must specify the rectangle, and the density of sample points
  13. //    This mode is preferred because there are more measurements.
  14. //    It used to be called ACCURATE_BED_LEVELING but "grid" is more descriptive
  15.  
  16. //  - "3-point" mode
  17. //    Probe 3 arbitrary points on the bed (that aren't colinear)
  18. //    You must specify the X & Y coordinates of all 3 points
  19.  
  20.   #define AUTO_BED_LEVELING_GRID
  21.   // with AUTO_BED_LEVELING_GRID, the bed is sampled in a
  22.   // AUTO_BED_LEVELING_GRID_POINTSxAUTO_BED_LEVELING_GRID_POINTS grid
  23.   // and least squares solution is calculated
  24.   // Note: this feature occupies 10'206 byte
  25.   #ifdef AUTO_BED_LEVELING_GRID
  26.  
  27.     // set the rectangle in which to probe
  28.     #define LEFT_PROBE_BED_POSITION 50
  29.     #define RIGHT_PROBE_BED_POSITION 150
  30.     #define BACK_PROBE_BED_POSITION 150
  31.     #define FRONT_PROBE_BED_POSITION 50
  32.  
  33.      // set the number of grid points per dimension
  34.      // I wouldn't see a reason to go above 3 (=9 probing points on the bed)
  35.     #define AUTO_BED_LEVELING_GRID_POINTS 2
  36.  
  37.  
  38.   #else  // not AUTO_BED_LEVELING_GRID
  39.     // with no grid, just probe 3 arbitrary points.  A simple cross-product
  40.     // is used to esimate the plane of the print bed
  41.  
  42.       #define ABL_PROBE_PT_1_X 15
  43.       #define ABL_PROBE_PT_1_Y 180
  44.       #define ABL_PROBE_PT_2_X 15
  45.       #define ABL_PROBE_PT_2_Y 20
  46.       #define ABL_PROBE_PT_3_X 170
  47.       #define ABL_PROBE_PT_3_Y 20
  48.  
  49.   #endif // AUTO_BED_LEVELING_GRID
  50.  
  51.  
  52.   // these are the offsets to the probe relative to the extruder tip (Hotend - Probe)
  53.   // X and Y offsets must be integers
  54.   #define X_PROBE_OFFSET_FROM_EXTRUDER -26
  55.   #define Y_PROBE_OFFSET_FROM_EXTRUDER -27
  56.   #define Z_PROBE_OFFSET_FROM_EXTRUDER -22.84
  57.  
  58.   #define Z_RAISE_BEFORE_HOMING 30       // (in mm) Raise Z before homing (G28) for Probe Clearance.
  59.                                         // Be sure you have this distance over your Z_MAX_POS in case
  60.  
  61.   #define XY_TRAVEL_SPEED 4000         // X and Y axis travel speed between probes, in mm/min
  62.  
  63.   #define Z_RAISE_BEFORE_PROBING 30    //How much the extruder will be raised before traveling to the first probing point.
  64.   #define Z_RAISE_BETWEEN_PROBINGS 5  //How much the extruder will be raised when traveling from between next probing points
  65.  
  66.   //#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell
  67.   //#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.
  68.  
  69.   //If defined, the Probe servo will be turned on only during movement and then turned off to avoid jerk
  70.   //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.
  71.   // You MUST HAVE the SERVO_ENDSTOPS defined to use here a value higher than zero otherwise your code will not compile.
  72.  
  73.   #define PROBE_SERVO_DEACTIVATION_DELAY 300
  74.  
  75.  
  76. //If you have enabled the Bed Auto Leveling and are using the same Z Probe for Z Homing,
  77. //it is highly recommended you let this Z_SAFE_HOMING enabled!!!
  78.  
  79.   #define Z_SAFE_HOMING   // This feature is meant to avoid Z homing with probe outside the bed area.
  80.                           // When defined, it will:
  81.                           // - Allow Z homing only after X and Y homing AND stepper drivers still enabled
  82.                           // - If stepper drivers timeout, it will need X and Y homing again before Z homing
  83.                           // - Position the probe in a defined XY point before Z Homing when homing all axis (G28)
  84.                           // - Block Z homing only when the probe is outside bed area.
  85.  
  86.   #ifdef Z_SAFE_HOMING
  87.  
  88.     #define Z_SAFE_HOMING_X_POINT (X_MAX_LENGTH/2)    // X point for Z homing when homing all axis (G28)
  89.     #define Z_SAFE_HOMING_Y_POINT (Y_MAX_LENGTH/2)    // Y point for Z homing when homing all axis (G28)
  90.  
  91.   #endif
  92.  
  93.   #ifdef AUTO_BED_LEVELING_GRID // Check if Probe_Offset * Grid Points is greater than Probing Range
  94.     #if X_PROBE_OFFSET_FROM_EXTRUDER < 0
  95.       #if (-(X_PROBE_OFFSET_FROM_EXTRUDER * AUTO_BED_LEVELING_GRID_POINTS) >= (RIGHT_PROBE_BED_POSITION - LEFT_PROBE_BED_POSITION))
  96.          #error "The X axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
  97.       #endif
  98.     #else
  99.       #if ((X_PROBE_OFFSET_FROM_EXTRUDER * AUTO_BED_LEVELING_GRID_POINTS) >= (RIGHT_PROBE_BED_POSITION - LEFT_PROBE_BED_POSITION))
  100.          #error "The X axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
  101.       #endif
  102.     #endif
  103.     #if Y_PROBE_OFFSET_FROM_EXTRUDER < 0
  104.       #if (-(Y_PROBE_OFFSET_FROM_EXTRUDER * AUTO_BED_LEVELING_GRID_POINTS) >= (BACK_PROBE_BED_POSITION - FRONT_PROBE_BED_POSITION))
  105.          #error "The Y axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
  106.       #endif
  107.     #else
  108.       #if ((Y_PROBE_OFFSET_FROM_EXTRUDER * AUTO_BED_LEVELING_GRID_POINTS) >= (BACK_PROBE_BED_POSITION - FRONT_PROBE_BED_POSITION))
  109.          #error "The Y axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
  110.       #endif
  111.     #endif
  112.  
  113.    
  114.   #endif
  115.  
  116. #endif // ENABLE_AUTO_BED_LEVELING
  117.  
  118.  
  119. // The position of the homing switches
  120. //#define MANUAL_HOME_POSITIONS  // If defined, MANUAL_*_HOME_POS below will be used
  121. //#define BED_CENTER_AT_0_0  // If defined, the center of the bed is at (X=0, Y=0)
  122.  
  123. //Manual homing switch locations:
  124. // For deltabots this means top and center of the Cartesian print volume.
  125. #define MANUAL_X_HOME_POS 0
  126. #define MANUAL_Y_HOME_POS 0
  127. #define MANUAL_Z_HOME_POS 0
  128. //#define MANUAL_Z_HOME_POS 402 // For delta: Distance between nozzle and print surface after homing.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement