Novice Help - Same Song, Different Dance - Homing

More
26 Aug 2023 00:27 #278969 by Lethal69GTO
Evening/morning.  I have been trying to figure out homing on my own and am struggling, finally have to acquiesce throwing in the towel and asking for help.  I've read the various versions of the help docs about homing and looked at numerous threads here helping others with the same conundrum to no avail.

I have a Mesa 7i76E Axis configuration of X Y1 Y2 Z.  I have been trying to see if I could figure out and just get the X-axis to home and am striking out.  I have PNP proximity switches at all minimum positions acting as min limit and home switch and software max limits defined.  The PNP's LEDs are illuminated when not triggered, LED goes out when triggered.  The issue is when attempting to Home X the the proximity sensor LED goes out, HAL Meter shows the state change from FALSE to TRUE but X axis does not back off after the triggering event, it keeps on trucking in the neg dir.  I have to kill the power to the machine in Axis to stop further movement.  I turn the machine power via Axis back on, jog to pos dir, shut down LinuxCNC, and stare at the HAL and INI files, not sure where to go.

Attached is my "developer/experimental/learning" HAL and INI file.

Please help.  Thank you.

- Darryl

File Attachment:

File Name: AnotherTest.hal
File Size:14 KB

File Attachment:

File Name: AnotherTest.ini
File Size:8 KB
Attachments:

Please Log in or Create an account to join the conversation.

More
26 Aug 2023 01:04 #278971 by rodw
linuxcnc.org/docs/2.9/html/config/ini-ho...l#sec:homing-section
try:[JOINT_0]HOME_SEQUENCE = 1
[JOINT_1]HOME_SEQUENCE = -2
[JOINT_2]HOME_SEQUENCE = -2
[JOINT_3]HOME_SEQUENCE = 3

Please Log in or Create an account to join the conversation.

More
26 Aug 2023 01:09 #278972 by spumco
Your problem appears to be in HAL:
#net x-home-sw     =>  joint.0.home-sw-in
net x-home-sw     => [HMOT](CARD0).7i76.0.0.input-04
net x-neg-limit   =>  joint.0.neg-lim-sw-in
#net x-neg-limit    =>  [HMOT](CARD0).7i76.0.0.input-04
net x-pos-limit    =>  joint.0.pos-lim-sw-in

In the above snippet, the "#" means that whole line is commented out - thus not active.
So the result is that the "joint.0.home-sw-in" pin isn't connected in HAL to anything.

Try uncommenting those lines (remove the # symbol).  To check if it's working without running the machine, start LCNC and take it out of estop & enable the machine ("ON").

Then open halshow and add the above pins and signals to the watchlist.  You can then manually trigger your proxy and see if pin "joint.0.home-sw-in" activates when your proxy triggers.

If it doesn't, you may have to invert the signal by connecting to [HMOT](CARD0).7i76.0.0.input-04-not instead.

Same thing for the #net x-neg-limit line.  If you wish to use the same proxy for the negative limit, you'll have to uncomment that line as well.

Please Log in or Create an account to join the conversation.

More
26 Aug 2023 01:36 #278974 by Lethal69GTO
Thanks, but I already know the sequence numbering. My question pertained to specifically the X-axis and only the X-Axis not backing off after the proximity triggered.

Please Log in or Create an account to join the conversation.

More
26 Aug 2023 01:48 #278976 by Lethal69GTO

Your problem appears to be in HAL:
#net x-home-sw => joint.0.home-sw-in
net x-home-sw => [HMOT](CARD0).7i76.0.0.input-04
net x-neg-limit => joint.0.neg-lim-sw-in
#net x-neg-limit => [HMOT](CARD0).7i76.0.0.input-04
net x-pos-limit => joint.0.pos-lim-sw-in

In the above snippet, the "#" means that whole line is commented out - thus not active.
So the result is that the "joint.0.home-sw-in" pin isn't connected in HAL to anything.

Try uncommenting those lines (remove the # symbol).  To check if it's working without running the machine, start LCNC and take it out of estop & enable the machine ("ON").

Then open halshow and add the above pins and signals to the watchlist.  You can then manually trigger your proxy and see if pin "joint.0.home-sw-in" activates when your proxy triggers.

If it doesn't, you may have to invert the signal by connecting to [HMOT](CARD0).7i76.0.0.input-04-[b]not instead.

Same thing for the #net x-neg-limit line.  If you wish to use the same proxy for the negative limit, you'll have to uncomment that line as well.[/b]
 


Yes, I am firly certain it is the HAL file.  Yes, I know about the comment symbol too as I put them there - not wanting to lose the original syntax.  With the x-home-sw sig line enabled the homing sequence moves right, the positive direction.  With the line commented out the homing moves desired direction, left, to the proximity sensor.  As said, I see the proximity sensor state change in HAL.  I've tried the "-not" version too and there is no triggering event at all.  I am pretty sure I don't have the wiring defined correctly.  I *THINK* I have the correct "HOME" parameter settings in the INI file.

Please Log in or Create an account to join the conversation.

More
26 Aug 2023 02:07 #278977 by cmorley
Are you sure the basic axis direction is right? ie. jogging positively makes the axis move positively?

Linuxcnc's idea of axis direction must be right first.

Then limit switch state needs to be right.
ie. linuxcnc should start with the homing switch clear (false) unless it on the homing switch.

Then you confirm proper homing direction.

It's easy to get distracted by homing direction for instance when the problem is actually the homing switch state or the basic axis direction.

Please Log in or Create an account to join the conversation.

More
26 Aug 2023 02:37 - 26 Aug 2023 02:37 #278980 by rodw
You need to read homing configuration about 6 times before it becomes clear
linuxcnc.org/docs/2.9/html/config/ini-ho...tml#_homing_sequence
You need HOME_SEARCH_VEL and HOME_LATCH_VEL

There are four possible homing sequences defined by the sign of HOME_SEARCH_VEL and HOME_LATCH_VEL, along with the associated configuration parameters as shown in the following table. Two basic conditions exist, HOME_SEARCH_VEL and HOME_LATCH_VEL are the same sign or they are opposite signs. For a more detailed description of what each configuration parameter does, see the following section.
Last edit: 26 Aug 2023 02:37 by rodw.

Please Log in or Create an account to join the conversation.

More
26 Aug 2023 10:45 - 26 Aug 2023 10:47 #279005 by Lethal69GTO
Got it!  Thanks @rodw, @spumco, and @cmorley.  Revisted it this morning.  Amazing what a decent night's rest will do.  It was just a matter of getting the wiring correct in HAL as shown below (X-axis shown, others are similar, pin number is different). Simple as it turns out, but not so obvious initially.  @spumco you were correct with the -not, I had the incorrect pin in the watch window of HAL.  @rodw, I know exactly what you mean regarding the homing documentation, I understood content and once I got the correct wiring and it all worked it became an a-ha moment and it made all the sense in the world.  Now that it is working, I can tweak the settings a bit and dial in each axis.

# ---setup home / limit switch signals X-Axis---
#net x-home-sw     =>  joint.0.home-sw-in
net x-home-sw     =>  joint.0.home-sw-in <= [HMOT](CARD0).7i76.0.0.input-04-not
net x-neg-limit   =>  joint.0.neg-lim-sw-in
net x-pos-limit   =>  joint.0.pos-lim-sw-in

And the INI file home settings, each axis is the same.  I started with rather small (very slow, -0.5) HOME_SEARCH_VEL and once it worked without stepper slippage/grind/crash it became the value seen here.

HOME_SEARCH_VEL = -5.0
HOME_LATCH_VEL = 0.3
HOME_FINAL_VEL = 10
HOME_IGNORE_LIMITS = YES
HOME_OFFSET = 0
HOME = 10
HOME_IS_SHARED = 0
HOME_SEQUENCE = -2    <--- Except here.  X is 1, Y1 and Y2 is -2, and Z is 0

Thank you to the respondents. 
Last edit: 26 Aug 2023 10:47 by Lethal69GTO. Reason: Corrected HOME_SEARCH_VEL to negative value.
The following user(s) said Thank You: tommylight, rodw, spumco

Please Log in or Create an account to join the conversation.

Moderators: cmorley
Time to create page: 0.134 seconds
Powered by Kunena Forum