﻿Rotary indexing uses all the same concepts as the linear indexing that
we covered in the previous videos and it uses the same setup as the
quick start videos so I’m going to assume you are already familiar with all of that
and just focus this video on the things that are unique to rotary indexing.
The only hardware difference is I replaced the linear slide with this sprocket which has 36
teeth, so each tooth represents 10 degrees. That gives us a nice simple visual for the video.
Before doing any rotary moves, though, you need to make sure the drive is in rotary mode.
Let’s bring up the setup wizard and load the values from the drive.
Make sure we’re still in indexing mode – we are - and on the next screen, configure indexing
mode for rotary mode. That’s important – don’t miss that if you want to use rotary indexing.
Let’s change the rotation so the positive command makes the motor turn
clockwise – that will make things appear more natural in the video. I’m also going
to change the electronic gearing to give me 360 degrees per revolution to make our math easier.
Everything else is the same so we’ll write that to the drive.
Wait for confirmation, and we are good to go. There’s one more thing we need to do; the drive
needs to know where the rollover for each rotation occurs. So we need to go to the parameter page
under miscellaneous parameters and change the modulo parameter to 360 degrees
because that’s when we complete one full rotation. If you have a 10 to 1 gearbox
you will probably want to set the modulo factor to 3600 pulses per revolution
to correspond to when the gearbox’s shaft completes one full rotation.
The red is reminding us it hasn’t been written yet, so I’ll hit return.
If you go away and come back it's now the lighter red or orange-ish color which reminds
you it isn’t the default value. This modulo mode parameter doesn’t apply to the L7C servo.
So when doing rotary moves, make sure you do the following: In the setup Wizard,
select rotary motion, set up the rotation direction, and set up electronic gearing.
In the parameter page set parameter 0x240C to whatever modulus you need. For our example 360
is what we needed but yours might be different. And don’t forget to reset the controller or do a
power cycle after changing everything to make sure any loose ends are cleared out
and we have a good clean starting point. And I like to check one last time after the
controller reset to make sure my changes really did get written to the drive.
If something acts goofy, it’s probably because you forgot that step.
Back in the indexing screen we see there are five rotary modes.
Let’s do a quick example of each. Rotary absolute is just like the linear
absolute where it goes to the absolute position you specify, but there’s a catch.
The destination minus the starting position gives you the rotation direction.
So if the destination is larger than the starting position, the motor will rotate in the positive
direction. If the starting position is larger, then it rotates in the negative direction.
If we look at the jog screen, we see we are currently at position
zero because we just reset the system. We set up the electronic gearing so our
user units are 360 degrees per revolution. So if we do an absolute move to 90 degrees,
at 90 degrees per second, and accelerations of maybe 360 with just one iteration and then stop,
we expect this gear to move 90 degrees in the positive direction in about 1 second.
Bring up the digital input screen. Enable the servo, toggle start. Yep, the motor
moved to 90 degrees in about a second. Let’s tell that move to wait 500ms,
then go to Index 1 when it’s done. Set up Index 1 to be an absolute move
back to zero with the same velocities and accelerations, and then stop when it’s done.
I’m going to disable the servo, go to jog, and back off the 90 degrees a little bit.
So now when we hit start we expect the servo to got to absolute 90 degrees, wait half a second
then go in reverse to absolute zero because the starting position is larger than the destination.
Toggle start. And that’s exactly what it does.
What if we did 90 degrees to minus 90 degrees? Again, the math always gives you the answer.
Destination minus starting gives us -180 user units, so it will go in reverse.
But if we go from 90 to 270 – which is the exact same endpoints,
the rotation will be in the positive direction. So again, the sign of the commanded distance
always gives you the direction of rotation when doing absolute rotary moves.
Relative rotary moves work exactly the same. The sign of the distance tells you the direction
of rotation, except instead of absolute positions it’s always relative to where you are,
just like the linear version. If I disable the servo
and go to jog and change the starting position to something else, disable the servo, go back
to the digital window and re-enable the servo and toggle start, it goes forward 90 degrees
relative to where we were, but then back to absolute zero because we didn’t change that one.
Again, the key for both the absolute and relative moves is the sign of the distance tells you
the direction of rotation. And you can exceed a full revolution in either of these modes.
That is, if you start at 30 degrees and tell it to go to 2000 degrees,
the motor will rotate however many rotations it needs to get there.
Contrast that with the rotary shortest move option.
This guy always picks the shortest move which means
it will never move more than one full rotation. For example, let’s do a shortest move to 30
degrees and stop. Toggle start and our sprocket moved in the positive direction to 30 degrees.
Exactly what you would expect. Now let’s change that to a shortest move
going to 350 degrees. The absolute and relative moves would see the 350 is greater than the 30
and would rotate in the positive direction. In this shortest move mode, the drive sees there is a
quicker way to get there so it will automatically move in the negative direction. I’ll toggle start
and sure enough it took the shortest path. Because it will always take the shortest
path in this mode, the motor will never turn more than one rotation.
For example, suppose we tell it to go to 1450 degrees which is the same thing as 10 degrees.
The relative and absolute moves would spin the motor multiple times in this direction to
get there. But if we toggle start the shortest move just takes us right to the destination.
It’s important to remember that this will only work if you set the modulo factor
parameter 0x240C correctly. If things aren’t working, be sure to check that
and that you reset the controller after making the changes. It’s easy to forget to do both of those.
The final two moves simply force the direction to an absolute destination.
For example, we are currently at 10 degrees. If we select rotary positive and tell it to go to
360 degrees, and toggle start, we see the motor rotate in the forward direction to an absolute
360 or zero degrees. If we toggle start again, nothing happens because we are already there.
Finally, my usual reminder that any changes made in this indexing page
are only saved to the drives volatile memory, so if you want the drive to remember what you did
after a power cycle, don’t forget to save them to permanent memory by clicking on this guy.
That ought to be enough to get you started with the rotary index modes.
Click here to learn more about the LS Servo Systems. Click here
to learn about AutomationDirect’s free award-winning support options
and click here to subscribe to our YouTube channel and click that little
bell icon so you will be notified when we publish more videos like this one.