For this homing tutorial, we’re using the exact same hardware as we used the quick start
video.
The only difference is the servo motor is now coupled to a linear slide with three proximity
sensors to give us over travel limits and a home signal, which I wired to these
pins on the I/O connector.
You would normally wire a homing start signal from your controller to a digital input to
initiate homing.
Or you could send a command via coms to start homing.
I didn’t do either of those here because we’re going to control homing from the drive
configuration software.
Could I have made this the positive limit?
Sure!
It just has to align with however you set up your directions in the drive configuration.
So let’s do that.
In the drive configuration software – which you can download for free from AutomationDirect.com
– I’ll select the drive I am using and hit the connect button.
I see the drive information pop up over here and this green blinky light down here so I
know I'm connected.
Let’s go to setup, and return to factory setting so you know exactly where I am starting
from.
Yes, we want to do that.
Give it a couple seconds.
Let’s also reset the drive’s controller to ensure we have a good clean start.
Yes, we want to do that.
Wait for it to re-connect and we are good to go.
Bring up the setup wizard.
Go on-line.
Yes, we want to read the parameters from the drive so when we write out the new ones we
don’t overwrite the drive with whatever this configuration software's default values
were.
We want to set up the encoder for auto, and we want to be in index mode.
Homing doesn’t make sense in velocity or torque modes and homing is handled by your
controller in pulse mode.
You could use homing in the mode where you start in index mode and then go to pulse mode.
This next screen is fine.
This rotation dialog is the key to getting homing to work because it defines the positive direction.
Right now it says a positive command will turn the shaft counter clockwise.
If I reach over and rotate our slides screw counter clockwise, we see the carriage moves
this way.
So this is the “positive” direction and this will need to be set up as the positive
limit switch in the digital I/O dialog when we get to it.
If we switch this, then a positive movement generates a clockwise rotation of the screw,
which is this way, and we would have to define this guy as the positive limit in the digital
I/O dialog.
That’s really important – your limit switches and direction definition have to be aligned
or homing won’t work.
For us, we’ll use this default direction which again, makes this the positive direction
so this guy will need to be the positive limit.
For this demo, we aren’t concerned with E-stop or braking so I’ll skip through that
stuff.
I’ll select the internal torque limit which is currently set to 300%.
That’s so the drive will limit how much torque can be applied if you slam the carriage
into one of the end stops, a foreign object gets bound up in the power transmission, or
if the material or product you are moving gets caught or stuck on something during the
move.
And normally, you will want to set it to something gentle like a 25 or 30 percent torque limit
when you first start out just in case something goes wrong.
We’re not using the position signals, so we can skip that.
Digital Inputs.
We’re not using a servo on signal because we’ll control that from the software.
We wired the home signal to Input 2 and it’s NPN.
We’re not using these.
We wired the over travel sensors to the default inputs seven and eight and in particular,
we need Pin 7 to be the positive over travel limit and Pin 8 to be the negative limit to
align with the direction we set up earlier.
Those are also NPN.
Limit and home switches should always be normally closed, that way if you get a break in the wire
the machine won’t run until you fix it.
We aren’t going to use the emergency stop in our demo where the shaft isn’t really
coupled to anything, but you will definitely want to add it and test it for use in your
system.
And we’re not going to use this either.
Outputs - I’ll turn all of these off except the Origin signal.
That tells us when homing thinks it’s done.
This is where you select the homing method.
We’re going to skip this page because we are going to use this button up here to bring
up this side menu where we can do the same configuration stuff and test homing at the
same time.
It even has this little reference diagram.
Unfortunately, these descriptions don’t show up over here, so I’m going to grab
a screen shot of the descriptions, so we have them handy later.
And we’re done!
Make sure the drive is disabled, and write the configuration to the drive.
Wait for the confirmation - there it is.
Normally I would save this to file, but we haven’t set up homing yet, so I’ll wait on that.
And don’t forget to do a soft reset of the controller after a write to ensure it has
a fresh start with the new parameters.
Wait for it to re-connect.
Got it.
Some parameters, like a mode change require a soft reset.
We make it a point to highlight the parameters that require a soft reset when we come across
them in all the videos.
In the setup wizard, The on-line button is dimmed.
That happens sometimes, so I’m gonna click away on several of these tabs just to force
the screen to refresh when I come back to the wizard.
Now we can get back on-line with the drive.
And yep, we want to read the drive parameters.
Before doing homing, let’s check everything out.
First, let’s test our sensors.
Bring up the inputs dialog.
If I hold a screw driver over what I think the positive limit should be – yep the positive
limit lit up.
Negative limit?
Yep.
And home sensor.
Perfect.
This carriage has two detection points which are also called flags or pawls or tags, etc.,
which means the home position will change depending on what we’re doing and which
of these hits the sensor first.
Now let’s go to jog.
Change the speed to something slow.
How about 120 revolutions per minute or two revs per second.
Don’t forget to hit enter to get that red number to take.
Enable the drive's output.
If I hold down the positive direction, yep the carriage goes left towards the
positive over-travel limit.
Negative direction, and it goes towards the negative over-travel limit.
Perfect, exactly what we wanted.
Everything seems to be working as expected, so now we just click on this guy to bring
up the homing dialog where we can configure and test homing.
Join me in Part 2 where we’ll walk through all the various homing options and demonstrate
them on this linear slide.
Meanwhile, click here to learn more about the LS Electric L7C Servo System.
Click here to learn about AutomationDirect’s free award-winning support options and click
here to subscribe to the channel and click the little bell icon so you will be notified
when we publish more videos like this one.
Add note about moving to zero position check box.
let’s try some of the homing methods by clicking on the homing dialog button.
Notice that when we switch away from JOG, the software automatically disabled the drives
output for us.
I’ll re-enable the drives output by clicking the Drive On button.
So this isn’t really a drive enable, it’s really a drive output enable or motor enable.
This dialog only gives us Homing Mode Numbers.
So I’ll flip back through the wizard to the homing screen so we can use this drop
down to see the text of what each homing mode is and we even get a little diagram.
Mode 1 says move in the negative direction – that’s this way for this system – at
this velocity and when it reaches the Negative Over Travel Limit, reverse the motor – that’s
this way for this slide – until the over travel limit goes away then find the first
encoder’s index pulse that’s a single pulse the encoder generates each revolution.
The drive will find the index, and then circle back at this slower marker search or some
people call it “creep speed” to stop right at the index.
I’m going to use these values for this first example to keep tings slow enough for you
to see them in the video.
[500,000, 100,000, 20,000,000 0 20,000,000] I don’t want to choose the mode here in
the wizard because this has to be written to the drive on another screen.
Instead I’ll enter mode 1 here which takes effect immediately.
We see the little diagram here to remind us what we selected.
Double check that the drive is enabled.
Normally your controller will toggle a digital input to start homing, but we can override
that by clicking this guy.
The motor ramps up to speed, and looks for the negative over travel limit.
When it finds it, it reverses direction until it is back off of the limit and then creeps
back to the encoder’s index at this slower marker search speed.
You can adjust all of these to suit your needs.
Mode 2 is the same thing but in the other direction.
I’ll hit the start homing button.
It moves in the POSITIVE direction this time – I’ll speed up the video to get us there
quicker - finds the POSITIVE Over Travel Limit, reverses out of the limit to the encoder’s
index pulse.
Homing on the encoder’s index pulse is mostly used when you have things like a rotary table
– it always gets the motor’s shaft – an therefore your rotary able - back to the exact
same starting position.
These all use the Home Sensor to locate home.
That’s for when you want to home to a position regardless of where the motor’s shaft is.
These are the positive move version of these.
We just did a positive direction homing move, so let’s use a negative direction move just
so we can send the carriage to the other end of the slide.
How about Mode 11.
It says, move in the negative direction – on our slide that’s this way - to the positive
edge of Home sensor, reverse direction and then creep to the encoder’s index pulse.
I’ll hit the Homing Start Button.
Yep, the carriage moved in the negative direction found the home sensor and backed up to the
first index pulse before the home sensor.
That was easy because the home sensor was ahead of us when we started homing.
What happens if the home sensor is behind us when we start homing?
We’ll, the diagram tells if we start moving in this direction with the home sensor behind
us, then when it hits the over travel limit, it will reverse direction, and to go find
the positive edge of the homing sensor and then creep to the next index pulse.
That’s important – the “Positive” edge it’s looking for ISN’T the rising
edge of the home sensor’s signal – it’s the rising edge of the home signal when the
carriage is traveling in the homing routine’s initial direction So even though the carriage
is moving this direction, the homing routines defined initial direction was this way, so
this is the positive edge that homing will be looking for.
Let’s try it.
Let’s go to jog and move the carriage past the sensor in the negative direction.
[500 20 20 0] There are two detection points on this carriage so we need to make sure both
are past the home sensor.
Go back to homing, re-enable the motor, and when we hit the homing start button we see
the carriage hits the limit, reverses.
We see the homing sensor light up but the carriage kept going until it found the positive
edge of the sensor which is actually the falling edge of the signal because the carriage was
moving this direction when it found it.
I know this is subtle, but if you think about it, it’s really great because it removes
all ambiguity.
You always know exactly where the carriage is going to stop.
Again, the Edge is always defined relative to the homing routines move direction.
The third case is this guy.
That is, if the homing move starts while the homing signal is active, then it will move
in the opposite direction until it sees the positive edge of the homing signal then it
will creep to the next encoder index pulse.
Again, just because homing started in the opposite direction doesn’t changing anything.
The normal starting direction for this move is this way, so this is the positive edge.
These are all permutations of that same move so we won’t dwell on those.
You can simply move to the next encoder index pulse, in either direction.
Again, using the encoder’s index pulse is a great way to home things like rotary tables.
Current position just says use the current position as the home position.
Nothing moves when you execute this homing method – it just sets the position register
to zero.
These four all use a hard stop to home.
That is they literally wait for the carriage to smash into something and then either stop
or back up to the nearest index pulse.
When using these, this torque limit and duration become available so you can specify how hard
of a hit the system has to take before declaring homing done.
I would recommend starting with a really small torque limit if you plan to use this one.
And finally, you can go to the home signal and just decelerate to a stop without reversing.
If you activate home again, it goes to the next home sensor activation.
You might use this with a rotary table where you know the home sensor is going to come
back around, or on something like we have with this linear slide.
For example, I’ll jog this guy so both of these detection points are to the right of
the sensor.
We want to home in the positive direction so I’ll choose method -6.
Enable the motor and hit home.
Sure enough the carriage goes to the positive edge of the home signal.
If I hit home again, it goes to the NEXT positive edge of the home signal.
All of the other methods, if you activate home after it’s homed, nothing happens.
These two will keep going to the next Home pulse.
Again making it ideal for rotary applications where you know the home pulse is going to
keep coming back around.
Well, that ought to be enough to get you started with homing.
Click here to learn more about LS Electric Servos.
Click here to learn about AutomationDirect’s free award-winning support options and click
here to subscribe to our YouTube channel and click the little bell so you’ll be notified
when we publish more videos like this one.