Edit Homing Macro?

Post anything you want to discuss with others about the software.

Edit Homing Macro?

Postby Parkgrr » Wed Aug 11, 2021 6:00 pm

Hi folks! Quick question:

I'm looking to edit the default homing macro. Any tips on editing or alternatively getting a copy of the default macro and making my own? I'm happy with the macro I just need to add one dependency to the beginning.

My machine runs using a carousel automatic tool changer located on the gantry, normally if I home with a tool loaded in the spindle it will crash into tool #1 and its tool cradle on the carousel as the homing sensor is on the same side as the carousel. My workaround has been to leave tool position #1 empty on the carousel and home the carousel axis first so when X goes to home there is nothing there. However that leaves me with an empty tool position on the carousel. I'd like to add a check to the beginning of the home all and home X macros that checks to see if a tool is loaded and puts it away if so (that way I can run one more tool in the changer).

I recognize there are other ways around this. However for simplicity making a more robust homing sequence come first.

Best
Last edited by Parkgrr on Wed Aug 11, 2021 6:06 pm, edited 1 time in total.
Parkgrr
 
Posts: 98
Joined: Mon Dec 07, 2020 9:12 am

Re: Edit Homing Macro?

Postby cncdrive » Wed Aug 11, 2021 6:04 pm

Homing is a built in function, you cannot edit that.
What you could do is you could replace the home button in the screen with the screen editor to a macro call button. (20000 to 20999 buttonnumbers)
and then pressing that button runs that macro. In the macro you can code what you want and you can call the home button code to do the homing routine.
If you stuck doing it then please let us know and my collegue Dezsoe will help you, he is on holidays now, but will be available next week.
cncdrive
Site Admin
 
Posts: 4887
Joined: Tue Aug 12, 2014 11:17 pm

Re: Edit Homing Macro?

Postby Parkgrr » Wed Aug 11, 2021 6:09 pm

Wow, fastest response in the west!
Excellent idea. That will work great thank you!
Parkgrr
 
Posts: 98
Joined: Mon Dec 07, 2020 9:12 am

Re: Edit Homing Macro?

Postby Parkgrr » Thu Aug 12, 2021 6:50 pm

One other question, my goal is to modify the behavior when pressing both the 'home all' button on UCCNC as well as the 'home' button on the UCR201. I'm realizing that the UCR201's buttons aren't modifiable outside of F1-F5. Because of the risk of a crash I can't have any buttons available to the user that will run the regular homing macro without this custom tool-loaded check. Any suggested workarounds? (I've modified my m99998 and m99999 macros pretty heavily, is there maybe any similar hacky way to inject some code before the homing macro fires?)
Parkgrr
 
Posts: 98
Joined: Mon Dec 07, 2020 9:12 am

Re: Edit Homing Macro?

Postby Battwell » Fri Aug 13, 2021 9:18 am

on my axyz with end of gantry rotary changer.
i moved the home switch outside the changer area. using prox switch and a long steel bar that is the proximity detection material .
. so if its inside the change area it auto backs out.
if its outside the changer it homes as normal.
after a tool change its first move is back over the safe area.
park position is also in the safe area.
Uc300eth on router and mill.
UK uccnc powered machine sales. https://cncrouter.uk/atc-cnc-routers.htm
Automateanything/duzzit cnc/mercury cnc
Battwell
 
Posts: 867
Joined: Sun Sep 25, 2016 7:39 pm
Location: South Wales. Uk

Re: Edit Homing Macro?

Postby Parkgrr » Tue Aug 17, 2021 8:07 am

Good workaround, thanks for getting back. I may take that route.
I love UCCNC but just slightly bummed that I'd have to do pretty significant machine modifications rather than just appending some code. Would be thrilled to have better control over homing macros for this and other reasons, or at the least inject code like M99998 + 9.
Parkgrr
 
Posts: 98
Joined: Mon Dec 07, 2020 9:12 am

Re: Edit Homing Macro?

Postby Blaise » Tue Aug 17, 2021 12:51 pm

Hi all,

For more precision, I would like my machine to first home to a limit sensor, then slow down and keep moving until it find the index position of the servo encoder.
Any suggestion on a way to achieve that with UCCNC?

Thanks!

- Blaise
Blaise
 
Posts: 81
Joined: Tue Jan 16, 2018 3:41 am


Return to General discussion about the UCCNC software

Who is online

Users browsing this forum: No registered users and 16 guests