Skip to content
Snippets Groups Projects

Treat limit switches we are moving towards and away from differently

Merged Kyrre Ness Sjobaek requested to merge directional_switches into master
3 files
+ 79
33
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -108,10 +108,10 @@ const bool stepper_switch_active = LOW; //On limit switch when pi
const bool stepper_switch_inactive = HIGH; //On limit switch when pin inactive
//TODO: Tune timings
const unsigned int stepper_onTime = 25; // [us] How long to hold the step pin HIGH
const unsigned int stepper_delay_fast = 25; // [us] How long to wait between steps when moving fast
const unsigned int stepper_onTime = 25; // [us] How long to hold the step pin HIGH
const unsigned int stepper_delay_fast = 2000; // [us] How long to wait between steps when moving fast
const unsigned int stepper_delay_slow = 2000; // [us] How long to wait between steps when moving slow
const unsigned int stepper_accelerate_steps = 100; // When accelerating, how many steps to use for ramp
const unsigned int stepper_accelerate_steps = 100; // When accelerating, how many steps to use for ramp
// When at high speed, ramp down to slow speed when
// pos < accelerate_steps+slowzone or pos > (rail_length-accelerate_steps-slowzone)
@@ -120,12 +120,15 @@ const unsigned long int stepper_rail_length[] = {4900,6800,1760}; // [steps]
const unsigned long int stepper_slowzone_steps = 50; // [steps] Take it easy when approaching limit switches
//Interlocks
const long int stepper_Zpos_unlockXY = 1400; // [steps] Only allow XY movements when
// Zpos < Zpos_unlockXY and Z axis
// in absolute mode
const unsigned long int stepper_onlimit_steps = 100; // [steps] Number of steps to allow movement
// per command when a limit switch
// is active
const long int stepper_Zpos_unlockXY = 1400; // [steps] Only allow XY movements when
// Zpos < Zpos_unlockXY and Z axis is in absolute mode
const unsigned long int stepper_onlimit_steps_towards = 2; // [steps] Number of steps to allow when a limit switch is active
// (moving towards the switch, i.e. allow
// this many hits before stopping in case of spurious hits)
const unsigned long int stepper_onlimit_steps_away = 100; // [steps] Number of steps to allow when a limit switch is active
// (moving away from the switch, i.e. allow
// this many hits before stopping in order to
// allow escape from switch)
// ***** INTERNAL CONFIGS **********************
// Uncomment to include extra debug messages about parser to Serial
Loading