chiark / gitweb /
Added CoreXY support (Thanks Ilan Moyer)
authorErik van der Zalm <erik@vdzalm.eu>
Sat, 14 Jul 2012 12:21:53 +0000 (14:21 +0200)
committerErik van der Zalm <erik@vdzalm.eu>
Sat, 14 Jul 2012 12:21:53 +0000 (14:21 +0200)
Marlin/Configuration.h
Marlin/stepper.cpp
README.md

index b9bf13e33a541a229378ebad5ce93f49b20ffbb7..2da2478d9146accc86421b129187b59b99a3463e 100644 (file)
@@ -35,9 +35,7 @@
 #define MOTHERBOARD 7
 #endif
 
-/// Comment out the following line to enable normal kinematics
 
-#define COREXY
 
 //===========================================================================
 //=============================Thermal Settings  ============================
 //=============================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
index 592e93007717c8fff44d598915fe0cde55c9457c..5a24ac44ae4a52ce4e8b469df4fd8f89644fd6b9 100644 (file)
@@ -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,8 +553,8 @@ 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
@@ -562,8 +562,8 @@ ISR(TIMER1_COMPA_vect)
         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;  
index c6befba73062a6cb733311dfb0897bdf89c54b72..86dd93de952da7086db17b215378dd78dd3a6422 100644 (file)
--- a/README.md
+++ b/README.md
@@ -44,6 +44,7 @@ Features:
 *   Updated sdcardlib\r
 *   Heater power reporting. Useful for PID monitoring.\r
 *   PID tuning\r
+*   CoreXY kinematics (www.corexy.com/theory.html)\r
 \r
 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.\r
 \r