-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added rudimentary support for delta printers #14
base: master
Are you sure you want to change the base?
Changes from 15 commits
16f56d1
7ad0730
c686a41
add2998
a6848e5
f4dee8f
90aba45
051bca2
803d24b
fcc0ac7
938ddbb
bdbfa9a
92d8798
7de66ea
cf122ee
cf1e006
818d71f
710d4d7
fcc2b85
1477add
ac606b8
20ecbe6
431d9db
507d91c
fd5049a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,7 +37,7 @@ | |
//// Calibration variables | ||
//----------------------------------------------------------------------- | ||
// X, Y, Z, E steps per unit | ||
#define _AXIS_STEP_PER_UNIT {80, 80, 3200/0.8,700} | ||
#define _AXIS_STEP_PER_UNIT {29.0909, 29.0909, 29.0909,700} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not really happy with the config defaulting to the delta settings. Can you change them back? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you want, we can keep the delta version as a different branch. I can try to maintain it, at least for a while. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could also add a second configuration file as kind of an example for delta printer configurations. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would recommend making it a separate sample config file that can be copied onto the original one There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay I'll do this. So no seperate branch then? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, I think a second example config file is easier to maintain |
||
|
||
#define _AXIS_CURRENT {128, 128, 128, 128, 128} | ||
#define _AXIS_USTEP {3, 3, 3, 3, 3} | ||
|
@@ -47,7 +47,7 @@ | |
//----------------------------------------------------------------------- | ||
//The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins. | ||
//If your axes are only moving in one direction, make sure the endstops are connected properly. | ||
#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors | ||
//#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors | ||
|
||
//If your axes move in one direction ONLY when the endstops are triggered, set [XYZ]_ENDSTOP_INVERT to true here: | ||
#define _X_ENDSTOP_INVERT false | ||
|
@@ -56,58 +56,61 @@ | |
|
||
//#define ENDSTOPS_ONLY_FOR_HOMING // If defined the endstops will only be used for homing | ||
|
||
#define _MIN_SOFTWARE_ENDSTOPS false; //If true, axis won't move to coordinates less than zero. | ||
#define _MIN_SOFTWARE_ENDSTOPS true; //If true, axis won't move to coordinates less than zero. | ||
#define _MAX_SOFTWARE_ENDSTOPS true; //If true, axis won't move to coordinates greater than the defined lengths below. | ||
|
||
//----------------------------------------------------------------------- | ||
//// ENDSTOP INPUT ACTIV: 1 --> Active // -1 --> NO ENDSTOP | ||
//----------------------------------------------------------------------- | ||
#define X_MIN_ACTIV 1 | ||
#define X_MAX_ACTIV -1 | ||
#define X_MIN_ACTIV -1 | ||
#define X_MAX_ACTIV 1 | ||
|
||
#define Y_MIN_ACTIV 1 | ||
#define Y_MAX_ACTIV -1 | ||
#define Y_MIN_ACTIV -1 | ||
#define Y_MAX_ACTIV 1 | ||
|
||
#define Z_MIN_ACTIV 1 | ||
#define Z_MAX_ACTIV -1 | ||
#define Z_MIN_ACTIV -1 | ||
#define Z_MAX_ACTIV 1 | ||
|
||
//----------------------------------------------------------------------- | ||
// Disables axis when it's not being used. | ||
//----------------------------------------------------------------------- | ||
|
||
#define _DISABLE_X_EN false | ||
#define _DISABLE_Y_EN false | ||
#define _DISABLE_Z_EN true | ||
#define _DISABLE_Z_EN false | ||
#define _DISABLE_E_EN false | ||
|
||
//----------------------------------------------------------------------- | ||
// Inverting axis direction | ||
//----------------------------------------------------------------------- | ||
#define _INVERT_X_DIR false | ||
#define _INVERT_Y_DIR false | ||
#define _INVERT_Z_DIR true | ||
#define _INVERT_Z_DIR false | ||
#define _INVERT_E_DIR false | ||
|
||
//----------------------------------------------------------------------- | ||
//// HOMING SETTINGS: | ||
//----------------------------------------------------------------------- | ||
// Sets direction of endstops when homing; 1=MAX, -1=MIN | ||
#define X_HOME_DIR -1 | ||
#define Y_HOME_DIR -1 | ||
#define Z_HOME_DIR -1 | ||
#define X_HOME_DIR 1 | ||
#define Y_HOME_DIR 1 | ||
#define Z_HOME_DIR 1 | ||
|
||
//Move all axis until the first endstop is hit. Should be enabled for Delta printers. | ||
#define QUICK_HOME | ||
|
||
//----------------------------------------------------------------------- | ||
//Max Length for Prusa Mendel, check the ways of your axis and set this Values | ||
//Check the ways of your axis and set these Values | ||
//----------------------------------------------------------------------- | ||
#define _X_MAX_LENGTH 200 | ||
#define _Y_MAX_LENGTH 200 | ||
#define _Z_MAX_LENGTH 100 | ||
#define _X_MAX_LENGTH 700 | ||
#define _Y_MAX_LENGTH 700 | ||
#define _Z_MAX_LENGTH 700 | ||
|
||
//----------------------------------------------------------------------- | ||
//// MOVEMENT SETTINGS | ||
//----------------------------------------------------------------------- | ||
#define _MAX_FEEDRATE {400, 400, 2, 45} // (mm/sec) | ||
#define _HOMING_FEEDRATE {1500,1500,120} // (mm/min) !! | ||
#define _MAX_FEEDRATE {400, 400, 400, 45} // (mm/sec) | ||
#define _HOMING_FEEDRATE {2000,2000,2000} // (mm/min) !! | ||
#define _AXIS_RELATIVE_MODES {false, false, false, false} | ||
|
||
|
||
|
@@ -118,9 +121,9 @@ | |
#define _ACCELERATION 1000 // Axis Normal acceleration mm/s^2 | ||
#define _RETRACT_ACCELERATION 2000 // Extruder Normal acceleration mm/s^2 | ||
#define _MAX_XY_JERK 20.0 | ||
#define _MAX_Z_JERK 0.4 | ||
#define _MAX_Z_JERK 20.0 | ||
#define _MAX_E_JERK 5.0 | ||
#define _MAX_ACCELERATION_UNITS_PER_SQ_SECOND {5000,5000,50,5000} // X, Y, Z and E max acceleration in mm/s^2 for printing moves or retracts | ||
#define _MAX_ACCELERATION_UNITS_PER_SQ_SECOND {5000,5000,5000,5000} // X, Y, Z and E max acceleration in mm/s^2 for printing moves or retracts | ||
|
||
//For the retract (negative Extruder) move this maxiumum Limit of Feedrate is used | ||
//The next positive Extruder move use also this Limit, | ||
|
@@ -212,4 +215,43 @@ | |
|
||
|
||
|
||
|
||
|
||
//=========================================================================== | ||
//============================== Delta Settings ============================= | ||
//=========================================================================== | ||
|
||
#define IS_DELTA | ||
|
||
// Make delta curves from many straight lines (linear interpolation). | ||
// This is a trade-off between visible corners (not enough segments) | ||
// and processor overload (too many expensive sqrt calls). | ||
#define DELTA_SEGMENTS_PER_SECOND 200 //200 | ||
|
||
// Center-to-center distance of the holes in the diagonal push rods. | ||
#define DELTA_DIAGONAL_ROD 492.0 // mm | ||
|
||
// Horizontal offset from middle of printer to smooth rod center. | ||
#define DELTA_SMOOTH_ROD_OFFSET 267.0 // mm | ||
|
||
// Horizontal offset of the universal joints on the end effector. | ||
#define DELTA_EFFECTOR_OFFSET 45.0 // mm | ||
|
||
// Horizontal offset of the universal joints on the carriages. | ||
#define DELTA_CARRIAGE_OFFSET 15.0 // mm | ||
|
||
// Effective horizontal distance bridged by diagonal push rods. | ||
#define DELTA_RADIUS (DELTA_SMOOTH_ROD_OFFSET-DELTA_EFFECTOR_OFFSET-DELTA_CARRIAGE_OFFSET) | ||
|
||
// Effective X/Y positions of the three vertical towers. | ||
#define SIN_60 0.8660254037844386 | ||
#define COS_60 0.5 | ||
#define DELTA_TOWER1_X -SIN_60*DELTA_RADIUS // front left tower | ||
#define DELTA_TOWER1_Y -COS_60*DELTA_RADIUS | ||
#define DELTA_TOWER2_X SIN_60*DELTA_RADIUS // front right tower | ||
#define DELTA_TOWER2_Y -COS_60*DELTA_RADIUS | ||
#define DELTA_TOWER3_X 0.0 // back middle tower | ||
#define DELTA_TOWER3_Y DELTA_RADIUS | ||
|
||
|
||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This messed up the separation between cartesian and delta coordinate space. The printf was to find out where the change came from, then I just commented the disturber out. I just noticed this mysel and I am changing the plan_set_position function to do the necessary calculations. Also, I will clean up the printfs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not really happy with changing the plan_set_position to reacalculate the delta position.
This would only work well for x=y=0, because otherwise the delta calculations would assume wrong xy-positions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess I'll Ignore the command if x and y are not zero or the current values or something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, that's no good for cartesian setups. It's used quite a lot. Delta users are going to expect the same functionality I guess, but we definitely should not be breaking it for cartesian.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Of course. Least I can do is add #ifdef. What exactly is it used for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
G92 is used to set position after manually moving the machine. A number of people with no endstops use it for homing (adjust position by hand or with G1 commands and then issue G92). It's used to restart a partially failed print by setting the last known printer position. It's also used (on E) to set filament position to a known value after changing filament mid-print. Other than the restart function all of these are possible with x=y=0. That limitation on delta would be better than making it a no-op.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm breaking my head over how to avoid incostistencies in behaviour.
If I force it to xy zero and the user entered something other than 0, The
printer will just move to the center with the next G1 X0 Y0 instead of the
set position. If I do the recalculations anyways, the delta coordinate
space might be messed up. If I ignore the command for xy != 0, well
obviously the command is ignored... Which is what the user least expects.
However, if it is really only used to set "sane" positions and not to set
an offset or something, this could maybe used to continue prints - even on
delta printers. Decisions, decisions,...
On Mon, Apr 29, 2013 at 10:21 AM, kliment [email protected] wrote:
Robert