# Machsupport Forum

## Mach Discussion => General Mach Discussion => Topic started by: gtonini on January 05, 2013, 11:37:06 AM

Title: 4 th axis rotation
Post by: gtonini on January 05, 2013, 11:37:06 AM
Hi

I' ve built my 4th axis rotary indexer not sure what I did wrong when I go into mdi and type in g0 a45 the indexer rotates full circles
not the 45 degrees. Ive specified. I saw somewhere on here to specifiy my a axis as rotational in general config but i cant find that setting any ideas please.

Thanks
Gary
Title: Re: 4 th axis rotation
Post by: Hood on January 05, 2013, 12:51:24 PM
Multiply  the steps per unit by 8 for the A and see if that helps.
Hood
Title: Re: 4 th axis rotation
Post by: gtonini on January 05, 2013, 12:58:05 PM
Just a question why would you multiply by 8 ?  If I have my stepper driver set to 1/16 wouldnt it be 16 ? Just asking ?

Thanks
Gary
Title: Re: 4 th axis rotation
Post by: Hood on January 05, 2013, 01:00:53 PM
You said it moves 360 degrees when you command a move of 45degrees. That means it is travelling 8 x too far so your steps per unit are 8 x too small.
Hood
Title: Re: 4 th axis rotation
Post by: gtonini on January 05, 2013, 01:33:44 PM
That changed it some my biggest problem is that I dont have any documentation for the motor I'm not sure if it is 200 steps per revolution or not is there any way to figure this out ? Thanks for your help !
Title: Re: 4 th axis rotation
Post by: Hood on January 05, 2013, 01:57:34 PM
Tell me a little about your setup, is the motor direct coupled to the rotary or is there gearing ? If geared what amount?
Hood
Title: Re: 4 th axis rotation
Post by: gtonini on January 05, 2013, 05:38:09 PM
I'm using a drive belt with 2 pulleys it is a 40 to 1 ratio .
Title: Re: 4 th axis rotation
Post by: Hood on January 05, 2013, 05:45:11 PM
Ok so in a rotary axis with 200 step per rev stepper and 1/8 stepping it would equal 177.7777777 steps per unit, for a 0.9 degree stepper( 400 per rev) it would be 355.555555
Meant to say the rotational axis setting is on General Config page.
Hood
Title: Re: 4 th axis rotation
Post by: gtonini on January 05, 2013, 06:14:44 PM
How should that setting should be set at ?  I tried the numbers you mentioned . If I tell the machine go  a45 I not sure how many revolutions the chuck rotates . I think the motor has some sort of weird steps  per revolution number. I have my stepper driver set at  1/16  steps . Is there any way I can use the calibration tool in Mach 3 to set this up?
Title: Re: 4 th axis rotation
Post by: Hood on January 05, 2013, 06:28:21 PM
If you have 1/16 setting then you would need either 355.5555 or 711.1111111 steps per unit.
Also make sure it is set as a rotational axis on Genral config page.
Hood
Title: Re: 4 th axis rotation
Post by: gtonini on January 05, 2013, 06:39:27 PM
I look at the rotation choices on the general config page there three options which do i want or am i looking in the wrong area ?rot 360rollover, angle short rotation on go ,rotational soft limits
Title: Re: 4 th axis rotation
Post by: Hood on January 05, 2013, 06:44:07 PM
Make sure this is set to angular, see pic.
Also you will likely want the 360 rollover but depends on how you will work.
Hood
Title: Re: 4 th axis rotation
Post by: gtonini on January 05, 2013, 07:05:08 PM
That is checked so I'm not sure what is going on has to be something wacky with the motor I tried 35.55 in steps it almost seemed that
this was closer that the other numbers I tried. God bless you for all your help and patience !
Title: Re: 4 th axis rotation
Post by: Hood on January 05, 2013, 07:07:44 PM
If you attach your xml I will take a look and see if there is an issue with it.
Are you sure your belt drive is 40:1 reduction as that seems quite a lot for a single belt reduction, would mean your driven pulley would have to have 40 times more teeth than the driver pulley.
Hood
Title: Re: 4 th axis rotation
Post by: Hood on January 05, 2013, 07:09:06 PM
Sorry my mistake you said two belts ::)
Even still thats quite a reduction.
Hood
Title: Re: 4 th axis rotation
Post by: gtonini on January 05, 2013, 07:13:11 PM
No it's only one belt
Title: Re: 4 th axis rotation
Post by: Hood on January 05, 2013, 07:15:00 PM
So that would mean if your driver pulley had 10 teeth your driven had 400? Seems a lot.
Hood
Title: Re: 4 th axis rotation
Post by: gtonini on January 05, 2013, 07:19:11 PM
No the main pulley has 40 and the small pulley has  10 and the belt is 40 teeth
Title: Re: 4 th axis rotation
Post by: Hood on January 05, 2013, 07:20:14 PM
Ah ok so 4:1 reduction that means the 35.55555 is the correct number :)
Hood
Title: Re: 4 th axis rotation
Post by: gtonini on January 05, 2013, 07:24:54 PM
I'm going to work more with this tomorrow . I truly appreciate you help so tomorrow I will use the 35.555 when I used this number it seemed that the rotation was rather slow.
Title: Re: 4 th axis rotation
Post by: gtonini on January 05, 2013, 07:26:58 PM
I was using a  velocity of 500 and  a  acceleration of 5
Title: Re: 4 th axis rotation
Post by: Hood on January 05, 2013, 07:31:11 PM
That means 500 units per min, one unit is 1 degree so that means it will take nearly 3/4 of a minute per rev.

Have a read of Greolts post here as it has some good info on rotary axis speed
http://www.machsupport.com/forum/index.php/topic,23361.0.html

Hood
Title: Re: 4 th axis rotation
Post by: gtonini on January 05, 2013, 07:42:55 PM
Thank you for all your help I'm sure I'll be back  for more help
Title: Re: 4 th axis rotation
Post by: Hood on January 05, 2013, 07:44:26 PM
No probs, there are plenty of people here with a wide range of knowledge so your questions are almost certain to get a reply :)
Hood