Skip to content
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

Open
wants to merge 25 commits into
base: master
Choose a base branch
from

Conversation

armageddon421
Copy link
Collaborator

Most changes should be enclosed in #ifdefs. Please check.

@@ -385,7 +421,8 @@ static int gcode_process_command()
st_synchronize();

GET_ALL_AXES(current_position,float);
plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
printf("from G92\n\r");
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain this?

Copy link
Collaborator Author

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.

Copy link
Collaborator Author

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.

Copy link
Collaborator Author

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.

Copy link
Owner

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.

Copy link
Collaborator Author

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?

Copy link
Owner

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.

Copy link
Collaborator Author

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:

In src/gcode_parser.c:

@@ -385,7 +421,8 @@ static int gcode_process_command()
st_synchronize();

                GET_ALL_AXES(current_position,float);
  •               plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
    
  •               printf("from G92\n\r");
    

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.


Reply to this email directly or view it on GitHubhttps://github.com//pull/14/files#r3994832
.

Robert

@kliment
Copy link
Owner

kliment commented Apr 29, 2013

Okay, I'm going to add you as a contributor. You clean up the printfs and make the second config file and then you can merge it yourself once you feel it's ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants