Skip to content
Browse files

Added CoreXY support (Thanks Ilan Moyer)

  • Loading branch information...
1 parent aa65fe2 commit ea2c19f978e59ba0cbc6ee5b2e7975949b099802 @ErikZalm committed Jul 14, 2012
Showing with 16 additions and 14 deletions.
  1. +6 −5 Marlin/Configuration.h
  2. +9 −9 Marlin/stepper.cpp
  3. +1 −0 README.md
View
11 Marlin/Configuration.h
@@ -35,9 +35,7 @@
#define MOTHERBOARD 7
#endif
-/// Comment out the following line to enable normal kinematics
-#define COREXY
//===========================================================================
//=============================Thermal Settings ============================
@@ -131,6 +129,9 @@
//=============================Mechanical Settings===========================
//===========================================================================
+// Uncomment the following line to enable CoreXY kinematics
+// #define COREXY
+
// corse Endstop Settings
#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
@@ -172,7 +173,7 @@ const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of th
#define DISABLE_E false // For all extruders
#define INVERT_X_DIR true // for Mendel set to false, for Orca set to true
-#define INVERT_Y_DIR true // for Mendel set to true, for Orca set to false
+#define INVERT_Y_DIR false // for Mendel set to true, for Orca set to false
#define INVERT_Z_DIR true // for Mendel set to false, for Orca set to true
#define INVERT_E0_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false
#define INVERT_E1_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false
@@ -184,8 +185,8 @@ const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of th
#define Y_HOME_DIR -1
#define Z_HOME_DIR -1
-#define min_software_endstops false //If true, axis won't move to coordinates less than HOME_POS.
-#define max_software_endstops false //If true, axis won't move to coordinates greater than the defined lengths below.
+#define min_software_endstops true //If true, axis won't move to coordinates less than HOME_POS.
+#define max_software_endstops true //If true, axis won't move to coordinates greater than the defined lengths below.
#define X_MAX_LENGTH 205
#define Y_MAX_LENGTH 205
#define Z_MAX_LENGTH 200
View
18 Marlin/stepper.cpp
@@ -488,16 +488,16 @@ ISR(TIMER1_COMPA_vect)
if (counter_x > 0) {
WRITE(X_STEP_PIN, HIGH);
counter_x -= current_block->step_event_count;
- WRITE(X_STEP_PIN, LOW);
count_position[X_AXIS]+=count_direction[X_AXIS];
+ WRITE(X_STEP_PIN, LOW);
}
counter_y += current_block->steps_y;
if (counter_y > 0) {
WRITE(Y_STEP_PIN, HIGH);
-
+ counter_y -= current_block->step_event_count;
+ count_position[Y_AXIS]+=count_direction[Y_AXIS];
WRITE(Y_STEP_PIN, LOW);
-
}
#endif
@@ -508,19 +508,19 @@ ISR(TIMER1_COMPA_vect)
if ((counter_x > 0)&&!(counter_y>0)){ //X step only
WRITE(X_STEP_PIN, HIGH);
WRITE(Y_STEP_PIN, HIGH);
- counter_x -= current_block->step_event_count;
+ counter_x -= current_block->step_event_count;
+ count_position[X_AXIS]+=count_direction[X_AXIS];
WRITE(X_STEP_PIN, LOW);
WRITE(Y_STEP_PIN, LOW);
- count_position[X_AXIS]+=count_direction[X_AXIS];
}
if (!(counter_x > 0)&&(counter_y>0)){ //Y step only
WRITE(X_STEP_PIN, HIGH);
WRITE(Y_STEP_PIN, HIGH);
- counter_y -= current_block->step_event_count;
+ counter_y -= current_block->step_event_count;
+ count_position[Y_AXIS]+=count_direction[Y_AXIS];
WRITE(X_STEP_PIN, LOW);
WRITE(Y_STEP_PIN, LOW);
- count_position[Y_AXIS]+=count_direction[Y_AXIS];
}
if ((counter_x > 0)&&(counter_y>0)){ //step in both axes
@@ -553,17 +553,17 @@ ISR(TIMER1_COMPA_vect)
if (counter_z > 0) {
WRITE(Z_STEP_PIN, HIGH);
counter_z -= current_block->step_event_count;
- WRITE(Z_STEP_PIN, LOW);
count_position[Z_AXIS]+=count_direction[Z_AXIS];
+ WRITE(Z_STEP_PIN, LOW);
}
#ifndef ADVANCE
counter_e += current_block->steps_e;
if (counter_e > 0) {
WRITE_E_STEP(HIGH);
counter_e -= current_block->step_event_count;
- WRITE_E_STEP(LOW);
count_position[E_AXIS]+=count_direction[E_AXIS];
+ WRITE_E_STEP(LOW);
}
#endif //!ADVANCE
step_events_completed += 1;
View
1 README.md
@@ -44,6 +44,7 @@ Features:
* Updated sdcardlib
* Heater power reporting. Useful for PID monitoring.
* PID tuning
+* CoreXY kinematics (www.corexy.com/theory.html)
The default baudrate is 250000. This baudrate has less jitter and hence errors than the usual 115200 baud, but is less supported by drivers and host-environments.

0 comments on commit ea2c19f

Please sign in to comment.
Something went wrong with that request. Please try again.