Zeroing a Rotary Axis

Moderators: TomKerekes, dynomotion

Post Reply
jackgiz
Posts: 37
Joined: Wed Mar 08, 2023 3:37 am

Zeroing a Rotary Axis

Post by jackgiz » Fri Nov 08, 2024 5:01 am

Hi Tom,
I've been using my rotary axis and it's working pretty well. However, it's very manual to zero the Z Axis so I tried to write a couple of C programs. One to move to the X,Y,Z location of the rotary axis at the start and one to move to a tool change location, then to the touch plate to rezero the Z (bed level) and then back to the rotary axis Z zero. Most of the code works fine except when I zero the Z with the touch plate (bed level) and then try to move to the rotary Z zero. I can't simply move to a location (axis destination) because the length of the tool varies.

After i go through the touch plate routine I zero the Z DRO. How can I simply move up 2.5" to the rotary Z zero location and then reset the DRO to the new Z zero location? Seems like this should be pretty simple but I haven't had any luck.

Jack
Attachments
Rotary Tool Change.c
(2.44 KiB) Downloaded 14 times
Rotary Fixture X and Z zero.c
(2.13 KiB) Downloaded 13 times

User avatar
TomKerekes
Posts: 2676
Joined: Mon Dec 04, 2017 1:49 am

Re: Zeroing a Rotary Axis

Post by TomKerekes » Fri Nov 08, 2024 11:10 pm

Hi Jack,

I'm not sure I understand, but you can request the axis resolution (in counts/inch) then multiply 2.5 inches by the resolution and do a relative move of that many counts.

See the \C Programs\ToolTableSetDebug.c example for how to get axis resolution.
Regards,

Tom Kerekes
Dynomotion, Inc.

jackgiz
Posts: 37
Joined: Wed Mar 08, 2023 3:37 am

Re: Zeroing a Rotary Axis

Post by jackgiz » Sat Nov 23, 2024 1:13 am

Hi Tom,
Thanks for the info. I got my rotary axis and positioning working. The ToolTableSetDebug.c helped a lot.

I did have trouble trying to do:

GetMachine(&Machinez);

I finally realized I needed to use:

GetMachine(&Machinex, &Machiney, &Machinez, &Machinea, &Machineb, &Machinec);

My program is working but I was wondering is there a simple way to just get the Z axis position vs getting all of the axis?

Jack

User avatar
TomKerekes
Posts: 2676
Joined: Mon Dec 04, 2017 1:49 am

Re: Zeroing a Rotary Axis

Post by TomKerekes » Sat Nov 23, 2024 1:18 am

Hi Jack,
I was wondering is there a simple way to just get the Z axis position vs getting all of the axis?
No there isn't. Why would you want to get only one when you can get all for the same price. :)
Regards,

Tom Kerekes
Dynomotion, Inc.

Post Reply