Using mechanical and ZRI/Proximity switches for homing a lathe

Moderator: cnckeith

ShawnM
Posts: 2190
Joined: Fri May 24, 2019 8:34 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 7804734C6498-0401191832
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Clearwater, FL

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

Post 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.
lavrgs
Posts: 485
Joined: Sat Aug 11, 2018 11:22 pm
Acorn CNC Controller: Yes
Plasma CNC Controller: No
AcornSix CNC Controller: No
Allin1DC CNC Controller: Yes
Hickory CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Oregon

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

Post 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...
ShawnM
Posts: 2190
Joined: Fri May 24, 2019 8:34 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 7804734C6498-0401191832
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Clearwater, FL

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

Post 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.
TCandee
Posts: 110
Joined: Sun Jun 17, 2018 2:42 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: C8FD19F6D5CF-0403180778
DC3IOB: No
CNC11: No
CPU10 or CPU7: Yes

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

Post 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
martyscncgarage
Posts: 9912
Joined: Tue Mar 28, 2017 12:01 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: Yes
CPU10 or CPU7: Yes
Location: Mesa, AZ

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

Post 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?
Reminder, for support please follow this post: viewtopic.php?f=20&t=383
We can't "SEE" what you see...
Mesa, AZ
TCandee
Posts: 110
Joined: Sun Jun 17, 2018 2:42 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: C8FD19F6D5CF-0403180778
DC3IOB: No
CNC11: No
CPU10 or CPU7: Yes

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

Post by TCandee »

see attached report and .hom file
Attachments
cnct.hom
(1.22 KiB) Downloaded 9 times
report_3484E41C151B-0601226279_2022-11-07_12-51-20.zip
(748.01 KiB) Downloaded 7 times
lavrgs
Posts: 485
Joined: Sat Aug 11, 2018 11:22 pm
Acorn CNC Controller: Yes
Plasma CNC Controller: No
AcornSix CNC Controller: No
Allin1DC CNC Controller: Yes
Hickory CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Oregon

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

Post 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"
ShawnM
Posts: 2190
Joined: Fri May 24, 2019 8:34 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 7804734C6498-0401191832
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Clearwater, FL

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

Post 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.
lavrgs
Posts: 485
Joined: Sat Aug 11, 2018 11:22 pm
Acorn CNC Controller: Yes
Plasma CNC Controller: No
AcornSix CNC Controller: No
Allin1DC CNC Controller: Yes
Hickory CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Oregon

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

Post 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
TCandee
Posts: 110
Joined: Sun Jun 17, 2018 2:42 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: C8FD19F6D5CF-0403180778
DC3IOB: No
CNC11: No
CPU10 or CPU7: Yes

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

Post 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
Post Reply