Parcourir la source

Added CoreXY support (Thanks Ilan Moyer)

Erik van der Zalm il y a 12 ans
Parent
révision
ea2c19f978
3 fichiers modifiés avec 16 ajouts et 14 suppressions
  1. 6
    5
      Marlin/Configuration.h
  2. 9
    9
      Marlin/stepper.cpp
  3. 1
    0
      README.md

+ 6
- 5
Marlin/Configuration.h Voir le fichier

@@ -35,9 +35,7 @@
35 35
 #define MOTHERBOARD 7
36 36
 #endif
37 37
 
38
-/// Comment out the following line to enable normal kinematics
39 38
 
40
-#define COREXY
41 39
 
42 40
 //===========================================================================
43 41
 //=============================Thermal Settings  ============================
@@ -131,6 +129,9 @@
131 129
 //=============================Mechanical Settings===========================
132 130
 //===========================================================================
133 131
 
132
+// Uncomment the following line to enable CoreXY kinematics
133
+// #define COREXY
134
+
134 135
 // corse Endstop Settings
135 136
 #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
136 137
 
@@ -172,7 +173,7 @@ const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of th
172 173
 #define DISABLE_E false // For all extruders
173 174
 
174 175
 #define INVERT_X_DIR true    // for Mendel set to false, for Orca set to true
175
-#define INVERT_Y_DIR true    // for Mendel set to true, for Orca set to false
176
+#define INVERT_Y_DIR false    // for Mendel set to true, for Orca set to false
176 177
 #define INVERT_Z_DIR true     // for Mendel set to false, for Orca set to true
177 178
 #define INVERT_E0_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
178 179
 #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
184 185
 #define Y_HOME_DIR -1
185 186
 #define Z_HOME_DIR -1
186 187
 
187
-#define min_software_endstops false //If true, axis won't move to coordinates less than HOME_POS.
188
-#define max_software_endstops false  //If true, axis won't move to coordinates greater than the defined lengths below.
188
+#define min_software_endstops true //If true, axis won't move to coordinates less than HOME_POS.
189
+#define max_software_endstops true  //If true, axis won't move to coordinates greater than the defined lengths below.
189 190
 #define X_MAX_LENGTH 205
190 191
 #define Y_MAX_LENGTH 205
191 192
 #define Z_MAX_LENGTH 200

+ 9
- 9
Marlin/stepper.cpp Voir le fichier

@@ -488,16 +488,16 @@ ISR(TIMER1_COMPA_vect)
488 488
         if (counter_x > 0) {
489 489
           WRITE(X_STEP_PIN, HIGH);
490 490
           counter_x -= current_block->step_event_count;
491
-          WRITE(X_STEP_PIN, LOW);
492 491
           count_position[X_AXIS]+=count_direction[X_AXIS];   
492
+          WRITE(X_STEP_PIN, LOW);
493 493
         }
494 494
   
495 495
         counter_y += current_block->steps_y;
496 496
         if (counter_y > 0) {
497 497
           WRITE(Y_STEP_PIN, HIGH);
498
-
498
+          counter_y -= current_block->step_event_count; 
499
+          count_position[Y_AXIS]+=count_direction[Y_AXIS];         
499 500
           WRITE(Y_STEP_PIN, LOW);
500
-
501 501
         }
502 502
       #endif
503 503
   
@@ -508,19 +508,19 @@ ISR(TIMER1_COMPA_vect)
508 508
         if ((counter_x > 0)&&!(counter_y>0)){  //X step only
509 509
           WRITE(X_STEP_PIN, HIGH);
510 510
           WRITE(Y_STEP_PIN, HIGH);
511
-          counter_x -= current_block->step_event_count;          
511
+          counter_x -= current_block->step_event_count; 
512
+          count_position[X_AXIS]+=count_direction[X_AXIS];         
512 513
           WRITE(X_STEP_PIN, LOW);
513 514
           WRITE(Y_STEP_PIN, LOW);
514
-          count_position[X_AXIS]+=count_direction[X_AXIS];
515 515
         }
516 516
         
517 517
         if (!(counter_x > 0)&&(counter_y>0)){  //Y step only
518 518
           WRITE(X_STEP_PIN, HIGH);
519 519
           WRITE(Y_STEP_PIN, HIGH);
520
-          counter_y -= current_block->step_event_count;          
520
+          counter_y -= current_block->step_event_count; 
521
+          count_position[Y_AXIS]+=count_direction[Y_AXIS];
521 522
           WRITE(X_STEP_PIN, LOW);
522 523
           WRITE(Y_STEP_PIN, LOW);
523
-          count_position[Y_AXIS]+=count_direction[Y_AXIS];
524 524
         }        
525 525
         
526 526
         if ((counter_x > 0)&&(counter_y>0)){  //step in both axes
@@ -553,8 +553,8 @@ ISR(TIMER1_COMPA_vect)
553 553
       if (counter_z > 0) {
554 554
         WRITE(Z_STEP_PIN, HIGH);
555 555
         counter_z -= current_block->step_event_count;
556
-        WRITE(Z_STEP_PIN, LOW);
557 556
         count_position[Z_AXIS]+=count_direction[Z_AXIS];
557
+        WRITE(Z_STEP_PIN, LOW);
558 558
       }
559 559
 
560 560
       #ifndef ADVANCE
@@ -562,8 +562,8 @@ ISR(TIMER1_COMPA_vect)
562 562
         if (counter_e > 0) {
563 563
           WRITE_E_STEP(HIGH);
564 564
           counter_e -= current_block->step_event_count;
565
-          WRITE_E_STEP(LOW);
566 565
           count_position[E_AXIS]+=count_direction[E_AXIS];
566
+          WRITE_E_STEP(LOW);
567 567
         }
568 568
       #endif //!ADVANCE
569 569
       step_events_completed += 1;  

+ 1
- 0
README.md Voir le fichier

@@ -44,6 +44,7 @@ Features:
44 44
 *   Updated sdcardlib
45 45
 *   Heater power reporting. Useful for PID monitoring.
46 46
 *   PID tuning
47
+*   CoreXY kinematics (www.corexy.com/theory.html)
47 48
 
48 49
 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.
49 50
 

Chargement…
Annuler
Enregistrer