Bizarre Homing with new setup - Help! --solved --

More
05 Nov 2023 17:27 - 05 Nov 2023 22:32 #284641 by U2fletch
Have used Linuxcnc with another machine for years but never setup the limit switches, just used soft limits with no drama.
Making a new machine with Mesa 7i96S and the setup is progressing well, as far as jogging goes, and the wireless gamepad as jog pendant.

I have one limit/home switch for the X and Y axis on GPIO input pins 0 and 1. When I jog the machine and manually press the switch it stops, so I know they are working.
When I try to home the X Axis, the machine moves exactly 1", stops, then sets the home position to 0 on the display. It does not move towards the limit switch. I tried inverting the HOME_SEARCH_VELOCITY but it still moves in the same direction when I press home.

I am at a loss as to why the machine moves 1", then stops.  I have tried changing the HOME_OFFSET, and HOME numbers to see if they have any affect on the behavior. Nope.  And everywhere I've looked, if the axis goes the wrong way during home, invert the velocity. Does not change.

Attached are my .ini and .hal files.
Attachments:
Last edit: 05 Nov 2023 22:32 by U2fletch. Reason: Tagged topic as solved

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

  • rodw
  • rodw's Avatar
  • Away
  • Platinum Member
  • Platinum Member
More
05 Nov 2023 17:48 - 05 Nov 2023 17:49 #284648 by rodw
Replied by rodw on topic Bizarre Homing with new setup - Help!
Yu don't seem to have connected your home switches. You need something like
net x-home-sw <= my-pin
so that this line then connects it to the correct input
net x-home-sw => joint.0.home-sw-in
Last edit: 05 Nov 2023 17:49 by rodw.

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

More
05 Nov 2023 17:56 - 05 Nov 2023 18:00 #284650 by PCW
Replied by PCW on topic Bizarre Homing with new setup - Help!
On X and Y the switch hal pins are connected to motions limit pins but
not the home pins

To use both you need to select shared limits/homes in pncconf
 (or edit the hal/ini files making sure to select home is shared in the ini file
and in the hal file connect the the switch hal pins to both the joint limit and
joint home pins)
Last edit: 05 Nov 2023 18:00 by PCW.

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

More
05 Nov 2023 20:56 #284662 by U2fletch
Replied by U2fletch on topic Bizarre Homing with new setup - Help!
Thanks for the quick response.  So I changed the .hal file to 'net both-home-x    <=  [HMOT](CARD0).inm.00.input-00'
Then I added the line 'HOME_AXIS_IS_SHARED=1' to the .ini file.  I think that is what you were looking for.

After making these changes there is no difference in the motion. The Axis moves an inch and stops.  I am at a loss as to why the axis moves at all, or further if the home pins were not defined why does it stop at all? I would think it would take off and then crash, like you read happens to so many people.

I attached the current files to see if you have further insight.
Attachments:

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

More
05 Nov 2023 22:32 #284667 by U2fletch
Replied by U2fletch on topic Bizarre Homing with new setup - Help!
So ran PNCCONF with brand new config to test a few scenarios in the input pins section.  There are several options for home/limit/both that were not obvious to me which to choose. I landed on the correct combination though.
Here is the relevant portion of the .hal file:

# external input signals
# --- MIN-X ---
net min-home-x     <=  [HMOT](CARD0).inm.00.input-00
# --- MIN-Y ---
net min-home-y     <=  [HMOT](CARD0).inm.00.input-01

and

# ---setup home / limit switch signals---
net min-home-x     =>  joint.0.home-sw-in
net min-home-x     =>  joint.0.neg-lim-sw-in
net x-pos-limit     =>  joint.0.pos-lim-sw-in

And here is what the .ini file looks like for the X-axis in the Joint section:
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = -2
HOME_LATCH_VEL = -0.5
HOME_FINAL_VEL = 5
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES

This works fine now.  Thanks for your help!
 
Attachments:
The following user(s) said Thank You: Clive S

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

Time to create page: 0.075 seconds
Powered by Kunena Forum