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

Improve HPGL pen change logic #310

Closed
ithinkido opened this issue Aug 13, 2021 · 4 comments · Fixed by #316
Closed

Improve HPGL pen change logic #310

ithinkido opened this issue Aug 13, 2021 · 4 comments · Fixed by #316

Comments

@ithinkido
Copy link
Contributor

ithinkido commented Aug 13, 2021

It looks like you are calling a return to park position before each pen change. That is not a bad thing, but it is a bit of a strange way of doing it as the park position is the one that we set up in the config file, and it is not by default the point closest to the pen changer. Can I suggest that you only call move to park position before putting away the last pen, that is the SP0; command? For all other pen changes, simply put a PU; command before the pen change is called. This will mean that after the pen change the plotter will resume the last pen state before the change and that would be PU; It would still do an auto PU move before the pen change, even if you did not call it, but it would also then move to the last position before the pen change and try to first resume the last pen state (down) and leave a single dot with the new pen at the end of the old line before going to the new position.

@abey79 abey79 mentioned this issue Oct 13, 2021
10 tasks
@abey79
Copy link
Owner

abey79 commented Oct 13, 2021

@ithinkido What would be the right thing to do? My understanding is that the pen with go back to its previous position after a SP; command, so if I don't generate a homing command, it will go back to the end of the previous colour line. If the homing position is far from the pen carousel, both behaviours are weird/not very nice. However, if the homing position is near the carousel, the current behaviour is better. Do you have an idea on how to best deal with that?

@ithinkido
Copy link
Contributor Author

ithinkido commented Oct 13, 2021

I would just use PU; without co ordinates.

At the end of a layer when you call PU,SP.. it will automatically take the shortest path back to the pen changer. Once it has collected the pen it will travel back to the last position it was at before the pen change. This may or may not line up with start point of the next layer, but more that likely it will be close.

By using the define park position before a pen change you a grranteed to roll the paper out af far as possible, and at worst case, also drive the pen to the furthest point away from the pen carousel. The only possible bonus is if you get lucky you will drive the pen near the carousel, but you have still rolled the paper all the way out.

@abey79
Copy link
Owner

abey79 commented Oct 14, 2021

I agree that for rolling-paper-type plotter, PU is the best approach.

@ithinkido
Copy link
Contributor Author

ithinkido commented Oct 14, 2021

For a flatbed, park position will should (it is user defined , so it could be set anywhere) always be far away.

abey79 added a commit that referenced this issue Oct 15, 2021
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 a pull request may close this issue.

2 participants