Richard Arthur wrote:
> ini:
> http://www.pastebin.ca/644773
> hal:
> http://www.pastebin.ca/644774
> screen shot:
> http://imagebin.org/9721
> 
> Thanks,
> 
> Richard

The scope trace shows that the the home input to the motion controller
is true during the first slope - that means EMC thinks it is already
on the switch, and is trying to get off of it.

 From the HAL file:

# Connect limit/home switch outputs to motion controller.
newsig Xminlim bit
newsig Xmaxlim  bit
newsig Xhome bit
linksp Xminlim <= m5i20.0.in-00-not
linksp Xminlim => axis.0.neg-lim-sw-in
linksp Xmaxlim <= m5i20.0.in-01-not
linksp Xmaxlim => axis.0.pos-lim-sw-in
linksp Xhome <= m5i20.0.in-00
linksp Xhome => axis.0.home-sw-in

Note that the limit switch signal is connected to the -not pin.  That's
because your switches are active low.  But the home signal is connected
to the regular pin, not the -not one.  So EMC is confused about the
polarity of your home switch.

The solution is to connect EMC's home input AND its negative limit input
both to the -not driver pin.

However, you can't connect two signals (Xminlim and Xhome)  to one pin.
You can connect two or more pins to one signal.  I'd do it like this:

# Connect limit/home switch outputs to motion controller.
newsig Xminlim-and-home bit
newsig Xmaxlim  bit
linksp Xminlim-and-home <= m5i20.0.in-00-not
linksp Xminlim-and-home => axis.0.neg-lim-sw-in
linksp Xminlim-and-home => axis.0.home-sw-in
linksp Xmaxlim <= m5i20.0.in-01-not
linksp Xmaxlim => axis.0.pos-lim-sw-in

Since you are homing on the negative end of the axis, SEARCH_VEL must be
negative.  If you also make LATCH_VEL negative, it will home on the 
first index pulse outside the limit switch, which is probably not what 
you want.  Make LATCH_VEL positive.  Then the homing process will be:

1) negative slope at SEARCH_VEL until you hit the switch
2) positive slope at LATCH_VEL until you get off the switch
3) continue at the same positive slope until you hit the index
4) done

Regards,

John Kasunich




-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to