锐单电子商城 , 一站式电子元器件采购平台!
  • 电话:400-990-0325

Marlin2.0.9 Configuration_adv.h详解

时间:2022-09-18 08:30:00 m125dc2labb继电器m11传感器2c公形引脚插头线对线连接器振动速度传感器yzm8接近开关传感器e2e152m400vacy电容

/**

  • Configuration_adv.h
  • 高级设置.
  • 只有当你知道自己在做什么时,你才能改变这些.
  • 如果设置不当,有些设置可能会损坏你的打印机!
  • 在 Configuration.h中的基本设置
    */
    #define CONFIGURATION_ADV_H_VERSION 02000900

//===========================================================================
//============================= Thermal Settings ============================
//===========================================================================
// @section temperature

/**
*热电偶传感器对噪音非常敏感。任何在传感器导线中,如步进电机并联运行的导线,都可能导致热电偶传感器报告虚假错误。value这是对错误发生前一行可能发生的错误数量的报告。这允许我们忽略间歇性错误条件,仍然检测到实际故障,这应该导致传感器的连续错误流。

 将此值设置为0,第一次出错时会失败。 

*/
#define THERMOCOUPLE_MAX_ERRORS 15

//
// 自定义热敏电阻1000参数
//
#if TEMP_SENSOR_0 == 1000
#define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // 上拉电阻
#define HOTEND0_RESISTANCE_25C_OHMS 100000 // 在 25C时的电阻
#define HOTEND0_BETA 3950 // β值
#endif

#if TEMP_SENSOR_1 == 1000
#define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // 上拉电阻
#define HOTEND1_RESISTANCE_25C_OHMS 100000 // 在 25C时的电阻
#define HOTEND1_BETA 3950 // β值
#endif

#if TEMP_SENSOR_2 == 1000
#define HOTEND2_PULLUP_RESISTOR_OHMS 4700 //上拉电阻
#define HOTEND2_RESISTANCE_25C_OHMS 100000 // 在 25C时的电阻
#define HOTEND2_BETA 3950 // β值
#endif

#if TEMP_SENSOR_3 == 1000
#define HOTEND3_PULLUP_RESISTOR_OHMS 4700 //上拉电阻
#define HOTEND3_RESISTANCE_25C_OHMS 100000 //在 25C时的电阻
#define HOTEND3_BETA 3950 // β值
#endif

#if TEMP_SENSOR_4 == 1000
#define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // 上拉电阻
#define HOTEND4_RESISTANCE_25C_OHMS 100000 //在 25C时的电阻
#define HOTEND4_BETA 3950 // Beta value
#endif

#if TEMP_SENSOR_5 == 1000
#define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // 上拉电阻
#define HOTEND5_RESISTANCE_25C_OHMS 100000 // 在 25C时的电阻
#define HOTEND5_BETA 3950 // Beta value
#endif

#if TEMP_SENSOR_6 == 1000
#define HOTEND6_PULLUP_RESISTOR_OHMS 4700 // 上拉电阻
#define HOTEND6_RESISTANCE_25C_OHMS 100000 //在 25C时的电阻
#define HOTEND6_BETA 3950 // Beta value
#endif

#if TEMP_SENSOR_7 == 1000
#define HOTEND7_PULLUP_RESISTOR_OHMS 4700 // 上拉电阻
#define HOTEND7_RESISTANCE_25C_OHMS 100000 // 在 25C时的电阻
#define HOTEND7_BETA 3950 // Beta value
#endif

#if TEMP_SENSOR_BED == 1000
#define BED_PULLUP_RESISTOR_OHMS 4700 //上拉电阻
#define BED_RESISTANCE_25C_OHMS 100000 // 在 25C时的电阻
#define BED_BETA 3950 // Beta value
#endif

#if TEMP_SENSOR_CHAMBER == 1000
#define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // 上拉电阻
#define CHAMBER_RESISTANCE_25C_OHMS 100000 // 在 25C时的电阻
#define CHAMBER_BETA 3950 // Beta value
#endif

#if TEMP_SENSOR_COOLER == 1000
#define COOLER_PULLUP_RESISTOR_OHMS 4700 // 上拉电阻
#define COOLER_RESISTANCE_25C_OHMS 100000 // 在 25C时的电阻
#define COOLER_BETA 3950 // Beta value
#endif

#if TEMP_SENSOR_PROBE == 1000
#define PROBE_PULLUP_RESISTOR_OHMS 4700 //上拉电阻
#define PROBE_RESISTANCE_25C_OHMS 100000 // 在 25C时的电阻
#define PROBE_BETA 3950 // Beta value
#endif

#if TEMP_SENSOR_REDUNDANT == 1000
#define REDUNDANT_PULLUP_RESISTOR_OHMS 4700 // 上拉电阻
#define REDUNDANT_RESISTANCE_25C_OHMS 100000 // 在 25C时的电阻
#define REDUNDANT_BETA 3950 // Beta value
#endif

//
// Hephestos 2 24V 热床升级工具
// https://store.bq.com/en/heated-bed-kit-hephestos2
//
//#define HEPHESTOS2_HEATED_BED_KIT
#if ENABLED(HEPHESTOS2_HEATED_BED_KIT)
#undef TEMP_SENSOR_BED
#define TEMP_SENSOR_BED 70
#define HEATER_BED_INVERTING true
#endif

//
//热床 Bang-Bang 选项
//
#if DISABLED(PIDTEMPBED)
#define BED_CHECK_INTERVAL 5000 // (ms)bang-bang加热方式间隔检查时间
#if ENABLED(BED_LIMIT_SWITCHING)
#define BED_HYSTERESIS 2 // (°C) 仅当ABS(T-target) > BED_HYSTERESIS设置相应的加热器状态
#endif
#endif

//
// 腔室加热选项
//
#if DISABLED(PIDTEMPCHAMBER)
#define CHAMBER_CHECK_INTERVAL 5000 // (ms) bang-bang加热方式间隔检查时间
#if ENABLED(CHAMBER_LIMIT_SWITCHING)
#define CHAMBER_HYSTERESIS 2 // (°C) Only set the relevant heater state when ABS(T-target) > CHAMBER_HYSTERESIS
#endif
#endif

#if 室温传感器
//#define HEATER_CHAMBER_PIN P2_04 // 请加热开关引脚(example: SKR 1.4 Turbo HE1 plug)
//#define HEATER_CHAMBER_INVERTING false
//#dfine FAN1_PIN -1 // 在引脚 P2_04移除风扇信号 (example: SKR 1.4 Turbo HE1 plug)

//#define CHAMBER_FAN // 在腔室使能风扇
#if ENABLED(CHAMBER_FAN)
#define CHAMBER_FAN_MODE 2 // 风扇控制模式: 0=静态; 1=当温度高于目标时线性增长; 2=V形曲线; 3=类似于方式1,但风扇总是开着.
#if CHAMBER_FAN_MODE == 0
#define CHAMBER_FAN_BASE 255 // 腔室风扇PWM (0-255)
#elif CHAMBER_FAN_MODE == 1
#define CHAMBER_FAN_BASE 128 // 腔室风扇PWM (0-255);当室温高于目标温度时开启
#define CHAMBER_FAN_FACTOR 25 // 高于目标每°C PWM
#elif CHAMBER_FAN_MODE == 2
#define CHAMBER_FAN_BASE 128 //最小腔室风扇PWM (0-255)
#define CHAMBER_FAN_FACTOR 25 //与目标的每°C差PWM增加
#elif CHAMBER_FAN_MODE == 3
#define CHAMBER_FAN_BASE 128 //腔室风扇 PWM (0-255)
#define CHAMBER_FAN_FACTOR 25 // PWM increase per °C above target
#endif
#endif

//#define CHAMBER_VENT // 使能一个舵机控制的腔室通风口
#if ENABLED(CHAMBER_VENT)
#define CHAMBER_VENT_SERVO_NR 1 // 排气舵机编号
#define HIGH_EXCESS_HEAT_LIMIT 5 // 在超过目标温度多少的情况下,要考虑室中有多余的热量开启
#define LOW_EXCESS_HEAT_LIMIT 3
#define MIN_COOLING_SLOPE_TIME_CHAMBER_VENT 20
#define MIN_COOLING_SLOPE_DEG_CHAMBER_VENT 1.5
#endif
#endif

//
// 激光冷却器选项
//
#if TEMP_SENSOR_COOLER
#define COOLER_MINTEMP 8 // (°C)
#define COOLER_MAXTEMP 26 // (°C)
#define COOLER_DEFAULT_TEMP 16 // (°C)
#define TEMP_COOLER_HYSTERESIS 1 // (°C) 接近该温度被认为是“足够接近”的目标温度
#define COOLER_PIN 8 // 激光冷却器开/关引脚用于控制电源到冷却元件(e.g., TEC, External chiller via relay)
#define COOLER_INVERTING false
#define TEMP_COOLER_PIN 15 // 激光/冷却器温度传感器引脚。ADC是必需的。
#define COOLER_FAN // 开启冷却器上的风扇, Fan# 0,1,2,3 etc.
#define COOLER_FAN_INDEX 0 // 风扇编号 0, 1, 2 etc. e.g.
#if ENABLED(COOLER_FAN)
#define COOLER_FAN_BASE 100 //冷却器风扇 PWM (0-255);当冷却温度高于目标温度时开启
#define COOLER_FAN_FACTOR 25 // 高于目标温度每°C PWM增加值
#endif
#endif

//
// 激光冷却液流量计
//
//#define LASER_COOLANT_FLOW_METER
#if ENABLED(LASER_COOLANT_FLOW_METER)
#define FLOWMETER_PIN 20 // Requires an external interrupt-enabled pin (e.g., RAMPS 2,3,18,19,20,21)
#define FLOWMETER_PPL 5880 // (pulses/liter) Flow meter pulses-per-liter on the input pin
#define FLOWMETER_INTERVAL 1000 // (ms) Flow rate calculation interval in milliseconds
#define FLOWMETER_SAFETY // Prevent running the laser without the minimum flow rate set below
#if ENABLED(FLOWMETER_SAFETY)
#define FLOWMETER_MIN_LITERS_PER_MINUTE 1.5 // (liters/min) Minimum flow required when enabled
#endif
#endif

/**
*热保护提供额外的保护您的打印机免受损害
*和火。马林总是包括安全的最小和最大温度范围
*防止损坏或断开的热敏电阻电线。
*问题:如果热敏电阻脱落,报告的温度会低得多
*房间内空气温度,固件将保持加热器开着。
*解决方案:一旦温度达到目标,开始观察。
*如果温度停留在远低于目标(滞后)太
*长时间(周期),固件将停止机器作为安全预防措施。
*如果你得到“热失控”的假阳性,增加THERMAL_PROTECTION_HYSTERESIS和/或THERMAL_PROTECTION_PERIOD
*/
#if ENABLED(THERMAL_PROTECTION_HOTENDS)
#define THERMAL_PROTECTION_PERIOD 40 // 秒
#define THERMAL_PROTECTION_HYSTERESIS 4 // 摄氏度

//#define ADAPTIVE_FAN_SLOWING // 如果温度下降,放慢部分冷却风扇转速
#if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP)
//#define NO_FAN_SLOWING_IN_PID_TUNING // 在M303期间不要降低风扇转速
#endif

/**
*当M104、M109或M303增加目标温度时,
*固件将等待WATCH_TEMP_PERIOD过期。如果温度
*没有增加WATCH_TEMP_INCREASE度,机器停止并且
*需要硬复位。此测试以任何M104/M109/M303重启,但仅限于此
*如果当前温度远低于目标温度就可靠测试。
*如果你得到错误的“加热失败”,增加WATCH_TEMP_PERIOD
和/或减少WATCH_TEMP_INCREASE。不应该设置WATCH_TEMP_INCREASE 在2以下。
*/
#define WATCH_TEMP_PERIOD 20 // 秒
#define WATCH_TEMP_INCREASE 2 // 摄氏度
#endif

/**
*热床的热防护参数与挤出机的相同。
*/
#if ENABLED(THERMAL_PROTECTION_BED)
#define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds
#define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius

/**

  • 如上文所述, 除了热床 (M140/M190/M303).
    */
    #define WATCH_BED_TEMP_PERIOD 60 // Seconds
    #define WATCH_BED_TEMP_INCREASE 2 // Degrees Celsius
    #endif

/**
*加热腔室室的热保护参数
*/
#if ENABLED(THERMAL_PROTECTION_CHAMBER)
#define THERMAL_PROTECTION_CHAMBER_PERIOD 20 // Seconds
#define THERMAL_PROTECTION_CHAMBER_HYSTERESIS 2 // Degrees Celsius

/**

  • 加热腔室加热设置 (M141/M191).
    */
    #define WATCH_CHAMBER_TEMP_PERIOD 60 // Seconds
    #define WATCH_CHAMBER_TEMP_INCREASE 2 // Degrees Celsius
    #endif

/**

  • 激光冷却器热保护参数。
    */
    #if ENABLED(THERMAL_PROTECTION_COOLER)
    #define THERMAL_PROTECTION_COOLER_PERIOD 10 // Seconds
    #define THERMAL_PROTECTION_COOLER_HYSTERESIS 3 // Degrees Celsius

/**

  • 激光冷却器监控设置 (M143/M193).
    */
    #define WATCH_COOLER_TEMP_PERIOD 60 // Seconds
    #define WATCH_COOLER_TEMP_INCREASE 3 // Degrees Celsius
    #endif

#if ENABLED(PIDTEMP)
// 在加热器功率上增加一个实验附加项,与挤出速度成正比.
//一个精心选择的Kc值应该添加足够的能量来融化增加的材料体积.
//#define PID_EXTRUSION_SCALING
#if ENABLED(PID_EXTRUSION_SCALING)
#define DEFAULT_Kc (100) // heating power = Kc * e_speed
#define LPQ_MAX_LEN 50
#endif

/**
*在加热器功率上增加一个实验附加项,与风扇转速成正比。
*一个精心选择的Kf值应该添加足够的功率,以补偿从冷却风扇的功率损失。
*你可以只是添加一个常量补偿与DEFAULT_Kf值
*或按照下面的说明来获得与速度相关的补偿。
*恒定补偿(仅在风扇转速为0%和100%时使用)


*kf值的一个很好的起点来自以下计算:

  • kf = (power_fan * eff_fan) / power_heater * 255
  • where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
  • Example:
  • Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
  • Kf = (2.4W * 0.8) / 40W * 255 = 12.24
  • Fan-speed dependent compensation

    1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
  • Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
  • If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
  • drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
    1. Note the Kf-value for fan-speed at 100%
    1. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
    1. Repeat step 1. and 2. for this fan speed.
    1. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
  • PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
    */
    //#define PID_FAN_SCALING
    #if ENABLED(PID_FAN_SCALING)
    //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
    #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
    //另一种定义用于更简单的配置。
    // 只需计算全速(255)的Kf和PID_FAN_SCALING_MIN_SPEED。
    //DEFAULT_Kf和PID_FAN_SCALING_LIN_FACTOR相应计算。
  #define PID_FAN_SCALING_AT_FULL_SPEED 13.0        //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
  #define PID_FAN_SCALING_AT_MIN_SPEED   6.0        //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
  #define PID_FAN_SCALING_MIN_SPEED     10.0        // Minimum fan speed at which to enable PID_FAN_SCALING

  #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
  #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0

#else
  #define PID_FAN_SCALING_LIN_FACTOR (0)             // Power loss due to cooling = Kf * (fan_speed)
  #define DEFAULT_Kf 10                              // A constant value added to the PID-tuner
  #define PID_FAN_SCALING_MIN_SPEED 10               // Minimum fan speed at which to enable PID_FAN_SCALING
#endif

#endif
#endif

/**

  • 自动温度模式
  • 根据规划的E步动态调整hotend目标温度。
  • (与PID_EXTRUSION_SCALING相反,PID_EXTRUSION_SCALING跟踪E的移动,调整PID
    *行为使用额外的kC值。)
  • Autotemp由(mintemp + factor * mm_per_sec)计算,上限为maxtemp。

*使能M104/M109 FS< mintemp>B< maxtemp>。
*通过发送不带F参数的M104/M109(或带有autotemp_proportion的F0)来禁用。
*/
#define AUTOTEMP
#if ENABLED(AUTOTEMP)
#define AUTOTEMP_OLDWEIGHT 0.98
// Turn on AUTOTEMP on M104/M109 by default using proportions set here
//#define AUTOTEMP_PROPORTIONAL
#if ENABLED(AUTOTEMP_PROPORTIONAL)
#define AUTOTEMP_MIN_P 0 // (°C) Added to the target temperature
#define AUTOTEMP_MAX_P 5 // (°C) Added to the target temperature
#define AUTOTEMP_FACTOR_P 1 // Apply this F parameter by default (overridden by M104/M109 F)
#endif
#endif

// 显示温度ADC值
// 使能M105包括从温度传感器读取的ADC值.
//#define SHOW_TEMP_ADC_VALUES

/**
*高温热敏电阻支持

*能够支持高温的热敏电阻往往很难获得在室温和较低温度下读数良好。这意味着TEMP_SENSOR_X_RAW_LO_TEMP可能在加热元件第一次打开时被捕捉预热过程,这将触发一个min_temp_error作为安全措施和强迫停止一切。
*为了绕过这个限制,我们允许一个预热时间(在此期间,min_temp_error不会被触发),并添加一个min_temp缓冲区来处理
异常读数。
*如果您想为您的热敏电阻启用此功能(s)
*取消注释并在下面的常量中设置> 0值
*/

//可能发生的连续低温误差的次数
// 在触发min_temp_error之前。(不应该超过10个。)
//#define MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED 0

// hotend在开始检查前预热的毫秒数
/ /温度。此值不应设置为它所花费的时间
//热端达到目标温度,但达到所需的时间
//热敏电阻可以读取的最低温度。越低越好/更安全。
//不需要超过30秒(30000)
//#define MILLISECONDS_PREHEAT_TIME 0

// @section extruder

//防止挤出机跳动。
//如果机器是空闲的,温度超过MINTEMP
//然后每隔几秒钟挤出一些灯丝。
//#define EXTRUDER_RUNOUT_PREVENT
#if ENABLED(EXTRUDER_RUNOUT_PREVENT)
#define EXTRUDER_RUNOUT_MINTEMP 190
#define EXTRUDER_RUNOUT_SECONDS 30
#define EXTRUDER_RUNOUT_SPEED 1500 // (mm/min)
#define EXTRUDER_RUNOUT_EXTRUDE 5 // (mm)
#endif

/**
*加热空闲超时
*防止喷嘴内耗材烧焦,造成严重堵塞。
/
//#define HOTEND_IDLE_TIMEOUT
#if ENABLED(HOTEND_IDLE_TIMEOUT)
#define HOTEND_IDLE_TIMEOUT_SEC (5
60) // (seconds) Time without extruder movement to trigger protection
#define HOTEND_IDLE_MIN_TRIGGER 180 // (°C) Minimum temperature to enable hotend protection
#define HOTEND_IDLE_NOZZLE_TARGET 0 // (°C) Safe temperature for the nozzle after timeout
#define HOTEND_IDLE_BED_TARGET 0 // (°C) Safe temperature for the bed after timeout
#endif

// @section temperature

// 校正AD595 / AD8495传感器以调整温度测量.
// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
#define TEMP_SENSOR_AD595_OFFSET 0.0
#define TEMP_SENSOR_AD595_GAIN 1.0
#define TEMP_SENSOR_AD8495_OFFSET 0.0
#define TEMP_SENSOR_AD8495_GAIN 1.0

/**
*控制器风扇
*冷却步进驱动器和mosfet。
*风扇自动打开,任何驱动器是启用和转动
*在驱动器关闭后不久关闭(或降低到空闲速度)。
*/
//#define USE_CONTROLLER_FAN
#if ENABLED(USE_CONTROLLER_FAN)
//#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan
//#define CONTROLLER_FAN_USE_Z_ONLY // With this option only the Z axis is considered
//#define CONTROLLER_FAN_IGNORE_Z // Ignore Z stepper. Useful when stepper timeout is disabled.
#define CONTROLLERFAN_SPEED_MIN 0 // (0-255) Minimum speed. (If set below this value the fan is turned off.)
#define CONTROLLERFAN_SPEED_ACTIVE 255 // (0-255) Active speed, used when any motor is enabled
#define CONTROLLERFAN_SPEED_IDLE 0 // (0-255) Idle speed, used when motors are disabled
#define CONTROLLERFAN_IDLE_TIME 60 // (seconds) Extra time to keep the fan running after disabling motors
//#define CONTROLLER_FAN_EDITABLE // Enable M710 configurable settings
#if ENABLED(CONTROLLER_FAN_EDITABLE)
#define CONTROLLER_FAN_MENU // Enable the Controller Fan submenu
#endif
#endif

//第一次启动主风扇时,全速运行为
//给定的毫秒数。这使风扇可靠地旋转
//在设置PWM值之前。(不与软件PWM对Sanguinololu风扇工作)
//#define FAN_KICKSTART_TIME 100

// 一些冷却器可能需要非零“关闭”状态。
//#define FAN_OFF_PWM 1

/**

  • PWM风扇缩放

    *定义PWM风扇的最小/最大速度(与M106设置)。

    *使用这些选项,M106 0-255的值范围被缩放到一个子集确保风扇有足够的功率旋转,或运行较低电流风扇较高的电流。(例如,5V/12V风扇与12V/24V)值为0总是关闭风扇。

    *定义一个或两个覆盖默认的0-255范围。
    */
    //#define FAN_MIN_PWM 50
    //#define FAN_MAX_PWM 128

/**
*快速PWM风扇设置
*
*用于改变FAST FAN PWM频率(如果在Configuration.h中启用)
*组合的PWM模式,预分频值和TOP分辨率是用来产生内部
*频率尽可能接近所需的频率。
*

  • FAST_PWM_FAN_FREQUENCY [undefined by default]
    设置为你想要的频率。
    如果未定义,默认F = F_CPU/(2
    255*1)
    *即,在16MHz微控制器上F = 31.4kHz或在20MHz微控制器上F = 39.2kHz。
    *这些默认值与旧的FAST_PWM_FAN实现相同——不需要迁移
  • NOTE: 设置很低的频率(<10hz)可能会导致意外的计时器行为。
  • USE_OCR2A_AS_TOP [undefined by default]
  • Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
  • 16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
  • 20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
  • A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
  • PWM on pin OC2A. Only use this option if you don’t need PWM on 0C2A. (Check your schematic.)
  • USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
    */
    #if ENABLED(FAST_PWM_FAN)
    //#define FAST_PWM_FAN_FREQUENCY 31400
    //#define USE_OCR2A_AS_TOP
    #endif

/**

  • 使用一个PWM风扇作为冗余部分冷却风扇
    */
    //#define REDUNDANT_PART_COOLING_FAN 2 // Index of the fan to sync with FAN 0.

// @section extruder

/**

  • 挤出机冷却风扇

*挤出机自动风扇自动打开时,其挤出机
*温度超过EXTRUDER_AUTO_FAN_TEMPERATURE。
*
*你的板的引脚文件指定推荐的引脚。覆盖那些在这里
*或设置为-1完全禁用。
*
*/
#define E0_AUTO_FAN_PIN -1
#define E1_AUTO_FAN_PIN -1
#define E2_AUTO_FAN_PIN -1
#define E3_AUTO_FAN_PIN -1
#define E4_AUTO_FAN_PIN -1
#define E5_AUTO_FAN_PIN -1
#define E6_AUTO_FAN_PIN -1
#define E7_AUTO_FAN_PIN -1
#define CHAMBER_AUTO_FAN_PIN -1
#define COOLER_AUTO_FAN_PIN -1
#define COOLER_FAN_PIN -1

#define EXTRUDER_AUTO_FAN_TEMPERATURE 50
#define EXTRUDER_AUTO_FAN_SPEED 255 // 255 == full speed
#define CHAMBER_AUTO_FAN_TEMPERATURE 30
#define CHAMBER_AUTO_FAN_SPEED 255
#define COOLER_AUTO_FAN_TEMPERATURE 18
#define COOLER_AUTO_FAN_SPEED 255

/**
*部分冷却风扇复用器
*
*此功能允许您数字多路输出的风扇。
多路复用器在更换工具时自动切换。
*设置下面的FANMUX[012] _pin,最多2、4或8个多路复用风扇。
*/
#define FANMUX0_PIN -1
#define FANMUX1_PIN -1
#define FANMUX2_PIN -1

/**

  • M355 灯 开关/亮度控制
    */
    //#define CASE_LIGHT_ENABLE
    #if ENABLED(CASE_LIGHT_ENABLE)
    //#define CASE_LIGHT_PIN 4 // Override the default pin if needed
    #define INVERT_CASE_LIGHT false // Set true if Case Light is ON when pin is LOW
    #define CASE_LIGHT_DEFAULT_ON true // Set default power-up state on
    #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // Set default power-up brightness (0-255, requires PWM pin)
    //#define CASE_LIGHT_NO_BRIGHTNESS // Disable brightness control. Enable for non-PWM lighting.
    //#define CASE_LIGHT_MAX_PWM 128 // Limit PWM duty cycle (0-255)
    //#define CASE_LIGHT_MENU // Add Case Light options to the LCD menu
    #if ENABLED(NEOPIXEL_LED)
    //#define CASE_LIGHT_USE_NEOPIXEL // Use NeoPixel LED as case light
    #endif
    #if EITHER(RGB_LED, RGBW_LED)
    //#define CASE_LIGHT_USE_RGB_LED // Use RGB / RGBW LED as case light
    #endif
    #if EITHER(CASE_LIGHT_USE_NEOPIXEL, CASE_LIGHT_USE_RGB_LED)
    #define CASE_LIGHT_DEFAULT_COLOR { 255, 255, 255, 255 } // { Red, Green, Blue, White }
    #endif
    #endif

// @section homing

//如果你想让endstops保持在on状态(默认情况下),即使不归零
//启用此选项。随时使用M120, M121。
//#define ENDSTOPS_ALWAYS_ON_DEFAULT

// @section extras

//#define Z_LATE_ENABLE // 关键时刻使能Z电机。如果你的Z轴驱动过热需要这项。

//采用外闭环控制器。如果需要,可以覆盖这里的引脚。
//#define EXTERNAL_CLOSED_LOOP_CONTROLLER
#if ENABLED(EXTERNAL_CLOSED_LOOP_CONTROLLER)
//#define CLOSED_LOOP_ENABLE_PIN -1
//#define CLOSED_LOOP_MOVE_COMPLETE_PIN -1
#endif

/**

*这个部分将允许您使用额外的E驱动器来驱动X、Y或Z轴的第二个电机。
*
*例如,设置X_DUAL_STEPPER_DRIVERS设置为使用第二个电机。如果电机需要
反向旋转设置INVERT_X2_VS_X_DIR。如果第二个电机需要自己的限位开关
*设置X_DUAL_ENDSTOPS。这可以调整为“货架”。使用X2_USE_ENDSTOP设置结束插件
*用于第二个限位。额外的限位将出现在’M119’的输出中。
*
*使用X_DUAL_ENDSTOP_ADJUSTMENT来调整机械缺陷。电机归零后,两个电机机
*此偏移量应用于X2电机。在X轴上找到偏移量,并测量误差
*在X2。双限位开关偏移量可以在运行时使用’M666 XY< offset>Z< offset> '。
*/

//#define X_DUAL_STEPPER_DRIVERS
#if ENABLED(X_DUAL_STEPPER_DRIVERS)
//#define INVERT_X2_VS_X_DIR //如果X2方向信号与X方向相反,则启用
//#define X_DUAL_ENDSTOPS
#if ENABLED(X_DUAL_ENDSTOPS)
#define X2_USE_ENDSTOP XMAX
#define X2_ENDSTOP_ADJUSTMENT 0
#endif
#endif

//#define Y_DUAL_STEPPER_DRIVERS
#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
//#define INVERT_Y2_VS_Y_DIR // 若Y2方向信号与Y方向信号相反则开启
//#define Y_DUAL_ENDSTOPS
#if ENABLED(Y_DUAL_ENDSTOPS)
#define Y2_USE_ENDSTOP YMAX
#define Y2_ENDSTOP_ADJUSTMENT 0
#endif
#endif

//
// 对于Z,设置步进驱动器的数量
//
#define NUM_Z_STEPPER_DRIVERS 1 // (1-4) Z选项的变化取决于数量

#if NUM_Z_STEPPER_DRIVERS > 1
// Enable if Z motor direction signals are the opposite of Z1
//#define INVERT_Z2_VS_Z_DIR
//#define INVERT_Z3_VS_Z_DIR
//#define INVERT_Z4_VS_Z_DIR

//#define Z_MULTI_ENDSTOPS
#if ENABLED(Z_MULTI_ENDSTOPS)
#define Z2_USE_ENDSTOP XMAX
#define Z2_ENDSTOP_ADJUSTMENT 0
#if NUM_Z_STEPPER_DRIVERS >= 3
#define Z3_USE_ENDSTOP YMAX
#define Z3_ENDSTOP_ADJUSTMENT 0
#endif
#if NUM_Z_STEPPER_DRIVERS >= 4
#define Z4_USE_ENDSTOP ZMAX
#define Z4_ENDSTOP_ADJUSTMENT 0
#endif
#endif
#endif

// Drive the E axis with two synchronized steppers
//#define E_DUAL_STEPPER_DRIVERS
#if ENABLED(E_DUAL_STEPPER_DRIVERS)
//#define INVERT_E1_VS_E0_DIR // Enable if the E motors need opposite DIR states
#endif

/**

  • 双 X 挤出打印

*这个装置有两个X挤出机,可以独立移动,每一个都有自己的加热。
*挤出机可以用来打印物体的两种颜色或材料,或在
*“复制模式”,可以同时打印两个相同或x镜像的物体。
*非活动结构自动停放,以防止渗水。
X1是左栏,X2是右栏。他们在X轴的两端停下和归零。
*默认情况下X2步进电机被分配给单板上第一个未使用的E插头。
*
*以下双X挤出机模式可以选择与M605 S:

  • 0:(FULL_CONTROL)切片机对x -carriage均有完全控制,可实现最佳行程
    *结果,只要它支持双x -挤出机。(M605 S0)

  • 1:(AUTO_PARK)固件会自动停停工具上的x -carriage
    *不需要额外的切片机支持。(M605 S1)

  • 2:(复制)固件移动第二个x -挤出机和挤出机同步
    *第一个x架和挤出机,可同时打印2份同一物体。
    *用M605 S2 X[off] R[deg]和
    *使用M605 S2启动重复移动。

  • 3:(镜像)Formbot/ viveno启发镜像模式,其中第二个挤出机复制
    *除第二个挤出机外的第一个挤出机在X轴上的运动是反向的。
    *用M605 S2 X[off] R[deg]和
    *使用M605 S3启动镜像移动。
    */
    //#define DUAL_X_CARRIAGE
    #if ENABLED(DUAL_X_CARRIAGE)
    #define X1_MIN_POS X_MIN_POS // Set to X_MIN_POS
    #define X1_MAX_POS X_BED_SIZE // Set a maximum so the first X-carriage can’t hit the parked second X-carriage
    #define X2_MIN_POS 80 // Set a minimum to ensure the second X-carriage can’t hit the parked first X-carriage
    #define X2_MAX_POS 353 // Set this to the distance between toolheads when both heads are homed
    #define X2_HOME_DIR 1 // Set to 1. The second X-carriage always homes to the maximum endstop position
    #define X2_HOME_POS X2_MAX_POS // Default X2 home position. Set to X2_MAX_POS.
    // However: In this mode the HOTEND_OFFSET_X value for the second extruder provides a software
    // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
    // without modifying the firmware (through the “M218 T1 X???” command).
    // Remember: you should set the second extruder x-offset to 0 in your slicer.

    // This is the default power-up mode which can be later using M605.
    #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE

    // Default x offset in duplication mode (typically set to half print bed width)
    #define DEFAULT_DUPLICATION_X_OFFSET 100

    // Default action to execute following M605 mode change commands. Typically G28X to apply new mode.
    //#define EVENT_GCODE_IDEX_AFTER_MODECHANGE “G28X”
    #endif

//用M380在活动的挤出机上激活电磁阀。禁用所有M381。
//每个有电磁阀的挤出机 都能定义SOL0_PIN, SOL1_PIN等。
//#define EXT_SOLENOID

// @section homing

/**
*复位归零过程
*复位归零(G28)不确定地走向限位开关
相对于工作空间的工具头位置。
*/

//#define SENSORLESS_BACKOFF_MM { 2, 2, 0 } // (mm) Backoff from endstops before sensorless homing

#define HOMING_BUMP_MM { 5, 5, 2 } // (mm) Backoff from endstops after first bump
#define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate)

//#define HOMING_BACKOFF_POST_MM { 2, 2, 2 } // (mm) Backoff from endstops after homing

//#define QUICK_HOME // If G28 contains XY do a diagonal move first
//#define HOME_Y_BEFORE_X // If G28 contains XY home Y before X
//#define HOME_Z_FIRST // Home Z first. Requires a Z-MIN endstop (not a probe).
//#define CODEPENDENT_XY_HOMING // If X/Y can’t home without homing Y/X first

// @section bltouch

#if ENABLED(BLTOUCH)
/**
*要么:使用默认值(推荐),要么:对于特殊目的,使用以下定义
*不要激活探针可能无法理解的设置。克隆可能会误解
*先进的命令。
*
*注:如果探针不部署,做“重置”和“自我测试”,然后检查
*棕、红、橙线接线。
*
*注意:如果你的探针的触发信号没有被识别,它已经很常见了
因为黑白线需要交换。它们不是“可互换的”
*就像真的开关一样。所以请先检查一下线路。
*
*设置所有BLTouch和克隆探针:
*/

// Safety: The probe needs time to recognize the command.
// Minimum command delay (ms). Enable and increase if needed.
//#define BLTOUCH_DELAY 500

/**

  • Settings for BLTOUCH Classic 1.2, 1.3 or BLTouch Smart 1.0, 2.0, 2.2, 3.0, 3.1, and most clones:
    */

// Feature: Switch into SW mode after a deploy. It makes the output pulse longer. Can be useful
// in special cases, like noisy or filtered input configurations.
//#define BLTOUCH_FORCE_SW_MODE

/**

  • Settings for BLTouch Smart 3.0 and 3.1
  • Summary:
    • Voltage modes: 5V and OD (open drain - “logic voltage free”) output modes
    • High-Speed mode
    • Disable LCD voltage options
      */

/**

  • Danger: Don’t activate 5V mode unless attached to a 5V-tolerant controller!
  • V3.0 or 3.1: Set default mode to 5V mode at Marlin startup.
  • If disabled, OD mode is the hard-coded default on 3.0
  • On startup, Marlin will compare its eeprom to this value. If the selected mode
  • differs, a mode set eeprom write will be completed at initialization.
  • Use the option below to force an eeprom write to a V3.1 probe regardless.
    */
    //#define BLTOUCH_SET_5V_MODE

/**

  • Safety: Activate if connecting a probe with an unknown voltage mode.
  • V3.0: Set a probe into mode selected above at Marlin startup. Required for 5V mode on 3.0
  • V3.1: Force a probe with unknown mode into selected mode at Marlin startup ( = Probe EEPROM write )
  • To preserve the life of the probe, use this once then turn it off and re-flash.
    */
    //#define BLTOUCH_FORCE_MODE_SET

/**

  • Use “HIGH SPEED” mode for probing.
  • Danger: Disable if your probe sometimes fails. Only suitable for stable well-adjusted systems.
  • This feature was designed for Deltabots with very fast Z moves; however, higher speed Cartesians
  • might be able to use it. If the machine can’t raise Z fast enough the BLTouch may go into ALARM.
    */
    //#define BLTOUCH_HS_MODE

// Safety: Enable voltage mode settings in the LCD menu.
//#define BLTOUCH_LCD_VOLTAGE_MENU

#endif // BLTOUCH

// @section extras

/**

  • Z Steppers Auto-Alignment
  • Add the G34 command to align multiple Z steppers using a bed probe.
    */
    //#define Z_STEPPER_AUTO_ALIGN
    #if ENABLED(Z_STEPPER_AUTO_ALIGN)
    // Define probe X and Y positions for Z1, Z2 [, Z3 [, Z4]]
    // If not defined, probe limits will be used.
    // Override with ‘M422 S X Y’
    //#define Z_STEPPER_ALIGN_XY { { 10, 190 }, { 100, 10 }, { 190, 190 } }

/**

  • Orientation for the automatically-calculated probe positions.
  • Override Z stepper align points with ‘M422 S X Y’
  • 2 Steppers: (0) (1)
  •           |       |   2   |
    
  •           | 1   2 |       |
    
  •           |       |   1   |
    
  • 3 Steppers: (0) (1) (2) (3)
  •           |   3   | 1     | 2   1 |     2 |
    
  •           |       |     3 |       | 3     |
    
  •           | 1   2 | 2     |   3   |     1 |
    
  • 4 Steppers: (0) (1) (2) (3)
  •           | 4   3 | 1   4 | 2   1 | 3   2 |
    
  •           |       |       |       |       |
    
  •           | 1   2 | 2   3 | 3   4 | 4   1 |
    

*/
#ifndef Z_STEPPER_ALIGN_XY
//#define Z_STEPPERS_ORIENTATION 0
#endif

// Provide Z stepper positions for more rapid convergence in bed alignment.
// Requires triple stepper drivers (i.e., set NUM_Z_STEPPER_DRIVERS to 3)
//#define Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS
#if ENABLED(Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS)
// Define Stepper XY positions for Z1, Z2, Z3 corresponding to
// the Z screw positions in the bed carriage.
// Define one position per Z stepper in stepper driver order.
#define Z_STEPPER_ALIGN_STEPPER_XY { { 210.7, 102.5 }, { 152.6, 220.0 }, { 94.5, 102.5 } }
#else
// Amplification factor. Used to scale the correction step up or down in case
// the stepper (spindle) position is farther out than the test point.
#define Z_STEPPER_ALIGN_AMP 1.0 // Use a value > 1.0 NOTE: This may cause instability!
#endif

// On a 300mm bed a 5% grade would give a misalignment of ~1.5cm
#define G34_MAX_GRADE 5 // (%) Maximum incline that G34 will handle
#define Z_STEPPER_ALIGN_ITERATIONS 5 // Number of iterations to apply during alignment
#define Z_STEPPER_ALIGN_ACC 0.02 // Stop iterating early if the accuracy is better than this
#define RESTORE_LEVELING_AFTER_G34 // Restore leveling after G34 is done?
// After G34, re-home Z (G28 Z) or just calculate it from the last probe heights?
// Re-homing might be more precise in reproducing the actual ‘G28 Z’ homing height, especially on an uneven bed.
#define HOME_AFTER_G34
#endif

//
// 添加G35命令来读取热床角落以帮助调整螺丝。需要床探针
//
//#define ASSISTED_TRAMMING
#if ENABLED(ASSISTED_TRAMMING)

// Define positions for probe points.
#define TRAMMING_POINT_XY { { 20, 20 }, { 180, 20 }, { 180, 180 }, { 20, 180 } }

// Define position names for probe points.
#define TRAMMING_POINT_NAME_1 “Front-Left”
#define TRAMMING_POINT_NAME_2 “Front-Right”
#define TRAMMING_POINT_NAME_3 “Back-Right”
#define TRAMMING_POINT_NAME_4 “Back-Left”

#define RESTORE_LEVELING_AFTER_G35 // Enable to restore leveling setup after operation
//#define REPORT_TRAMMING_MM // Report Z deviation (mm) for each point relative to the first

//#define ASSISTED_TRAMMING_WIZARD // Add a Tramming Wizard to the LCD menu

//#define ASSISTED_TRAMMING_WAIT_POSITION { X_CENTER, Y_CENTER, 30 } // Move the nozzle out of the way for adjustment

/**

  • Screw thread:
  • M3: 30 = Clockwise, 31 = Counter-Clockwise
  • M4: 40 = Clockwise, 41 = Counter-Clockwise
  • M5: 50 = Clockwise, 51 = Counter-Clockwise
    */
    #define TRAMMING_SCREW_THREAD 30

#endif

// @section motion

#define AXIS_RELATIVE_MODES { false, false, false, false }

// 添加Duplicate选项去分离连体喷嘴
//#define MULTI_NOZZLE_DUPLICATION

// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step.
#define INVERT_X_STEP_PIN false
#define INVERT_Y_STEP_PIN false
#define INVERT_Z_STEP_PIN false
#define INVERT_I_STEP_PIN false
#define INVERT_J_STEP_PIN false
#define INVERT_K_STEP_PIN false
#define INVERT_E_STEP_PIN false

/**

  • Idle Stepper Shutdown
  • Set DISABLE_INACTIVE_? ‘true’ to shut down axis steppers after an idle period.
  • The Deactive Time can be overridden with M18 and M84. Set to 0 for No Timeout.
    */
    #define DEFAULT_STEPPER_DEACTIVE_TIME 120
    #define DISABLE_INACTIVE_X true
    #define DISABLE_INACTIVE_Y true
    #define DISABLE_INACTIVE_Z true // Set ‘false’ if the nozzle could fall onto your printed part!
    #define DISABLE_INACTIVE_I true
    #define DISABLE_INACTIVE_J true
    #define DISABLE_INACTIVE_K true
    #define DISABLE_INACTIVE_E true

// Default Minimum Feedrates for printing and travel moves
#define DEFAULT_MINIMUMFEEDRATE 0.0 // (mm/s) Minimum feedrate. Set with M205 S.
#define DEFAULT_MINTRAVELFEEDRATE 0.0 // (mm/s) Minimum travel feedrate. Set with M205 T.

// Minimum time that a segment needs to take as the buffer gets emptied
#define DEFAULT_MINSEGMENTTIME 20000 // (µs) Set with M205 B.

// Slow down the machine if the lookahead buffer is (by default) half full.
// Increase the slowdown divisor for larger buffer sizes.
#define SLOWDOWN
#if ENABLED(SLOWDOWN)
#define SLOWDOWN_DIVISOR 2
#endif

/**

  • XY Frequency limit
  • Reduce resonance by limiting the frequency of small zigzag infill moves.
  • See https://hydraraptor.blogspot.com/2010/12/frequency-limit.html
  • Use M201 F G to change limits at runtime.
    */
    //#define XY_FREQUENCY_LIMIT 10 // (Hz) Maximum frequency of small zigzag infill moves. Set with M201 F.
    #ifdef XY_FREQUENCY_LIMIT
    #define XY_FREQUENCY_MIN_PERCENT 5 // (percent) Minimum FR percentage to apply. Set with M201 G.
    #endif

// Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end
// of the buffer and all stops. This should not be much greater than zero and should only be changed
// if unwanted behavior is observed on a user’s machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED 0.05 // (mm/s)

//
// Backlash Compensation
// Adds extra movement to axes on direction-changes to account for backlash.
//
//#define BACKLASH_COMPENSATION
#if ENABLED(BACKLASH_COMPENSATION)
// Define values for backlash distance and correction.
// If BACKLASH_GCODE is enabled these values are the defaults.
#define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm) One value for each linear axis
#define BACKLASH_CORRECTION 0.0 // 0.0 = no correction; 1.0 = full correction

// Add steps for motor direction changes on CORE kinematics
//#define CORE_BACKLASH

// Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
// to reduce print artifacts. (Enabling this is costly in memory and computation!)
//#define BACKLASH_SMOOTHING_MM 3 // (mm)

// Add runtime configuration and tuning of backlash values (M425)
//#define BACKLASH_GCODE

#if ENABLED(BACKLASH_GCODE)
// Measure the Z backlash when probing (G29) and set with “M425 Z”
#define MEASURE_BACKLASH_WHEN_PROBING

#if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
  // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
  // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
  // increments while checking for the contact to be broken.
  #define BACKLASH_MEASUREMENT_LIMIT       0.5   // (mm)
  #define BACKLASH_MEASUREMENT_RESOLUTION  0.005 // (mm)
  #define BACKLASH_MEASUREMENT_FEEDRATE    Z_PROBE_FEEDRATE_SLOW // (mm/min)
#endif

#endif
#endif

/**
*自动侧隙,定位和hotend偏移校准
*
*使G425运行自动校准使用电-
*导电立方体,螺栓,或垫圈安装在床上。
*

  • G425使用探头触摸校准对象的顶部和侧面
    *在床上测量和/或纠正位置偏移、轴隙和hotend抵消。

*注:HOTEND_OFFSET和CALIBRATION_OBJECT_CENTER必须设置为within
G425成功的真值±5mm。
*/
//#define CALIBRATION_GCODE
#if ENABLED(CALIBRATION_GCODE)

//#define CALIBRATION_SCRIPT_PRE “M117 Starting Auto-Calibration\nT0\nG28\nG12\nM117 Calibrating…”
//#define CALIBRATION_SCRIPT_POST “M500\nM117 Calibration data saved”

#define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm

#define CALIBRATION_FEEDRATE_SLOW 60 // mm/min
#define CALIBRATION_FEEDRATE_FAST 1200 // mm/min
#define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/min

// The following parameters refer to the conical section of the nozzle tip.
#define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
#define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm

// Uncomment to enable reporting (required for “G425 V”, but consumes PROGMEM).
//#define CALIBRATION_REPORTING

// The true location and dimension the cube/bolt/washer on the bed.
#define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0 } // mm
#define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0 } // mm

// Comment out any sides which are unreachable by the probe. For best
// auto-calibration results, all sides must be reachable.
#define CALIBRATION_MEASURE_RIGHT
#define CALIBRATION_MEASURE_FRONT
#define CALIBRATION_MEASURE_LEFT
#define CALIBRATION_MEASURE_BACK

//#define CALIBRATION_MEASURE_IMIN
//#define CALIBRATION_MEASURE_IMAX
//#define CALIBRATION_MEASURE_JMIN
//#define CALIBRATION_MEASURE_JMAX
//#define CALIBRATION_MEASURE_KMIN
//#define CALIBRATION_MEASURE_KMAX

// Probing at the exact top center only works if the center is flat. If
// probing on a screwhead or hollow washer, probe near the edges.
//#define CALIBRATION_MEASURE_AT_TOP_EDGES

// Define the pin to read during calibration
#ifndef CALIBRATION_PIN
//#define CALIBRATION_PIN -1 // Define here to override the default pin
#define CALIBRATION_PIN_INVERTING false // Set to true to invert the custom pin
//#define CALIBRATION_PIN_PULLDOWN
#define CALIBRATION_PIN_PULLUP
#endif
#endif

/**
*自适应步进平滑增加多轴移动的分辨率,特别是在步进频率
*低于1kHz (AVR)或10kHz (ARM),其中轴之间的混叠在多轴移动引起听觉
*振动和表面工件。该算法能够提供最优的步长平滑
*最低步进频率。
*/
//#define ADAPTIVE_STEP_SMOOTHING

/**

  • Custom Microstepping
  • Override as-needed for your setup. Up to 3 MS pins are supported.
    */
    //#define MICROSTEP1 LOW,LOW,LOW
    //#define MICROSTEP2 HIGH,LOW,LOW
    //#define MICROSTEP4 LOW,HIGH,LOW
    //#define MICROSTEP8 HIGH,HIGH,LOW
    //#define MICROSTEP16 LOW,LOW,HIGH
    //#define MICROSTEP32 HIGH,LOW,HIGH

// Microstep settings (Requires a board with pins named X_MS1, X_MS2, etc.)
#define MICROSTEP_MODES { 16, 16, 16, 16, 16, 16 } // [1,2,4,8,16]

/**

  • @section stepper motor current
  • Some boards have a means of setting the stepper motor current via firmware.
  • The power on motor currents are set by:
  • PWM_MOTOR_CURRENT - used by MINIRAMBO & ULTIMAIN_2
  •                     known compatible chips: A4982
    
  • DIGIPOT_MOTOR_CURRENT - used by BQ_ZUM_MEGA_3D, RAMBO & SCOOVO_X9H
  •                     known compatible chips: AD5206
    
  • DAC_MOTOR_CURRENT_DEFAULT - used by PRINTRBOARD_REVF & RIGIDBOARD_V2
  •                     known compatible chips: MCP4728
    
  • DIGIPOT_I2C_MOTOR_CURRENTS - used by 5DPRINT, AZTEEG_X3_PRO, AZTEEG_X5_MINI_WIFI, MIGHTYBOARD_REVE
  •                     known compatible chips: MCP4451, MCP4018
    
  • Motor currents can also be set by M907 - M910 and by the LCD.
  • M907 - applies to all.
  • M908 - BQ_ZUM_MEGA_3D, RAMBO, PRINTRBOARD_REVF, RIGIDBOARD_V2 & SCOOVO_X9H
  • M909, M910 & LCD - only PRINTRBOARD_REVF & RIGIDBOARD_V2
    */
    //#define PWM_MOTOR_CURRENT { 1300, 1300, 1250 } // Values in milliamps
    //#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 } // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
    //#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 } // Default drive percent - X, Y, Z, E axis

/**

  • I2C-based DIGIPOTs (e.g., Azteeg X3 Pro)
    */
    //#define DIGIPOT_MCP4018 // Requires https://github.com/felias-fogg/SlowSoftI2CMaster
    //#define DIGIPOT_MCP4451
    #if EITHER(DIGIPOT_MCP4018, DIGIPOT_MCP4451)
    #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT:4 AZTEEG_X3_PRO:8 MKS_SBASE:5 MIGHTYBOARD_REVE:5

// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
// These correspond to the physical drivers, so be mindful if the order is changed.
#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO

//#define DIGIPOT_USE_RAW_VALUES // Use DIGIPOT_MOTOR_CURRENT raw wiper values (instead of A4988 motor currents)

/**

  • Common slave addresses:
  •                    A   (A shifted)   B   (B shifted)  IC
    
  • Smoothie 0x2C (0x58) 0x2D (0x5A) MCP4451
  • AZTEEG_X3_PRO 0x2C (0x58) 0x2E (0x5C) MCP4451
  • AZTEEG_X5_MINI 0x2C (0x58) 0x2E (0x5C) MCP4451
  • AZTEEG_X5_MINI_WIFI 0x58 0x5C MCP4451
  • MIGHTYBOARD_REVE 0x2F (0x5E) MCP4018
    */
    //#define DIGIPOT_I2C_ADDRESS_A 0x2C // Unshifted slave address for first DIGIPOT
    //#define DIGIPOT_I2C_ADDRESS_B 0x2D // Unshifted slave address for second DIGIPOT
    #endif

//===========================================================================
//=Additional Features=
//
=========================================================================

// @section lcd

#if EITHER(IS_ULTIPANEL, EXTENSIBLE_UI)
#define MANUAL_FEEDRATE { 5060, 5060, 460, 260 } // (mm/min) Feedrates for manual moves along X, Y, Z, E from panel
#define FINE_MANUAL_MOVE 0.025 // (mm) Smallest manual move (< 0.1mm) applying to Z on most machines
#if IS_ULTIPANEL
#define MANUAL_E_MOVES_RELATIVE // Display extruder move distance rather than “position”
#define ULTIPANEL_FEEDMULTIPLY // Encoder sets the feedrate multiplier on the Status Screen
#endif
#endif

// Change values more rapidly when the encoder is rotated faster
#define ENCODER_RATE_MULTIPLIER
#if ENABLED(ENCODER_RATE_MULTIPLIER)
#define ENCODER_10X_STEPS_PER_SEC 30 // (steps/s) Encoder rate for 10x speed
#define ENCODER_100X_STEPS_PER_SEC 80 // (steps/s) Encoder rate for 100x speed
#endif

// Play a beep when the feedrate is changed from the Status Screen
//#define BEEP_ON_FEEDRATE_CHANGE
#if ENABLED(BEEP_ON_FEEDRATE_CHANGE)
#define FEEDRATE_CHANGE_BEEP_DURATION 10
#define FEEDRATE_CHANGE_BEEP_FREQUENCY 440
#endif

#if HAS_LCD_MENU

// Add Probe Z Offset calibration to the Z Probe Offsets menu
#if HAS_BED_PROBE
//#define PROBE_OFFSET_WIZARD
#if ENABLED(PROBE_OFFSET_WIZARD)
//
// Enable to init the Probe Z-Offset when starting the Wizard.
// Use a height slightly above the estimated nozzle-to-probe Z offset.
// For example, with an offset of -5, consider a starting height of -4.
//
//#define PROBE_OFFSET_WIZARD_START_Z -4.0

  // Set a convenient position to do the calibration (probing point and nozzle/bed-distance)
  //#define PROBE_OFFSET_WIZARD_XY_POS { X_CENTER, Y_CENTER }
#endif

#endif

// Include a page of printer information in the LCD Main Menu
//#define LCD_INFO_MENU
#if ENABLED(LCD_INFO_MENU)
//#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages
#endif

// BACK menu items keep the highlight at the top
//#define TURBO_BACK_MENU_ITEM

// Add a mute option to the LCD menu
//#define SOUND_MENU_ITEM

/**

  • LED Control Menu
  • Add LED Control to the LCD menu
    */
    //#define LED_CONTROL_MENU
    #if ENABLED(LED_CONTROL_MENU)
    #define LED_COLOR_PRESETS // Enable the Preset Color menu option
    //#define NEO2_COLOR_PRESETS // Enable a second NeoPixel Preset Color menu option
    #if ENABLED(LED_COLOR_PRESETS)
    #define LED_USER_PRESET_RED 255 // User defined RED value
    #define LED_USER_PRESET_GREEN 128 // User defined GREEN value
    #define LED_USER_PRESET_BLUE 0 // User defined BLUE value
    #define LED_USER_PRESET_WHITE 255 // User defined WHITE value
    #define LED_USER_PRESET_BRIGHTNESS 255 // User defined intensity
    //#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup
    #endif
    #if ENABLED(NEO2_COLOR_PRESETS)
    #define NEO2_USER_PRESET_RED 255 // User defined RED value
    #define NEO2_USER_PRESET_GREEN 128 // User defined GREEN value
    #define NEO2_USER_PRESET_BLUE 0 // User defined BLUE value
    #define NEO2_USER_PRESET_WHITE 255 // User defined WHITE value
    #define NEO2_USER_PRESET_BRIGHTNESS 255 // User defined intensity
    //#define NEO2_USER_PRESET_STARTUP // Have the printer display the user preset color on startup for the second strip
    #endif
    #endif

// Insert a menu for preheating at the top level to allow for quick access
//#define PREHEAT_SHORTCUT_MENU_ITEM

#endif // HAS_LCD_MENU

#if HAS_DISPLAY
// The timeout (in ms) to return to the status screen from sub-menus
//#define LCD_TIMEOUT_TO_STATUS 15000

#if ENABLED(SHOW_BOOTSCREEN)
#define BOOTSCREEN_TIMEOUT 4000 // (ms) Total Duration to display the boot screen(s)
#if EITHER(HAS_MARLINUI_U8GLIB, TFT_COLOR_UI)
#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving lots of flash)
#endif
#endif

// Scroll a longer status message into view
//#define STATUS_MESSAGE_SCROLLING

// On the Info Screen, display XY with one decimal place when possible
//#define LCD_DECIMAL_SMALL_XY

// Add an ‘M73’ G-code to set the current percentage
//#define LCD_SET_PROGRESS_MANUALLY

// Show the E position (filament used) during printing
//#define LCD_SHOW_E_TOTAL
#endif

#if EITHER(SDSUPPORT, LCD_SET_PROGRESS_MANUALLY) && ANY(HAS_MARLINUI_U8GLIB, HAS_MARLINUI_HD44780, IS_TFTGLCD_PANEL, EXTENSIBLE_UI)
//#define SHOW_REMAINING_TIME // Display estimated time to completion
#if ENABLED(SHOW_REMAINING_TIME)
//#define USE_M73_REMAINING_TIME // Use remaining time from M73 command instead of estimation
//#define ROTATE_PROGRESS_DISPLAY // Display §rogress, (E)lapsed, and ®emaining time
#endif

#if EITHER(HAS_MARLINUI_U8GLIB, EXTENSIBLE_UI)
//#define PRINT_PROGRESS_SHOW_DECIMALS // Show progress with decimal digits
#endif

#if EITHER(HAS_MARLINUI_HD44780, IS_TFTGLCD_PANEL)
//#define LCD_PROGRESS_BAR // Show a progress bar on HD44780 LCDs for SD printing
#if ENABLED(LCD_PROGRESS_BAR)
#define PROGRESS_BAR_BAR_TIME 2000 // (ms) Amount of time to show the bar
#define PROGRESS_BAR_MSG_TIME 3000 // (ms) Amount of time to show the status message
#define PROGRESS_MSG_EXPIRE 0 // (ms) Amount of time to retain the status message (0=forever)
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
#endif
#endif

#if ENABLED(SDSUPPORT)
/**

  • SD卡SPI速度
    *可能需要解决“卷初始化”错误。
    *启用和设置SPI_HALF_SPEED, SPI_QUARTER_SPEED,或spi_eight速度
    *否则将应用全速。
    *:[‘SPI_HALF_SPEED’,‘SPI_QUARTER_SPEED’,‘SPI_EIGHTH_SPEED’)
    */
    //#define SD_SPI_SPEED SPI_HALF_SPEED

    // The standard SD detect circuit reads LOW when media is inserted and HIGH when empty.
    // Enable this option and set to HIGH if your SD cards are incorrectly detected.
    //#define SD_DETECT_STATE HIGH

    //#define SD_IGNORE_AT_STARTUP // Don’t mount the SD card when starting up
    //#define SDCARD_READONLY // Read-only SD card (to save over 2K of flash)

    //#define GCODE_REPEAT_MARKERS // Enable G-code M808 to set repeat markers and do looping

    #define SD_PROCEDURE_DEPTH 1 // Increase if you need more nested M32 calls

    #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished
    #define SD_FINISHED_RELEASECOMMAND “M84” // Use “M84XYE” to keep Z enabled so your bed stays in place

    // Reverse SD sort to show “more recent” files first, according to the card’s FAT.
    // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended.
    #define SDCARD_RATHERRECENTFIRST

    #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing

    //#define NO_SD_AUTOSTART // Remove auto#.g file support completely to save some Flash, SRAM
    //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files

    //#define BROWSE_MEDIA_ON_INSERT // Open the file browser when media is inserted

    //#define MEDIA_MENU_AT_TOP // Force the media menu to be listed on the top of the main menu

    #define EVENT_GCODE_SD_ABORT “G28XY” // G-code to run on SD Abort Print (e.g., “G28XY” or “G27”)

    #if ENABLED(PRINTER_EVENT_LEDS)
    #define PE_LEDS_COMPLETED_TIME (30*60) // (seconds) Time to keep the LED “done” color before restoring normal illumination
    #endif

    /**

    • Continue after Power-Loss (Creality3D)
    • Store the current state to the SD Card at the start of each layer
    • during SD printing. If the recovery file is found at boot time, present
    • an option on the LCD screen to continue the print from the last-known
    • point in the file.
      */
      //#define POWER_LOSS_RECOVERY
      #if ENABLED(POWER_LOSS_RECOVERY)
      #define PLR_ENABLED_DEFAULT false // Power Loss Recovery enabled by default. (Set with ‘M413 Sn’ & M500)
      //#define BACKUP_POWER_SUPPLY // Backup power / UPS to move the steppers on power loss
      //#define POWER_LOSS_ZRAISE 2 // (mm) Z axis raise on resume (on power loss with UPS)
      //#define POWER_LOSS_PIN 44 // Pin to detect power loss. Set to -1 to disable default pin on boards without module.
      //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
      //#define POWER_LOSS_PULLUP // Set pullup / pulldown as appropriate for your sensor
      //#define POWER_LOSS_PULLDOWN
      //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume
      //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power.

    // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card,
    // especially with “vase mode” printing. Set too high and vases cannot be continued.
    #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data

    // Enable if Z homing is needed for proper recovery. 99.9% of the time this should be disabled!
    //#define POWER_LOSS_RECOVER_ZHOME
    #if ENABLED(POWER_LOSS_RECOVER_ZHOME)
    //#define POWER_LOSS_ZHOME_POS { 0, 0 } // Safe XY position to home Z while avoiding objects on the bed
    #endif
    #endif

    /**

    • Sort SD file listings in alphabetical order.
    • With this option enabled, items on SD cards will be sorted
    • by name for easier navigation.
    • By default…
      • Use the slowest -but safest- method for sorting.
      • Folders are sorted to the top.
      • The sort key is statically allocated.
      • No added G-code (M34) support.
      • 40 item sorting limit. (Items after the first 40 are unsorted.)
    • SD sorting uses static allocation (as set by SDSORT_LIMIT), allowing the
    • compiler to calculate the worst-case usage and throw an error if the SRAM
    • limit is exceeded.
      • SDSORT_USES_RAM provides faster sorting via a static directory buffer.
      • SDSORT_USES_STACK does the same, but uses a local stack-based buffer.
      • SDSORT_CACHE_NAMES will retain the sorted file listing in RAM. (Expensive!)
      • SDSORT_DYNAMIC_RAM only uses RAM when the SD menu is visible. (Use with caution!)
        */
        //#define SDCARD_SORT_ALPHA

    // SD Card Sorting options
    #if ENABLED(SDCARD_SORT_ALPHA)
    #define SDSORT_LIMIT 40 // Maximum number of sorted items (10-256). Costs 27 bytes each.
    #define FOLDER_SORTING -1 // -1=above 0=none 1=below
    #define SDSORT_GCODE false // Allow turning sorting on/off with LCD and M34 G-code.
    #define SDSORT_USES_RAM false // Pre-allocate a static array for faster pre-sorting.
    #define SDSORT_USES_STACK false // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
    #define SDSORT_CACHE_NAMES false // Keep sorted items in RAM longer for speedy performance. Most expensive option.
    #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
    #define SDSORT_CACHE_VFATS 2 // Maximum number of 13-byte VFAT entries to use for sorting.
    // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM.
    #endif

    // Allow international symbols in long filenames. To display correctly, the
    // LCD’s font must contain the characters. Check your selected LCD language.
    //#define UTF_FILENAME_SUPPORT

    // This allows hosts to request long names for files and folders with M33
    //#define LONG_FILENAME_HOST_SUPPORT

    // Enable this option to scroll long filenames in the SD card menu
    //#define SCROLL_LONG_FILENAMES

    // Leave the heaters on after Stop Print (not recommended!)
    //#define SD_ABORT_NO_COOLDOWN

    /**

    • This option allows you to abort SD printing when any endstop is triggered.
    • This feature must be enabled with “M540 S1” or from the LCD menu.
    • To have any effect, endstops must be enabled during SD
锐单商城拥有海量元器件数据手册IC替代型号,打造电子元器件IC百科大全!

相关文章