Homing using index signal

503 views
Skip to first unread message

Matthew Hertel

unread,
Feb 9, 2015, 6:53:07 PM2/9/15
to machi...@googlegroups.com
Hi Machine Group,

I am looking for help setting up homing with index signals on a 5 axis machine.  Currently, the machine setup I use homes with just hall sensors, because the machine does not  repeat a home position better than +-.002" I want to use the index pulse available on the encoder IC.  I am currently using Austria Microsystems AS5311 encoder and have the 5 axis wired out to individual pins.  I really just need help coding the index pins setup into the .hal file and wherever else it might need to be.  

X index p9.41
Y index p9.25
Z index p9.26
A index p9.42
B index p9.31

Thanks for the help! 

Matthew Hertel

Charles Steinkuehler

unread,
Feb 9, 2015, 8:24:06 PM2/9/15
to Matthew Hertel, machi...@googlegroups.com
I'm helping Matthew with this, but have a few questions for the group:

IIRC, index homing uses some sort of special I/O pin to handle the
request/acknowledge handshake with the HAL layer. Is this true (and is
it required that indexing work this way)?

What's the best choice for an example configuration that uses index
based homing?

--
Charles Steinkuehler
cha...@steinkuehler.net

signature.asc

jmo...@pmiautomation.com

unread,
Feb 9, 2015, 8:43:59 PM2/9/15
to Charles Steinkuehler, Matthew Hertel, machi...@googlegroups.com
Some of the servo configs may use index homing. Should be just as simple as neting the IO to axis.n.index-enable‎ normally it would go thru an hal encoder. Not sure how it would work without the a & b pins but worth a shot.



Sent from my BlackBerry 10 smartphone on the Rogers network.
  Original Message  
From: Charles Steinkuehler
Sent: Monday, February 9, 2015 8:24 PM
To: Matthew Hertel; machi...@googlegroups.com
Subject: Re: [Machinekit] Homing using index signal
--
website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit
---
You received this message because you are subscribed to the Google Groups "Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to machinekit+...@googlegroups.com.
Visit this group at http://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.

Kirk Wallace

unread,
Feb 9, 2015, 9:18:48 PM2/9/15
to machi...@googlegroups.com
On 02/09/2015 05:24 PM, Charles Steinkuehler wrote:
... snip
> IIRC, index homing uses some sort of special I/O pin to handle the
> request/acknowledge handshake with the HAL layer. Is this true (and is
> it required that indexing work this way)?
>
> What's the best choice for an example configuration that uses index
> based homing?
>

I've used index homing without thinking much about it. I don't have a
normal configuration so my config file would not help. But I believe one
needs to HAL connect A, B and Z to an encoder component, then set the
.ini file setting to Yes.

From the LinuxCNC docs:
"
HOME_USE_INDEX = NO - If the encoder used for this axis has an index
pulse, and the motion card has provision for this signal you may set it
to yes. When it is yes, it will affect the kind of home pattern used.
Currently, you can’t home to index with steppers unless you’re using
stepgen in velocity mode and PID.
"

My guess is that the index pulse is normally much smaller and more
accurate than a home switch, on both signaling on and off. With the
index flag enabled, the more accurate index will be used for triggering
and the home switch for enabling the trigger. For instance while backing
off during the homing sequence, the index trigger could turn off within
the width of the index, maybe .0001", whereas the home switch might need
.01", or more with a switch with hysteresis (Hall sensor). I think one
could just wire the index sensor and home switch in an AND
configuration, but I think the separate two input method, with index and
home, is smarter.

Maybe. (looking at the source might shed light on it)

--
Kirk Wallace
http://www.wallacecompany.com/machine_shop/
http://www.wallacecompany.com/E45/

Kirk Wallace

unread,
Feb 9, 2015, 9:21:32 PM2/9/15
to machi...@googlegroups.com
Oops, I forgot to add the link to the reference I made below.:
http://linuxcnc.org/docs/html/config/ini_homing.html#_home_use_index

Kirk Wallace

unread,
Feb 9, 2015, 9:24:38 PM2/9/15
to machi...@googlegroups.com

jmo...@pmiautomation.com

unread,
Feb 9, 2015, 9:39:28 PM2/9/15
to Charles Steinkuehler, Matthew Hertel, machi...@googlegroups.com
Charles,

Here is a little work around andy gave someone a while back. May be useful on this one.


http://linuxcnc.org/lucid/emc2/index.php/russian/forum/10-advanced-configuration/27102-fail-to-homing-mechanical-switch--index-pulse


Sent from my BlackBerry 10 smartphone on the Rogers network.
  Original Message  
From: jmo...@pmiautomation.com
Sent: Monday, February 9, 2015 8:43 PM
To: Charles Steinkuehler; Matthew Hertel; machi...@googlegroups.com

Kirk Wallace

unread,
Feb 9, 2015, 10:06:48 PM2/9/15
to machi...@googlegroups.com
On 02/09/2015 06:39 PM, jmo...@pmiautomation.com wrote:
> Charles,
>
> Here is a little work around andy gave someone a while back. May be useful on this one.
>
>
> http://linuxcnc.org/lucid/emc2/index.php/russian/forum/10-advanced-configuration/27102-fail-to-homing-mechanical-switch--index-pulse

This gets a little tricky. I think this fix is for a system that uses
index with two non standard features: steppers and homing on a limit
switch. Index homing was designed with servos with encoders and a home
switch separate from a limit. I haven't studied the details of this
particular setup, so I may be wrong on some of this, but the point is,
if one deviates from normal setups, one is going to need to read and
understand the integrator documentation and likely the source code.
Or... ask a lot of questions on the e-mail list or forum.

andy pugh

unread,
Feb 10, 2015, 6:03:08 AM2/10/15
to Charles Steinkuehler, Matthew Hertel, machi...@googlegroups.com
On 10 February 2015 at 01:24, Charles Steinkuehler
<cha...@steinkuehler.net> wrote:
> IIRC, index homing uses some sort of special I/O pin to handle the
> request/acknowledge handshake with the HAL layer. Is this true (and is
> it required that indexing work this way)?

The easy version of index homing just needs you to enable it in the
INI for the axis in question.
This assumes that the axis position feedback is from the encoder, and
that the encoder counter component index-enable pin is netted to the
axis.N.index-enable pin (and, to avoid bumps, to the
pid.N.index-enable)

The way this works is that on hitting the home-switch the index-enable
pin is set by the motion component, then when index is seen the
encoder counter component resets the index-enable pin and
(importantly) zeros the encoder counts. On the next servo-period the
motion component sees the change in index-enable state and uses the
encoder counts (which is probably non-zero again by this point) as an
absolute measure of the current distance from the home position.
(Thinking about it, it doesn't actually have to do anything with this
information, it all works out).

Using the encoder index in this way requires an encoder component that
resets index-enable on seeing the index. I don't _think_ it is
technically necessary for the encoder to be counting a/b pulses, it
would still work as a simple latch. However the encoder counter does
need to be running fast enough to be able to spot the very short index
pulse.

I think it would be possible to use the software encoder counter with
only the index connected as long as homing was slow enough to always
catch the pulse. PRU encoders and actual position feedback just makes
it better.

--
atp
If you can't fix it, you don't own it.
http://www.ifixit.com/Manifesto
Reply all
Reply to author
Forward
0 new messages