Page 2 of 3

Re: Using mechanical and ZRI/Proximity switches for homing a lathe

Posted: Sat Nov 05, 2022 3:41 pm
by ShawnM
That code is just an example, you need to adjust it for your machine. There are also other settings in the wizard that need to be set so the software doesn’t overwrite your CNC.hom file.

Re: Using mechanical and ZRI/Proximity switches for homing a lathe

Posted: Sun Nov 06, 2022 12:28 pm
by lavrgs
I've watched this thread for a while and the new activity got me to thinking that I should finish my install. My hesitation came from not completely understanding if the ALLIN1CHRIS' code is universal - based on his name I want to know if it will work on an Acorn install.
ShawnM wrote: Sat Nov 05, 2022 3:41 pm That code is just an example, you need to adjust it for your machine. There are also other settings in the wizard that need to be set so the software doesn’t overwrite your CNC.hom file.
What kind of adjustments would be required for a three axis mill? From looking at the code it appears that changing the 5000X to the proper channel would be one required change...

Re: Using mechanical and ZRI/Proximity switches for homing a lathe

Posted: Sun Nov 06, 2022 3:04 pm
by ShawnM
It is somewhat universal but changes would need to be made on a machine by machine basis since no two machines are setup the exact same. Yes, you'd need changes for the correct ZRI input, correct HomeAll input (the 5000X numbers as you pointed out), axis homing order and more importantly homing direction of each axis. All fairly simple code changes. Chris also gave a link in his post to understanding how to write your own macros and understand what the code means.

Re: Using mechanical and ZRI/Proximity switches for homing a lathe

Posted: Mon Nov 07, 2022 4:01 pm
by TCandee
Everything seems to be right in the code that I edited from Chris’s example. It matches what cnc12 produces for a standard .hom file with my setup in regards to the #5000 and inputs. It still will not stop when input 1, homeall, is triggered on x. It does on z however. Directions should not matter at this point since axis are not coupled yet.

Typed all of the above and did I final test and I received several fatal errors. Reinstalled cnc12, restored repot and all is working as expected. Thank you

Re: Using mechanical and ZRI/Proximity switches for homing a lathe

Posted: Mon Nov 07, 2022 4:31 pm
by martyscncgarage
TCandee wrote: Mon Nov 07, 2022 4:01 pm Everything seems to be right in the code that I edited from Chris’s example. It matches what cnc12 produces for a standard .hom file with my setup in regards to the #5000 and inputs. It still will not stop when input 1, homeall, is triggered on x. It does on z however. Directions should not matter at this point since axis are not coupled yet.

Typed all of the above and did I final test and I received several fatal errors. Reinstalled cnc12, restored repot and all is working as expected. Thank you
Can you please post a FRESH report?

Re: Using mechanical and ZRI/Proximity switches for homing a lathe

Posted: Mon Nov 07, 2022 4:54 pm
by TCandee
see attached report and .hom file

Re: Using mechanical and ZRI/Proximity switches for homing a lathe

Posted: Mon Nov 07, 2022 7:14 pm
by lavrgs
I'm trying to understand the code better - I don't know what the 9822 is...

IF !#[50000 + #9822] THEN M225 #100 "HomeAll switch tripped!!!\nPlease clear before Homing.\n\nPress Cycle Cancel to end Homing"

Re: Using mechanical and ZRI/Proximity switches for homing a lathe

Posted: Mon Nov 07, 2022 10:24 pm
by ShawnM
Do you have the macro programming manual? It will explain system variable and parameters. 9000-9999 are the system variables for parameters 0-999.

https://www.centroidcnc.com/centroid_di ... amming.pdf

Parameter 822 from the variable #9822 is the input assigned to "HomeAll" by the wizard.

Re: Using mechanical and ZRI/Proximity switches for homing a lathe

Posted: Wed Nov 09, 2022 10:13 am
by lavrgs
ShawnM wrote: Mon Nov 07, 2022 10:24 pm Do you have the macro programming manual? It will explain system variable and parameters. 9000-9999 are the system variables for parameters 0-999.

Parameter 822 from the variable #9822 is the input assigned to "HomeAll" by the wizard.
Yes I have the manual - my quick search for 9822 did not find a result. Now I see how to get there. I think I know just enough to understand what's going on with the homing file and I believe it will work for me. The basic Key seems to be knowing the order of axis homing and direction. Thanks to the comments in the "generic" homing file it makes it easier to understand.
Thanks

Re: Using mechanical and ZRI/Proximity switches for homing a lathe

Posted: Wed Nov 09, 2022 5:38 pm
by TCandee
I realize this is not a ZRI issue but it is related to why I could not get it to work.

I am not unable to open the wizard. I get a fatal error message stating that the wizard cannot open when a job is running or it is in MIDI mode. neither is true. reinstalled CNC12 again and restored the report with the same result