Postprocessor for Stepcraft 420 + UC-CNC + UC100

Here's the place for discussion related to CAM/CNC and the development of the Path module.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
PapaAtHome
Posts: 55
Joined: Mon Dec 31, 2018 6:45 pm

Postprocessor for Stepcraft 420 + UC-CNC + UC100

Post by PapaAtHome »

For some time I've been working with a Stepcraft 420 machine using UC-CNC software for the GCode and a UC100 communication device.
For this line I have created a post processor in FreeCAD.

More correct to say is that I changed the linuxcnc_post.py script done by sliptonic.
While I did quite a few changes I cannot claim copyrights, only be the maintainer for my version.

UC-CNC has one outstanding missing feature (next to some other minor ones)
It does not support G20/G21 codes so changing 'on the fly' between inches or mm is a no-no.

I tested this version on FreeCAD 0.17 but also have used it on 0.18 and 0.19

Have fun, if there are any questions, drop me a message and I will see what I can do.

Kind regards,
Andre.
Attachments
Stepcraft420UCCNC_post.py
(36.22 KiB) Downloaded 80 times
Kind regards, Andre.
chrisb
Veteran
Posts: 54280
Joined: Tue Mar 17, 2015 9:14 am

Re: Postprocessor for Stepcraft 420 + UC-CNC + UC100

Post by chrisb »

Thanks for contributing. Do you mind creating a pull request?
PapaAtHome wrote: Tue Mar 23, 2021 2:19 pm It does not support G20/G21 codes so changing 'on the fly' between inches or mm is a no-no.
I don't think it's a serious restriction. You either model in inches or metric, but hardly ever in both. And it is no restriction at all if you generate the code anyway.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
PapaAtHome
Posts: 55
Joined: Mon Dec 31, 2018 6:45 pm

Re: Postprocessor for Stepcraft 420 + UC-CNC + UC100

Post by PapaAtHome »

chrisb wrote: Tue Mar 23, 2021 3:38 pm Thanks for contributing. Do you mind creating a pull request?
I don't mind but how should I create a pull request? (I have no previous experience with that.)
(edit: Working on a pull request. I'm having a look at https://forum.freecadweb.org/viewtopic.php?t=3781 for this.)

chrisb wrote: Tue Mar 23, 2021 3:38 pm
PapaAtHome wrote: Tue Mar 23, 2021 2:19 pm It does not support G20/G21 codes so changing 'on the fly' between inches or mm is a no-no.
I don't think it's a serious restriction. You either model in inches or metric, but hardly ever in both. And it is no restriction at all if you generate the code anyway.
True, I fully agree. But to be sure I included checks in the post processor.

By the way, there is more comment than code in the script and a substantial part of the code is about checking conditions. ;)

Andre.
Last edited by PapaAtHome on Tue Mar 23, 2021 4:25 pm, edited 1 time in total.
Kind regards, Andre.
chrisb
Veteran
Posts: 54280
Joined: Tue Mar 17, 2015 9:14 am

Re: Postprocessor for Stepcraft 420 + UC-CNC + UC100

Post by chrisb »

PapaAtHome wrote: Tue Mar 23, 2021 4:06 pm I don't mind but how should I create a pull request? (I have no previous experience with that.)
Kunda1, can you help? Git and I havent really made friends yet.
Kunda1 wrote: pinged by pinger macro
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
PapaAtHome
Posts: 55
Joined: Mon Dec 31, 2018 6:45 pm

Re: Postprocessor for Stepcraft 420 + UC-CNC + UC100

Post by PapaAtHome »

chrisb wrote: Tue Mar 23, 2021 4:22 pm
PapaAtHome wrote: Tue Mar 23, 2021 4:06 pm I don't mind but how should I create a pull request? (I have no previous experience with that.)
Kunda1, can you help? Git and I havent really made friends yet.
Kunda1 wrote: pinged by pinger macro
Working on it. I'm a SVN man and not particularly good friends with Git as well.
Kind regards, Andre.
jbraun
Posts: 253
Joined: Fri Sep 18, 2020 5:41 pm

Re: Postprocessor for Stepcraft 420 + UC-CNC + UC100

Post by jbraun »

So to switch between imperial and metric the software needs to be restarted with a different machine definition instead of using G20/G21 at the head of a program ? An unusual limitation but probably no bother to most users. I would be a bit surprised if UCCNC doesn't error/alert on unknown gcodes
In any case it's good to have the post check for those codes.
For English help on youtube check out Joko Engineering or Mango Jelly Solutions.
Look for recent videos, this software is updated at a rapid pace.
chrisb
Veteran
Posts: 54280
Joined: Tue Mar 17, 2015 9:14 am

Re: Postprocessor for Stepcraft 420 + UC-CNC + UC100

Post by chrisb »

PapaAtHome wrote: Tue Mar 23, 2021 4:28 pm I'm a SVN man
So am I!
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
PapaAtHome
Posts: 55
Joined: Mon Dec 31, 2018 6:45 pm

Re: Postprocessor for Stepcraft 420 + UC-CNC + UC100

Post by PapaAtHome »

jbraun wrote: Tue Mar 23, 2021 4:37 pm So to switch between imperial and metric the software needs to be restarted with a different machine definition instead of using G20/G21 at the head of a program ? An unusual limitation but probably no bother to most users. I would be a bit surprised if UCCNC doesn't error/alert on unknown gcodes
In any case it's good to have the post check for those codes.
Not realy, UC-CNC has the 'normal' response of ignoring the GCode in total.

But if you start using inches in stead of mm you will get something that is 25 times bigger than what you expected.
That is why I try to check and at least give a warning.
Kind regards, Andre.
User avatar
PapaAtHome
Posts: 55
Joined: Mon Dec 31, 2018 6:45 pm

Re: Postprocessor for Stepcraft 420 + UC-CNC + UC100

Post by PapaAtHome »

chrisb wrote: Tue Mar 23, 2021 4:22 pm
PapaAtHome wrote: Tue Mar 23, 2021 4:06 pm I don't mind but how should I create a pull request? (I have no previous experience with that.)
Kunda1, can you help? Git and I havent really made friends yet.
Kunda1 wrote: pinged by pinger macro
I was using https://forum.freecadweb.org/viewtopic.php?t=3781 as a guide for my actions and this is what I did.
Since I'm doing this for the first time I will give full details on what I did. If I missed something or did the wrong thing, give me a note.

Created a public git repository at https://github.com/papaathome/FreeCAD_work/ and filled it with pull from https://github.com/FreeCAD/FreeCAD

Created a branch https://github.com/papaathome/FreeCAD_w ... tprocessor from the master branch.

Then I created a local sanbox on my PC and cloned the uccnc_postprocessor branch.
I added the post processor script and in the process renamed it 'uccnc_post.py' since the 'Stepcraft' part in the name is totally irrelevant.
This I committed and pushed to git hub.

The git hup site shows my last action and I can find uccnc_post.py in the branch.

The next step is not clear for me. What must I do to initiate a pull request?
Kind regards, Andre.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Postprocessor for Stepcraft 420 + UC-CNC + UC100

Post by Kunda1 »

Better instructions are on our wiki page called Github. Looks like you are 90% there.
All you need to do is:
1. Make sure you're in the correct branch. Changing branches if need be:
Illustrating how to change to a different branch in the Github interface
Illustrating how to change to a different branch in the Github interface
Github-how-to-change-branches.png (68.33 KiB) Viewed 3202 times
2. Making the Pull Request against FreeCAD master branch
Once in the correct branch you can press the Pull Request link in the Github UI
Once in the correct branch you can press the Pull Request link in the Github UI
Github-Make-a-PR.png (28.03 KiB) Viewed 3202 times
3. Fill out the Pull Request template add a summary of your commit, link to the forum discussion and add an 'X' in between the square brackets for steps you have completed. The markdown format must be precise.

Code: Select all

- [x]  (correct)

- [ x] (incorrect)
- [x ] (incorrect) 
[x]    (incorrect)
-[x]   (incorrect)
4. Press the 'Create Pull Request' button
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Post Reply