The SureServo 2 has a bunch of different homing modes, which can be a little intimidating,
but once you see the basics, it all falls into place.
So, in this video, we’ll do a quick example using this SureServo 2 drive,
connected to this SureServo 2 motor, which I attached to this linear slide with these proximity
switches that we’ll use for travel limits. The proximity sensors are wired back to the
SureServo 2 drive like this which are the default inputs for limit switches.
I also have a toggle switch wired like this to enable the servo motor.
Let’s do a factory reset so you know exactly where I am starting from. And we always power
cycle the drive after a factory reset to make sure any residual settings get cleared out.
The limit switch inputs are set up like this. These are the factory defaults that correspond
to the wiring of digital inputs 6 and 7 so we don’t need to do anything for these parameters.
Notice that these are NPN sensors with normally closed outputs.
If you have normally open sensors, then you will probably want to invert these values like this.
Let’s make sure we wired everything correctly by going to parameter 0.002 and setting it to a 39.
If I put a piece of metal in front of this sensor I get the forward limit alarm and if
I press the M key, I can see that digital input 7 is set which by default is the positive limit.
I can also test the servo on switch while I am here. Yep. Looks good.
If I test the other limit switch I get the negative limit alarm and if I press the M key
I see that is being caused by bit 6. Perfect. So we know this is the positive limit
and this is the negative limit. But is this the positive direction? Let’s JOG
the motor to find out by going to parameter 4.005 and setting it to a reasonable speed,
400 rpm should be fine for this guy. Oops! The drive is telling me I forgot to turn the servo on.
Let’s enable the servo and try that again. Up arrow to jog in the forward direction. Great,
we're moving towards the positive limit. That’s good. Down arrow to go in the negative direction
and we go towards the negative limit. Perfect, everything is set up correctly. If your limit
switches are backward you could either move them, re-wire them or just swap the parameter values.
You can do homing from the drive's keypad but we’re going to use the free SureServo 2 Pro
software because it will be much easier for you to see what’s going on. There are videos showing
you how to use the software so I’m going to assume you are already familiar with it.
I’ve already connected to the drive and we see we’re on-line.
Read the servo information, yep it’s all there. Homing on the SureServo 2 drive is specifically
for finding the home position for the register position mode. So I’ll click on this guy,
select position register mode, and write it out. The software reminds us to power cycle the drive
after a mode change. That really is important – the new mode doesn’t get fully initialized
until a full power cycle is complete. And of course, the software lost connection with
the drive during the power cycle so we need to click on this guy reconnect to the drive.
Now we go down to the position register mode to configure it. There’s a whole video dedicated
to setting up all of these paths in position register mode. Notice that the paths start at path
1. The only thing that video doesn’t cover is homing which is dedicated to path 0.
There are 11 different homing methods. Let’s start with this one. It just says we are going to home
in the forward direction – that’s this way on our linear slide - until we see the positive limit
sensor activate. And if that’s all we do, then define that limit as the origin. We can modify
that to retreat to the last Z pulse and set that as the origin, or forward to the net Z pulse and
set that as the origin, or to do nothing and just leave the positive limit as the origin.
For this demo, let’s return to the last Z pulse and set that as the origin.
When I say “Z-pulse” I’m referring to a pulse the motor’s encoder generates once per revolution.
It’s a quick and easy way to get things lined up exactly the same way every time.
And when we hit a limit report an error. That’s cool because you could then feed that alarm to a
digital output so you can monitor when the limit is hit during homing, for example.
We have two speeds to adjust, the first one is when we are looking for the positive limit – let’s
use that same 400 RPM we used earlier to jog. We enter 4000 because there is an implied
decimal here. We’ll slow down to a quarter of that speed for the trip back to the last Z pulse.
This stuff down here is all loose ends. What do we want to do after homing? We don’t
want to do anything yet, but we could jump to any path to start our process.
These set the acceleration and deceleration times that go with these speeds. How much a delay do you
want before starting the next path. Should homing start immediately after power-up? And once the
origin is found, what value do you want to set it to? Zero is fine for us, but if you needed an
offset, this is where you would put it. Let’s write all of that to the drive.
That’s it. So when I tell it to run path 0 – the homing path – we expect this carriage to move in
the forward direction until it sees the positive limit, it should then ramp down, reverse, and then go
find the last Z pulse on the motor’s encoder at quarter speed. And then ram down from there.
Make sure the servo is enabled and execute path zero by hitting this button.
Sure enough, the carriage moves towards the positive limit, sees it, ramps down, then ramps
back up to quarter speed until it sees the next Z pulse and then ramps down.
And if I bring up the encoder count display,
we see we are at this many encoder counts to the right of the Z pulse.
That’s important – remember – homing finds the origin; the motor still has to ramp down after
that, so the motor doesn’t stop at the origin after homing. If you need to start your process
right at the origin, then have homing jump to a path that does an absolute move to the origin.
Let’s have path 1 do a simple point-to-point absolute move to the origin.
Write that to the drive. And execute path 1. Sure enough, the carriage moves to exactly 0.
Again, to automate that you would put path 1 – or whatever path you used – right here and
homing will automatically execute that when it is done finding the origin.
The other homing modes are just variations of this theme.
You can do exactly what we just did except head in the reverse direction
until you see the negative limit. Most of the time though, you will
want to avoid hitting the limit sensors and instead, add a third sensor to mark the origin.
You would put that third sensor where you want the origin to be, wire it into a digital input,
and assign that digital input the origin code. These are the parameters that control the digital
input’s function, so you would assign a 24 hex to the digital input you wired the sensor to.
So when you select one of these, the drive will look for that digital input
to decide where the origin is. And you can do it on the rising edge in
either direction or the falling edge of the sensor in either direction.
You can also just look for the nearest Z pulse in either direction – again that’s the single
pulse the encoder sends out each rotation. You can look for a collision in either direction. That is,
the drive can sense when it hits bumpers like these and call that the origin.
Some folks call that a positive stop or a mechanical limit or a home to hard stop. Regardless, you will
want to make sure you do homing very slowly when using the collision detection method.
And finally, you can simply set the current position as the origin.
Let’s look for the nearest Z pulse in the reverse direction. Notice there are
no longer any Z-pulse options that make sense because we are going directly to Z.
Let’ write that out. Looks good. Run homing. Do it again. Do it again, and again and
again. So each time I run homing it looks for the next Z pulse. Exactly what we expect.
The rest of the options all work basically
as they did in our first example. That’s really all there is to homing.
Just remember that homing finds the origin – it doesn’t move the motor to the origin.
Also, when changing homing modes, if things don’t work as expected,
try power cycling the drive after changing the mode. That will usually clean up loose ends and
get things working the way you expect. Click here to learn more about the SureServo 2 system and to find more tutorial videos. Click here to subscribe to our
YouTube channel so you will be notified when we publish new videos and click here
to learn about all of AutomationDirect’s free award-winning support options.