Merged new $ params
This commit is contained in:
parent
f7083b9491
commit
1f0ab33787
@ -111,10 +111,11 @@
|
|||||||
// #define HOMING_CYCLE_2 // OPTIONAL: Uncomment and add axes mask to enable
|
// #define HOMING_CYCLE_2 // OPTIONAL: Uncomment and add axes mask to enable
|
||||||
|
|
||||||
// NOTE: The following are two examples to setup homing for 2-axis machines.
|
// NOTE: The following are two examples to setup homing for 2-axis machines.
|
||||||
#define HOMING_CYCLE_0 ((1<<X_AXIS)|(1<<Y_AXIS)) // NOT COMPATIBLE WITH COREXY: Homes both X-Y in one cycle.
|
//#define HOMING_CYCLE_0 ((1<<X_AXIS)|(1<<Y_AXIS)) // NOT COMPATIBLE WITH COREXY: Homes both X-Y in one cycle.
|
||||||
|
|
||||||
// #define HOMING_CYCLE_0 (1<<X_AXIS) // COREXY COMPATIBLE: First home X
|
// #define HOMING_CYCLE_0 (1<<X_AXIS) // COREXY COMPATIBLE: First home X
|
||||||
// #define HOMING_CYCLE_1 (1<<Y_AXIS) // COREXY COMPATIBLE: Then home Y
|
// #define HOMING_CYCLE_1 (1<<Y_AXIS) // COREXY COMPATIBLE: Then home Y
|
||||||
|
// Homing cycle pattern is defined in Machine defaults!!!
|
||||||
|
|
||||||
// Number of homing cycles performed after when the machine initially jogs to limit switches.
|
// Number of homing cycles performed after when the machine initially jogs to limit switches.
|
||||||
// This help in preventing overshoot and should improve repeatability. This value should be one or
|
// This help in preventing overshoot and should improve repeatability. This value should be one or
|
||||||
@ -362,12 +363,6 @@
|
|||||||
// pwm = scaled value. settings.rpm_min scales to SPINDLE_PWM_MIN_VALUE. settings.rpm_max
|
// pwm = scaled value. settings.rpm_min scales to SPINDLE_PWM_MIN_VALUE. settings.rpm_max
|
||||||
// scales to SPINDLE_PWM_MAX_VALUE.
|
// scales to SPINDLE_PWM_MAX_VALUE.
|
||||||
|
|
||||||
// Not needed anymore, as spindle PWM frequency is set by $33 param
|
|
||||||
//#define SPINDLE_PWM_PERIOD (SystemCoreClock / 40000) // SystemCoreClock / frequency
|
|
||||||
#define SPINDLE_PWM_OFF_VALUE 0.0 // SPINDLE_PWM_PERIOD * fraction
|
|
||||||
//#define SPINDLE_PWM_MIN_VALUE (SPINDLE_PWM_PERIOD * 0.0) // SPINDLE_PWM_PERIOD * fraction
|
|
||||||
//#define SPINDLE_PWM_MAX_VALUE (SPINDLE_PWM_PERIOD * 1.0) // SPINDLE_PWM_PERIOD * fraction
|
|
||||||
|
|
||||||
// Used by variable spindle output only. This forces the PWM output to a minimum duty cycle when enabled.
|
// Used by variable spindle output only. This forces the PWM output to a minimum duty cycle when enabled.
|
||||||
// The PWM pin will still read 0V when the spindle is disabled. Most users will not need this option, but
|
// The PWM pin will still read 0V when the spindle is disabled. Most users will not need this option, but
|
||||||
// it may be useful in certain scenarios. This minimum PWM settings coincides with the spindle rpm minimum
|
// it may be useful in certain scenarios. This minimum PWM settings coincides with the spindle rpm minimum
|
||||||
|
@ -269,10 +269,10 @@
|
|||||||
// Stepper current control
|
// Stepper current control
|
||||||
#ifndef BOARD_C3D
|
#ifndef BOARD_C3D
|
||||||
#define CURRENT_I2C Driver_I2C1 // I2C driver for current control. Comment out to disable (for C3d boards!)
|
#define CURRENT_I2C Driver_I2C1 // I2C driver for current control. Comment out to disable (for C3d boards!)
|
||||||
#endif
|
|
||||||
#define CURRENT_MCP44XX_ADDR 0b0101100 // Address of MCP44XX
|
#define CURRENT_MCP44XX_ADDR 0b0101100 // Address of MCP44XX
|
||||||
#define CURRENT_WIPERS {0, 1, 6, 7}; // Wiper registers (X, Y, Z, A)
|
#define CURRENT_WIPERS {0, 1, 6, 7}; // Wiper registers (X, Y, Z, A)
|
||||||
#define CURRENT_FACTOR 113.33 // Convert amps to digipot value
|
#define CURRENT_FACTOR 113.33 // Convert amps to digipot value
|
||||||
|
#endif
|
||||||
|
|
||||||
// Variable spindle configuration below. Do not change unless you know what you are doing.
|
// Variable spindle configuration below. Do not change unless you know what you are doing.
|
||||||
// NOTE: Only used when variable spindle is enabled.
|
// NOTE: Only used when variable spindle is enabled.
|
||||||
|
@ -33,40 +33,33 @@
|
|||||||
#define DEFAULT_Y_STEPS_PER_MM 250.0
|
#define DEFAULT_Y_STEPS_PER_MM 250.0
|
||||||
#define DEFAULT_Z_STEPS_PER_MM 250.0
|
#define DEFAULT_Z_STEPS_PER_MM 250.0
|
||||||
#define DEFAULT_A_STEPS_PER_MM 160.0
|
#define DEFAULT_A_STEPS_PER_MM 160.0
|
||||||
//#define DEFAULT_B_STEPS_PER_MM 160.0
|
|
||||||
//#define DEFAULT_C_STEPS_PER_MM 160.0
|
|
||||||
#define DEFAULT_X_MAX_RATE 500.0 // mm/min
|
#define DEFAULT_X_MAX_RATE 500.0 // mm/min
|
||||||
#define DEFAULT_Y_MAX_RATE 500.0 // mm/min
|
#define DEFAULT_Y_MAX_RATE 500.0 // mm/min
|
||||||
#define DEFAULT_Z_MAX_RATE 500.0 // mm/min
|
#define DEFAULT_Z_MAX_RATE 500.0 // mm/min
|
||||||
#define DEFAULT_A_MAX_RATE 500.0 // mm/min
|
#define DEFAULT_A_MAX_RATE 500.0 // mm/min
|
||||||
//#define DEFAULT_B_MAX_RATE 500.0 // mm/min
|
|
||||||
//#define DEFAULT_C_MAX_RATE 500.0 // mm/min
|
|
||||||
#define DEFAULT_X_ACCELERATION (10.0*60*60) // 10*60*60 mm/min^2 = 10 mm/sec^2
|
#define DEFAULT_X_ACCELERATION (10.0*60*60) // 10*60*60 mm/min^2 = 10 mm/sec^2
|
||||||
#define DEFAULT_Y_ACCELERATION (10.0*60*60) // 10*60*60 mm/min^2 = 10 mm/sec^2
|
#define DEFAULT_Y_ACCELERATION (10.0*60*60) // 10*60*60 mm/min^2 = 10 mm/sec^2
|
||||||
#define DEFAULT_Z_ACCELERATION (10.0*60*60) // 10*60*60 mm/min^2 = 10 mm/sec^2
|
#define DEFAULT_Z_ACCELERATION (10.0*60*60) // 10*60*60 mm/min^2 = 10 mm/sec^2
|
||||||
#define DEFAULT_A_ACCELERATION (10.0*60*60) // 10*60*60 mm/min^2 = 10 mm/sec^2
|
#define DEFAULT_A_ACCELERATION (10.0*60*60) // 10*60*60 mm/min^2 = 10 mm/sec^2
|
||||||
//#define DEFAULT_B_ACCELERATION (10.0*60*60) // 10*60*60 mm/min^2 = 10 mm/sec^2
|
|
||||||
//#define DEFAULT_C_ACCELERATION (10.0*60*60) // 10*60*60 mm/min^2 = 10 mm/sec^2
|
|
||||||
#define DEFAULT_X_CURRENT 0.6 // amps
|
#define DEFAULT_X_CURRENT 0.6 // amps
|
||||||
#define DEFAULT_Y_CURRENT 0.6 // amps
|
#define DEFAULT_Y_CURRENT 0.6 // amps
|
||||||
#define DEFAULT_Z_CURRENT 0.0 // amps
|
#define DEFAULT_Z_CURRENT 0.0 // amps
|
||||||
#define DEFAULT_A_CURRENT 0.0 // amps
|
#define DEFAULT_A_CURRENT 0.0 // amps
|
||||||
//#define DEFAULT_B_CURRENT 0.0 // amps
|
|
||||||
//#define DEFAULT_C_CURRENT 0.0 // amps
|
|
||||||
#define DEFAULT_X_MAX_TRAVEL 200.0 // mm NOTE: Must be a positive value.
|
#define DEFAULT_X_MAX_TRAVEL 200.0 // mm NOTE: Must be a positive value.
|
||||||
#define DEFAULT_Y_MAX_TRAVEL 200.0 // mm NOTE: Must be a positive value.
|
#define DEFAULT_Y_MAX_TRAVEL 200.0 // mm NOTE: Must be a positive value.
|
||||||
#define DEFAULT_Z_MAX_TRAVEL 200.0 // mm NOTE: Must be a positive value.
|
#define DEFAULT_Z_MAX_TRAVEL 200.0 // mm NOTE: Must be a positive value.
|
||||||
#define DEFAULT_A_MAX_TRAVEL 1.0 // mm NOTE: Must be a positive value.
|
#define DEFAULT_A_MAX_TRAVEL 1.0 // mm NOTE: Must be a positive value.
|
||||||
//#define DEFAULT_B_MAX_TRAVEL 1.0 // mm NOTE: Must be a positive value.
|
|
||||||
//#define DEFAULT_C_MAX_TRAVEL 1.0 // mm NOTE: Must be a positive value.
|
|
||||||
#define DEFAULT_SPINDLE_PWM_FREQ 5000 // Hz
|
#define DEFAULT_SPINDLE_PWM_FREQ 5000 // Hz
|
||||||
#define DEFAULT_SPINDLE_RPM_MAX 1000.0 // rpm
|
#define DEFAULT_SPINDLE_PWM_OFF_VALUE 0 // %
|
||||||
#define DEFAULT_SPINDLE_RPM_MIN 0.0 // rpm
|
#define DEFAULT_SPINDLE_PWM_MIN_VALUE 1 // %
|
||||||
|
#define DEFAULT_SPINDLE_PWM_MAX_VALUE 100 // %
|
||||||
|
#define DEFAULT_SPINDLE_RPM_MAX 1000.0 // rpm (S-value)
|
||||||
|
#define DEFAULT_SPINDLE_RPM_MIN 0.0 // rpm (S-value)
|
||||||
#define DEFAULT_STEP_PULSE_MICROSECONDS 10
|
#define DEFAULT_STEP_PULSE_MICROSECONDS 10
|
||||||
#define DEFAULT_STEPPING_INVERT_MASK 0
|
#define DEFAULT_STEPPING_INVERT_MASK 0
|
||||||
#define DEFAULT_DIRECTION_INVERT_MASK 0
|
#define DEFAULT_DIRECTION_INVERT_MASK 0
|
||||||
#define DEFAULT_STEPPER_IDLE_LOCK_TIME 25 // msec (0-254, 255 keeps steppers enabled)
|
#define DEFAULT_STEPPER_IDLE_LOCK_TIME 25 // msec (0-254, 255 keeps steppers enabled)
|
||||||
#define DEFAULT_STATUS_REPORT_MASK 1 // MPos enabled
|
#define DEFAULT_STATUS_REPORT_MASK 0 // WPos enabled
|
||||||
#define DEFAULT_JUNCTION_DEVIATION 0.01 // mm
|
#define DEFAULT_JUNCTION_DEVIATION 0.01 // mm
|
||||||
#define DEFAULT_ARC_TOLERANCE 0.002 // mm
|
#define DEFAULT_ARC_TOLERANCE 0.002 // mm
|
||||||
#define DEFAULT_REPORT_INCHES 0 // false
|
#define DEFAULT_REPORT_INCHES 0 // false
|
||||||
@ -82,63 +75,58 @@
|
|||||||
#define DEFAULT_HOMING_SEEK_RATE 500.0 // mm/min
|
#define DEFAULT_HOMING_SEEK_RATE 500.0 // mm/min
|
||||||
#define DEFAULT_HOMING_DEBOUNCE_DELAY 250 // msec (0-65k)
|
#define DEFAULT_HOMING_DEBOUNCE_DELAY 250 // msec (0-65k)
|
||||||
#define DEFAULT_HOMING_PULLOFF 1.0 // mm
|
#define DEFAULT_HOMING_PULLOFF 1.0 // mm
|
||||||
|
#define HOMING_CYCLE_0 ((1<<X_AXIS)|(1<<Y_AXIS))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DEFAULTS_K40
|
#ifdef DEFAULTS_K40
|
||||||
// Description: K40 Lasercutter (typical chinese 40W CO2 laser cutter/engraver)
|
// Description: K40 Lasercutter (typical chinese 40W CO2 laser cutter/engraver)
|
||||||
#define DEFAULT_X_STEPS_PER_MM 160.0
|
#define DEFAULT_X_STEPS_PER_MM 160.0 // 200 stepps/rev. * 32 microstepps / 40mm/rev
|
||||||
#define DEFAULT_Y_STEPS_PER_MM 160.0
|
#define DEFAULT_Y_STEPS_PER_MM 160.0
|
||||||
#define DEFAULT_Z_STEPS_PER_MM 160.0
|
#define DEFAULT_Z_STEPS_PER_MM 160.0
|
||||||
#define DEFAULT_A_STEPS_PER_MM 160.0
|
#define DEFAULT_A_STEPS_PER_MM 160.0
|
||||||
//#define DEFAULT_B_STEPS_PER_MM 160.0
|
|
||||||
//#define DEFAULT_C_STEPS_PER_MM 160.0
|
|
||||||
#define DEFAULT_X_MAX_RATE 24000.0 // mm/min
|
#define DEFAULT_X_MAX_RATE 24000.0 // mm/min
|
||||||
#define DEFAULT_Y_MAX_RATE 24000.0 // mm/min
|
#define DEFAULT_Y_MAX_RATE 24000.0 // mm/min
|
||||||
#define DEFAULT_Z_MAX_RATE 24000.0 // mm/min
|
#define DEFAULT_Z_MAX_RATE 24000.0 // mm/min
|
||||||
#define DEFAULT_A_MAX_RATE 24000.0 // mm/min
|
#define DEFAULT_A_MAX_RATE 24000.0 // mm/min
|
||||||
//#define DEFAULT_B_MAX_RATE 24000.0 // mm/min
|
#define DEFAULT_X_ACCELERATION (2500.0*60*60) // 2500*60*60 mm/min^2 = 2500 mm/sec^2
|
||||||
//#define DEFAULT_C_MAX_RATE 24000.0 // mm/min
|
#define DEFAULT_Y_ACCELERATION (2500.0*60*60) // 2500*60*60 mm/min^2 = 2500 mm/sec^2
|
||||||
#define DEFAULT_X_ACCELERATION (2500.0*60*60) // 10*60*60 mm/min^2 = 10 mm/sec^2
|
#define DEFAULT_Z_ACCELERATION (2500.0*60*60) // 2500*60*60 mm/min^2 = 2500 mm/sec^2
|
||||||
#define DEFAULT_Y_ACCELERATION (2500.0*60*60) // 10*60*60 mm/min^2 = 10 mm/sec^2
|
#define DEFAULT_A_ACCELERATION (2500.0*60*60) // 2500*60*60 mm/min^2 = 2500 mm/sec^2
|
||||||
#define DEFAULT_Z_ACCELERATION (2500.0*60*60) // 10*60*60 mm/min^2 = 10 mm/sec^2
|
|
||||||
#define DEFAULT_A_ACCELERATION (2500.0*60*60) // 10*60*60 mm/min^2 = 10 mm/sec^2
|
|
||||||
//#define DEFAULT_B_ACCELERATION (2500.0*60*60) // 10*60*60 mm/min^2 = 10 mm/sec^2
|
|
||||||
//#define DEFAULT_C_ACCELERATION (2500.0*60*60) // 10*60*60 mm/min^2 = 10 mm/sec^2
|
|
||||||
#define DEFAULT_X_CURRENT 0.6 // amps
|
#define DEFAULT_X_CURRENT 0.6 // amps
|
||||||
#define DEFAULT_Y_CURRENT 0.6 // amps
|
#define DEFAULT_Y_CURRENT 0.6 // amps
|
||||||
#define DEFAULT_Z_CURRENT 0.0 // amps
|
#define DEFAULT_Z_CURRENT 0.0 // amps
|
||||||
#define DEFAULT_A_CURRENT 0.0 // amps
|
#define DEFAULT_A_CURRENT 0.0 // amps
|
||||||
//#define DEFAULT_B_CURRENT 0.0 // amps
|
|
||||||
//#define DEFAULT_C_CURRENT 0.0 // amps
|
|
||||||
#define DEFAULT_X_MAX_TRAVEL 300.0 // mm NOTE: Must be a positive value.
|
#define DEFAULT_X_MAX_TRAVEL 300.0 // mm NOTE: Must be a positive value.
|
||||||
#define DEFAULT_Y_MAX_TRAVEL 200.0 // mm NOTE: Must be a positive value.
|
#define DEFAULT_Y_MAX_TRAVEL 200.0 // mm NOTE: Must be a positive value.
|
||||||
#define DEFAULT_Z_MAX_TRAVEL 1.0 // mm NOTE: Must be a positive value.
|
#define DEFAULT_Z_MAX_TRAVEL 50.0 // mm NOTE: Must be a positive value.
|
||||||
#define DEFAULT_A_MAX_TRAVEL 1.0 // mm NOTE: Must be a positive value.
|
#define DEFAULT_A_MAX_TRAVEL 100.0 // mm NOTE: Must be a positive value.
|
||||||
//#define DEFAULT_B_MAX_TRAVEL 1.0 // mm NOTE: Must be a positive value.
|
|
||||||
//#define DEFAULT_C_MAX_TRAVEL 1.0 // mm NOTE: Must be a positive value.
|
|
||||||
#define DEFAULT_SPINDLE_PWM_FREQ 5000 // Hz
|
#define DEFAULT_SPINDLE_PWM_FREQ 5000 // Hz
|
||||||
#define DEFAULT_SPINDLE_RPM_MAX 1000.0 // rpm
|
#define DEFAULT_SPINDLE_PWM_OFF_VALUE 0 // %
|
||||||
#define DEFAULT_SPINDLE_RPM_MIN 0.0 // rpm
|
#define DEFAULT_SPINDLE_PWM_MIN_VALUE 1 // %
|
||||||
|
#define DEFAULT_SPINDLE_PWM_MAX_VALUE 100 // %
|
||||||
|
#define DEFAULT_SPINDLE_RPM_MAX 1000.0 // rpm (S-value)
|
||||||
|
#define DEFAULT_SPINDLE_RPM_MIN 0.0 // rpm (S-value)
|
||||||
#define DEFAULT_STEP_PULSE_MICROSECONDS 10
|
#define DEFAULT_STEP_PULSE_MICROSECONDS 10
|
||||||
#define DEFAULT_STEPPING_INVERT_MASK 0
|
#define DEFAULT_STEPPING_INVERT_MASK 0
|
||||||
#define DEFAULT_DIRECTION_INVERT_MASK 0
|
#define DEFAULT_DIRECTION_INVERT_MASK 0
|
||||||
#define DEFAULT_STEPPER_IDLE_LOCK_TIME 25 // msec (0-254, 255 keeps steppers enabled)
|
#define DEFAULT_STEPPER_IDLE_LOCK_TIME 255// msec (0-254, 255 keeps steppers enabled)
|
||||||
#define DEFAULT_STATUS_REPORT_MASK 0 // WPos enabled
|
#define DEFAULT_STATUS_REPORT_MASK 0 // WPos enabled
|
||||||
#define DEFAULT_JUNCTION_DEVIATION 0.01 // mm
|
#define DEFAULT_JUNCTION_DEVIATION 0.01 // mm
|
||||||
#define DEFAULT_ARC_TOLERANCE 0.002 // mm
|
#define DEFAULT_ARC_TOLERANCE 0.002 // mm
|
||||||
#define DEFAULT_REPORT_INCHES 0 // false
|
#define DEFAULT_REPORT_INCHES 0 // false
|
||||||
#define DEFAULT_INVERT_ST_ENABLE 0 // false
|
#define DEFAULT_INVERT_ST_ENABLE 0 // false
|
||||||
#define DEFAULT_INVERT_LIMIT_PINS 1 // false
|
#define DEFAULT_INVERT_LIMIT_PINS 1 // true
|
||||||
#define DEFAULT_SOFT_LIMIT_ENABLE 0 // false
|
#define DEFAULT_SOFT_LIMIT_ENABLE 1 // true
|
||||||
#define DEFAULT_HARD_LIMIT_ENABLE 0 // false
|
#define DEFAULT_HARD_LIMIT_ENABLE 0 // false
|
||||||
#define DEFAULT_INVERT_PROBE_PIN 0 // false
|
#define DEFAULT_INVERT_PROBE_PIN 0 // false
|
||||||
#define DEFAULT_LASER_MODE 1 // false
|
#define DEFAULT_LASER_MODE 1 // true
|
||||||
#define DEFAULT_HOMING_ENABLE 0 // false
|
#define DEFAULT_HOMING_ENABLE 1 // true
|
||||||
#define DEFAULT_HOMING_DIR_MASK 0 // move positive dir
|
#define DEFAULT_HOMING_DIR_MASK 1 // move top/left
|
||||||
#define DEFAULT_HOMING_FEED_RATE 50.0 // mm/min
|
#define DEFAULT_HOMING_FEED_RATE 50.0 // mm/min
|
||||||
#define DEFAULT_HOMING_SEEK_RATE 6000.0 // mm/min
|
#define DEFAULT_HOMING_SEEK_RATE 6000.0 // mm/min
|
||||||
#define DEFAULT_HOMING_DEBOUNCE_DELAY 250 // msec (0-65k)
|
#define DEFAULT_HOMING_DEBOUNCE_DELAY 250 // msec (0-65k)
|
||||||
#define DEFAULT_HOMING_PULLOFF 1.0 // mm
|
#define DEFAULT_HOMING_PULLOFF 2.0 // mm
|
||||||
|
#define HOMING_CYCLE_0 ((1<<X_AXIS)|(1<<Y_AXIS))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DEFAULTS_FABKIT
|
#ifdef DEFAULTS_FABKIT
|
||||||
@ -146,12 +134,15 @@
|
|||||||
#define DEFAULT_X_STEPS_PER_MM 80.0
|
#define DEFAULT_X_STEPS_PER_MM 80.0
|
||||||
#define DEFAULT_Y_STEPS_PER_MM 80.0
|
#define DEFAULT_Y_STEPS_PER_MM 80.0
|
||||||
#define DEFAULT_Z_STEPS_PER_MM 640.0
|
#define DEFAULT_Z_STEPS_PER_MM 640.0
|
||||||
|
#define DEFAULT_A_STEPS_PER_MM 160.0
|
||||||
#define DEFAULT_X_MAX_RATE 30000 // mm/min
|
#define DEFAULT_X_MAX_RATE 30000 // mm/min
|
||||||
#define DEFAULT_Y_MAX_RATE 4500 // mm/min
|
#define DEFAULT_Y_MAX_RATE 4500 // mm/min
|
||||||
#define DEFAULT_Z_MAX_RATE 1200 // mm/min
|
#define DEFAULT_Z_MAX_RATE 1200 // mm/min
|
||||||
#define DEFAULT_X_ACCELERATION (4000.0*60*60) // 5000*60*60 mm/min^2 = 5000 mm/sec^2
|
#define DEFAULT_A_MAX_RATE 24000.0 // mm/min
|
||||||
#define DEFAULT_Y_ACCELERATION (250.0*60*60) // 5000*60*60 mm/min^2 = 5000 mm/sec^2
|
#define DEFAULT_X_ACCELERATION (4000.0*60*60) // 4000*60*60 mm/min^2 = 4000 mm/sec^2
|
||||||
#define DEFAULT_Z_ACCELERATION (150.0*60*60) // 5000*60*60 mm/min^2 = 5000 mm/sec^2
|
#define DEFAULT_Y_ACCELERATION (250.0*60*60) // 250*60*60 mm/min^2 = 250 mm/sec^2
|
||||||
|
#define DEFAULT_Z_ACCELERATION (150.0*60*60) // 150*60*60 mm/min^2 = 150 mm/sec^2
|
||||||
|
#define DEFAULT_A_ACCELERATION (150.0*60*60) // 150*60*60 mm/min^2 = 150 mm/sec^2
|
||||||
#define DEFAULT_X_CURRENT 1.5 // amps
|
#define DEFAULT_X_CURRENT 1.5 // amps
|
||||||
#define DEFAULT_Y_CURRENT 1.5 // amps
|
#define DEFAULT_Y_CURRENT 1.5 // amps
|
||||||
#define DEFAULT_Z_CURRENT 1.5 // amps
|
#define DEFAULT_Z_CURRENT 1.5 // amps
|
||||||
@ -159,9 +150,13 @@
|
|||||||
#define DEFAULT_X_MAX_TRAVEL 680.0 // mm
|
#define DEFAULT_X_MAX_TRAVEL 680.0 // mm
|
||||||
#define DEFAULT_Y_MAX_TRAVEL 460.0 // mm
|
#define DEFAULT_Y_MAX_TRAVEL 460.0 // mm
|
||||||
#define DEFAULT_Z_MAX_TRAVEL 150.0 // mm
|
#define DEFAULT_Z_MAX_TRAVEL 150.0 // mm
|
||||||
|
#define DEFAULT_A_MAX_TRAVEL 150.0 // mm
|
||||||
#define DEFAULT_SPINDLE_PWM_FREQ 50000 // Hz
|
#define DEFAULT_SPINDLE_PWM_FREQ 50000 // Hz
|
||||||
#define DEFAULT_SPINDLE_RPM_MAX 0.7 // rpm
|
#define DEFAULT_SPINDLE_PWM_OFF_VALUE 0 // %
|
||||||
#define DEFAULT_SPINDLE_RPM_MIN 0.08 // rpm
|
#define DEFAULT_SPINDLE_PWM_MIN_VALUE 0 // %
|
||||||
|
#define DEFAULT_SPINDLE_PWM_MAX_VALUE 100 // %
|
||||||
|
#define DEFAULT_SPINDLE_RPM_MAX 0.7 // rpm (S-value)
|
||||||
|
#define DEFAULT_SPINDLE_RPM_MIN 0.08 // rpm (S-value)
|
||||||
#define DEFAULT_STEP_PULSE_MICROSECONDS 1
|
#define DEFAULT_STEP_PULSE_MICROSECONDS 1
|
||||||
#define DEFAULT_STEPPING_INVERT_MASK 0
|
#define DEFAULT_STEPPING_INVERT_MASK 0
|
||||||
#define DEFAULT_DIRECTION_INVERT_MASK 2
|
#define DEFAULT_DIRECTION_INVERT_MASK 2
|
||||||
@ -171,17 +166,19 @@
|
|||||||
#define DEFAULT_ARC_TOLERANCE 0.002 // mm
|
#define DEFAULT_ARC_TOLERANCE 0.002 // mm
|
||||||
#define DEFAULT_REPORT_INCHES 0 // false
|
#define DEFAULT_REPORT_INCHES 0 // false
|
||||||
#define DEFAULT_INVERT_ST_ENABLE 0 // false
|
#define DEFAULT_INVERT_ST_ENABLE 0 // false
|
||||||
#define DEFAULT_INVERT_LIMIT_PINS 1 // false
|
#define DEFAULT_INVERT_LIMIT_PINS 1 // true
|
||||||
#define DEFAULT_SOFT_LIMIT_ENABLE 0 // false
|
#define DEFAULT_SOFT_LIMIT_ENABLE 1 // true
|
||||||
#define DEFAULT_HARD_LIMIT_ENABLE 0 // false
|
#define DEFAULT_HARD_LIMIT_ENABLE 0 // false
|
||||||
#define DEFAULT_INVERT_PROBE_PIN 0 // false
|
#define DEFAULT_INVERT_PROBE_PIN 0 // false
|
||||||
#define DEFAULT_LASER_MODE 1 // true
|
#define DEFAULT_LASER_MODE 1 // true
|
||||||
#define DEFAULT_HOMING_ENABLE 1 // false
|
#define DEFAULT_HOMING_ENABLE 1 // true
|
||||||
#define DEFAULT_HOMING_DIR_MASK 1 // move positive dir
|
#define DEFAULT_HOMING_DIR_MASK 1 // move top/left
|
||||||
#define DEFAULT_HOMING_FEED_RATE 60.0 // mm/min
|
#define DEFAULT_HOMING_FEED_RATE 60.0 // mm/min
|
||||||
#define DEFAULT_HOMING_SEEK_RATE 6000.0 // mm/min
|
#define DEFAULT_HOMING_SEEK_RATE 6000.0 // mm/min
|
||||||
#define DEFAULT_HOMING_DEBOUNCE_DELAY 250 // msec (0-65k)
|
#define DEFAULT_HOMING_DEBOUNCE_DELAY 250 // msec (0-65k)
|
||||||
#define DEFAULT_HOMING_PULLOFF 1.0 // mm
|
#define DEFAULT_HOMING_PULLOFF 2.0 // mm
|
||||||
|
#define HOMING_CYCLE_0 (1<<Z_AXIS)
|
||||||
|
#define HOMING_CYCLE_1 ((1<<X_AXIS)|(1<<Y_AXIS))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DEFAULTS_SHERLINE_5400
|
#ifdef DEFAULTS_SHERLINE_5400
|
||||||
|
@ -87,6 +87,9 @@ void settings_restore(uint8_t restore_flag) {
|
|||||||
settings.arc_tolerance = DEFAULT_ARC_TOLERANCE;
|
settings.arc_tolerance = DEFAULT_ARC_TOLERANCE;
|
||||||
|
|
||||||
settings.spindle_pwm_freq = DEFAULT_SPINDLE_PWM_FREQ;
|
settings.spindle_pwm_freq = DEFAULT_SPINDLE_PWM_FREQ;
|
||||||
|
settings.spindle_pwm_off_value = DEFAULT_SPINDLE_PWM_OFF_VALUE;
|
||||||
|
settings.spindle_pwm_min_value = DEFAULT_SPINDLE_PWM_MIN_VALUE;
|
||||||
|
settings.spindle_pwm_max_value = DEFAULT_SPINDLE_PWM_MAX_VALUE;
|
||||||
settings.rpm_max = DEFAULT_SPINDLE_RPM_MAX;
|
settings.rpm_max = DEFAULT_SPINDLE_RPM_MAX;
|
||||||
settings.rpm_min = DEFAULT_SPINDLE_RPM_MIN;
|
settings.rpm_min = DEFAULT_SPINDLE_RPM_MIN;
|
||||||
|
|
||||||
|
@ -92,7 +92,10 @@ typedef struct {
|
|||||||
float junction_deviation;
|
float junction_deviation;
|
||||||
float arc_tolerance;
|
float arc_tolerance;
|
||||||
|
|
||||||
uint16_t spindle_pwm_freq;
|
float spindle_pwm_freq;
|
||||||
|
float spindle_pwm_off_value; // Percent
|
||||||
|
float spindle_pwm_min_value; // Percent
|
||||||
|
float spindle_pwm_max_value; // Percent
|
||||||
float rpm_max;
|
float rpm_max;
|
||||||
float rpm_min;
|
float rpm_min;
|
||||||
|
|
||||||
|
@ -25,10 +25,10 @@
|
|||||||
|
|
||||||
#ifdef VARIABLE_SPINDLE
|
#ifdef VARIABLE_SPINDLE
|
||||||
static float pwm_gradient; // Precalulated value to speed up rpm to PWM conversions.
|
static float pwm_gradient; // Precalulated value to speed up rpm to PWM conversions.
|
||||||
static float spindle_pwm_period;
|
float spindle_pwm_period;
|
||||||
static float spindle_pwm_off_value;
|
float spindle_pwm_off_value;
|
||||||
static float spindle_pwm_min_value;
|
float spindle_pwm_min_value;
|
||||||
static float spindle_pwm_max_value;
|
float spindle_pwm_max_value;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@ -36,12 +36,10 @@ void spindle_init()
|
|||||||
{
|
{
|
||||||
#ifdef VARIABLE_SPINDLE
|
#ifdef VARIABLE_SPINDLE
|
||||||
spindle_pwm_period = (SystemCoreClock / settings.spindle_pwm_freq);
|
spindle_pwm_period = (SystemCoreClock / settings.spindle_pwm_freq);
|
||||||
spindle_pwm_off_value = (spindle_pwm_period * 0.0); // SPINDLE_PWM_PERIOD * fraction
|
spindle_pwm_off_value = (spindle_pwm_period * settings.spindle_pwm_off_value / 100);
|
||||||
spindle_pwm_min_value = (spindle_pwm_period * 0.0); // SPINDLE_PWM_PERIOD * fraction
|
spindle_pwm_min_value = (spindle_pwm_period * settings.spindle_pwm_min_value / 100);
|
||||||
spindle_pwm_max_value = (spindle_pwm_period * 1.0); // SPINDLE_PWM_PERIOD * fraction
|
spindle_pwm_max_value = (spindle_pwm_period * settings.spindle_pwm_max_value / 100);
|
||||||
|
pwm_init(&SPINDLE_PWM_CHANNEL, SPINDLE_PWM_USE_PRIMARY_PIN, SPINDLE_PWM_USE_SECONDARY_PIN, spindle_pwm_period, 0);
|
||||||
//pwm_init(&SPINDLE_PWM_CHANNEL, SPINDLE_PWM_USE_PRIMARY_PIN, SPINDLE_PWM_USE_SECONDARY_PIN, SPINDLE_PWM_PERIOD, 0);
|
|
||||||
pwm_init(&SPINDLE_PWM_CHANNEL, SPINDLE_PWM_USE_PRIMARY_PIN, SPINDLE_PWM_USE_SECONDARY_PIN, spindle_pwm_period, 0); //SPINDLE_PWM_PERIOD
|
|
||||||
pwm_enable(&SPINDLE_PWM_CHANNEL);
|
pwm_enable(&SPINDLE_PWM_CHANNEL);
|
||||||
|
|
||||||
/* not ported
|
/* not ported
|
||||||
@ -54,7 +52,6 @@ void spindle_init()
|
|||||||
#endif
|
#endif
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//pwm_gradient = (SPINDLE_PWM_MAX_VALUE-SPINDLE_PWM_MIN_VALUE)/(settings.rpm_max-settings.rpm_min);
|
|
||||||
pwm_gradient = (spindle_pwm_max_value-spindle_pwm_min_value)/(settings.rpm_max-settings.rpm_min);
|
pwm_gradient = (spindle_pwm_max_value-spindle_pwm_min_value)/(settings.rpm_max-settings.rpm_min);
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
@ -391,7 +391,7 @@ extern "C" void TIMER1_IRQHandler()
|
|||||||
st_go_idle();
|
st_go_idle();
|
||||||
#ifdef VARIABLE_SPINDLE
|
#ifdef VARIABLE_SPINDLE
|
||||||
// Ensure pwm is set properly upon completion of rate-controlled motion.
|
// Ensure pwm is set properly upon completion of rate-controlled motion.
|
||||||
if (st.exec_block->is_pwm_rate_adjusted) { spindle_set_speed(SPINDLE_PWM_OFF_VALUE); }
|
if (st.exec_block->is_pwm_rate_adjusted) { spindle_set_speed(spindle_pwm_off_value); }
|
||||||
#endif
|
#endif
|
||||||
system_set_exec_state_flag(EXEC_CYCLE_STOP); // Flag main program for cycle end
|
system_set_exec_state_flag(EXEC_CYCLE_STOP); // Flag main program for cycle end
|
||||||
return; // Nothing to do but exit.
|
return; // Nothing to do but exit.
|
||||||
@ -948,7 +948,7 @@ void st_prep_buffer()
|
|||||||
prep.current_spindle_pwm = spindle_compute_pwm_value(rpm);
|
prep.current_spindle_pwm = spindle_compute_pwm_value(rpm);
|
||||||
} else {
|
} else {
|
||||||
sys.spindle_speed = 0.0;
|
sys.spindle_speed = 0.0;
|
||||||
prep.current_spindle_pwm = SPINDLE_PWM_OFF_VALUE;
|
prep.current_spindle_pwm = spindle_pwm_off_value;
|
||||||
}
|
}
|
||||||
bit_false(sys.step_control,STEP_CONTROL_UPDATE_SPINDLE_PWM);
|
bit_false(sys.step_control,STEP_CONTROL_UPDATE_SPINDLE_PWM);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user