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

Initial 6 axis Support #1384

Merged
merged 18 commits into from
Apr 21, 2020
Merged

Initial 6 axis Support #1384

merged 18 commits into from
Apr 21, 2020

Conversation

tsmarks
Copy link
Contributor

@tsmarks tsmarks commented Apr 15, 2020

Added basic 6 axis features: DRO, Control
Added a 4th axis roughing strategy

As requested by creator, the DRO and Control panes can be removed/activated in the bCNC.ini file line: control.page = DRO abcDRO State Control abcControl

Initial 6 Axis support.  Modified __main__.py, bCNC.ini, CNC.py, and ControlPage.py
Updated _GenericController, GRBL0 and GRBL1
Not sure if GRBL0 is needed
Simple rotary roughing operation
Fix to ensure 3 axis controllers are not effected
There are no current 6 axis grbl 0.x releases. No need to alter this file from original
@Harvie
Copy link
Collaborator

Harvie commented Apr 15, 2020

Hello, thanks for your contribution. I still have to review the code, but i've tried to start your 6-Axis bCNC on my computer in both python2 and 3 and it seems to work. I also like the way you've separated additional axes into collapsible sections. Can you make it collapsed by default, so 3 axis users don't see it unless they click on it? So by default i looks like that:

image

@tsmarks
Copy link
Contributor Author

tsmarks commented Apr 15, 2020

Thanks. I just added the extra axis to my machine and have been working on software to support it. The first fix was reworking the grbl post processor for Fusion 360. Now I figured get this GUI to support the basics.

I can look into that the default state. I would assume, it would be even better to have the default bCNC.ini set to not display them at all. Let the minority that want the 6 axis edit the ini to add them back in.

13: control.page = DRO abcDRO State Control abcControl
if it is:
13: control.page = DRO State Control
they don't show at all

@Harvie
Copy link
Collaborator

Harvie commented Apr 15, 2020

Let the minority that want the 6 axis edit the ini to add them back in.

Good idea...

@Harvie
Copy link
Collaborator

Harvie commented Apr 16, 2020

BTW what is displayed on the canvas when you load 6 axis g-code into bCNC? I guess that might be a problem...

@tsmarks
Copy link
Contributor Author

tsmarks commented Apr 16, 2020

The visualization ignores the extra axis moves. So for 4th axis operations you see a 2d profile of all the moves parallel to the rotary and up and down in Z. It is useful for locating the job. Fusion 360 struggles to visualize multi-axis in the simulation too. I have thought about attacking the issue, but I fear it might be more resource intensive than people want bCNC to be. The canvas would need to be a true 3d viewer to really make it work.

@Harvie
Copy link
Collaborator

Harvie commented Apr 16, 2020

I fear it might be more resource intensive than people want bCNC to be. The canvas would need to be a true 3d viewer to really make it work.

Oh yes. These are two greatest problems of bCNC... I am considering porting it to OpenGL or something... But i am not really sure how to do it and if it can help. Some people say that even with OpenGL it will be still slow, because drawed shapes are preprocessed in python anyway...

@MARIOBASZ
Copy link
Contributor

Very good tool to be able to handle 6 axes, soon I will add rotary axes to my machine, so I hope to use what you have done, thank you very much !!
The bcnc canvas is certainly a critical point (trochoidal use, the gcode have too many lines, it gets too slow, and / or graphics incomplete).
Regards.

@tsmarks
Copy link
Contributor Author

tsmarks commented Apr 17, 2020

Mario,

I used a Arduino Mega with the Andy's CNC shield from Eccentric Workshop as a breakout and the GRBL build he provided too. I had to rewrite Fusion 360's GRBL post processor to work with multi-axis, but now everything works well. I have a few posts over on the Fusion forum with the new post processor if you want the code. I have successfully made a few 4th axis projects, but really needed this bCNC change to make it work smooth. Hand jamming gcode for moving and zeroing the 4th was not friendly and having no DRO was a pain. (Not insulting bCNC, VERY happy with it, and thankful for the code being opensource.)

@MARIOBASZ
Copy link
Contributor

@tsmarks, I have on my pc still not using a version of grbl 6 axes for mega, fusion360 I have not used it yet ... all my objects have been designed with bcnc. Another advance for bcnc to be able to handle 6 axes.

I think that if you add in the dro to be able to choose, when it is commanded with the direction arrows, if the movement is G0 (like now) or G1, it can be useful, for example to go cutting almost manually. Hugs.

@Harvie
Copy link
Collaborator

Harvie commented Apr 17, 2020

Can you please add some config checkbox for enabling 6axis mode? So i can merge this...

image

@Harvie
Copy link
Collaborator

Harvie commented Apr 17, 2020

Maybe it would make sense to add few mentions of 6axis capability to wiki. You should have write access:
https://github.com/vlachoudis/bCNC/wiki

@tsmarks
Copy link
Contributor Author

tsmarks commented Apr 19, 2020

I have added the check box in the config. I also added a few blurbs in the Wiki and added apage for the Spiral plugin.

Thanks for your interest in this.

@Harvie
Copy link
Collaborator

Harvie commented Apr 19, 2020

Looks good to me, i will merge this. Do you have something you want to add before merge?

@walterwissmann
Copy link

Many thanks to all to let more axis come to bCNC!

Walter

@tsmarks
Copy link
Contributor Author

tsmarks commented Apr 21, 2020

Harvie,
I can't think of anything. If anything come up I will revisit. Thanks!

@Harvie Harvie merged commit ebc5b85 into vlachoudis:master Apr 21, 2020
Harvie added a commit to Harvie/bCNC that referenced this pull request Apr 21, 2020
@Harvie
Copy link
Collaborator

Harvie commented Apr 21, 2020

Thank you for usefull feature! I hope the GUI will get bit more streamlined in the future. But i've never really worked on 6-axis machine, so i am not really aware about how that should look to be ergonomic...

@TNO-CODE
Copy link

Thank you from the bottom of my heart 💓 .
Thanks to everyone who had input with this ,can't wait to try more Axis as I've already ordered the parts .

@Harvie
Copy link
Collaborator

Harvie commented May 31, 2020

There is bug report claiming this had broken GRBLv1 compatibility... Can you please check it?
#1407

@Harvie
Copy link
Collaborator

Harvie commented Jun 24, 2020

@tsmarks also can you please take a look at this? #1426

STATUSPAT = re.compile(r"^<(\w*?),MPos:([+\-]?\d*\.\d*),([+\-]?\d*\.\d*),([+\-]?\d*\.\d*),WPos:([+\-]?\d*\.\d*),([+\-]?\d*\.\d*),([+\-]?\d*\.\d*),?(.*)>$")
POSPAT = re.compile(r"^\[(...):([+\-]?\d*\.\d*),([+\-]?\d*\.\d*),([+\-]?\d*\.\d*):?(\d*)\]$")
STATUSPAT = re.compile(r"^<(\w*?),MPos:([+\-]?\d*\.\d*),([+\-]?\d*\.\d*),([+\-]?\d*\.\d*),([+\-]?\d*\.\d*),([+\-]?\d*\.\d*),([+\-]?\d*\.\d*),WPos:([+\-]?\d*\.\d*),([+\-]?\d*\.\d*),([+\-]?\d*\.\d*),([+\-]?\d*\.\d*),([+\-]?\d*\.\d*),([+\-]?\d*\.\d*),?(.*)>$")
POSPAT = re.compile(r"^\[(...):([+\-]?\d*\.\d*),([+\-]?\d*\.\d*),([+\-]?\d*\.\d*),([+\-]?\d*\.\d*),([+\-]?\d*\.\d*),([+\-]?\d*\.\d*):?(\d*)\]$")
Copy link
Contributor

Choose a reason for hiding this comment

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

the new groups in the pattern are non-optional, aren't they? With my GRBL I get [PRB:-356.0,-5.28,-118.3,0.0:1], i.e. only 4 axes. What do I miss?

Actually, even the old pattern with only 3 coordinates is broken with my 4 axes GRBL.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Are you able to provide PR with fix please?

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Not tested yet.

Spent the afternoon hunting issues with z probing, giving wrong values. I hope this is was the root cause. Going to try now on real machine.

rar8000 pushed a commit to rar8000/bCNC that referenced this pull request Jul 21, 2023
rar8000 pushed a commit to rar8000/bCNC that referenced this pull request Jul 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants