Page 1 of 1

Zeroing a Rotary Axis

Posted: Fri Nov 08, 2024 5:01 am
by jackgiz
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

Re: Zeroing a Rotary Axis

Posted: Fri Nov 08, 2024 11:10 pm
by TomKerekes
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.

Re: Zeroing a Rotary Axis

Posted: Sat Nov 23, 2024 1:13 am
by jackgiz
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

Re: Zeroing a Rotary Axis

Posted: Sat Nov 23, 2024 1:18 am
by TomKerekes
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. :)