Please help me get this Homing Sequence Right

More
14 May 2021 23:07 #208871 by chris@cnc
Yes.
another idea if you wire your limit switch to second input you have limit and reference switch in one.

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

More
14 May 2021 23:25 - 14 May 2021 23:39 #208872 by bevins
Use home ignore limits that will ignore the limit switch that is shared with home switch while homing.

INI FILE:
HOME_OFFSET=.5
HOME_IGNORE_LIMITS = YES

HAL File:
net both-home-x     <=  hm2_7i92.0.7i76.0.0.input-08-not

net both-home-x        =>  joint.1.home-sw-in
net both-home-x       =>  joint.1.neg-lim-sw-in

When homing this will ignore the limit switch and use it for home switch. Then offset off of it for HOME_OFFSET=.5

Then it will work.

/EDIT: HOME_SEARCH_VEL should not be 0 neither should HOME_LATCH_VEL
Last edit: 14 May 2021 23:39 by bevins.
The following user(s) said Thank You: eighthaxis

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

More
14 May 2021 23:39 #208874 by Michael

Of course it should stop on the limit switch no one wants a crash.
So in halshow I watch: hm2_5i25.0.encoder.00.input-index
while manually jogging the axis and it just stays on a red indicator.
Do all encoders have this index mark?


The machine should not crash when homing if it is homing to a limit switch. The machine will go to the switch and stop. It will just recognize it as the home switch instead of the limit (limit would cause a fault). Then it will proceed through the latch process.

Not all encoders have a z pulse. What type of encoder are you using?

Your hal is not connected to the home switch from what i see. This needs to be connected to a switch:
net z-home-sw => joint.2.home-sw-in
Should connect to something like:
net z-home-sw <= hm2_5i25.0.7i77.0.0.input-03

Also I would ignore index to pulse for now and just get the homing function correct. Looking through your last ini it also looked like you have joint 2, the z axis looking for a home switch at the bottom of its travel or close to the table. Specifically for joint 2 what would you like for the axis to do when homing?

With the above ini this is what you are asking for it to do for joint 2 when homing:
HOME = 0.0 14.0
MIN_LIMIT = -0.001
MAX_LIMIT = 16.0
HOME_OFFSET = -0.050 16.050
HOME_SEARCH_VEL = 1
HOME_LATCH_VEL = 1 -.1
HOME_FINAL_VEL = 0.1 1
HOME_IGNORE_LIMITS = NO YES
HOME_SEQUENCE = 0
HOME_USE_INDEX = YES No

Search for home switch in the positive z direction: HOME_SEARCH_VEL = 1

When it finds the home switch it assumes that switch is actually at the bottom of the negative direction: HOME_OFFSET = -0.050

But you haven't turned off the limit switch, or connected the home switch in hal so it faults at a limit switch: HOME_IGNORE_LIMITS = NO

Even if that was corrected once it reached the home switch it thinks it is at the lower end of the scale when it is actually at the top of its travel. Try making the changes in red and connect the home switch in your hal file to the correct pin.
The following user(s) said Thank You: eighthaxis

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

More
15 May 2021 03:16 #208886 by eighthaxis
Thanks for your guidance I will give it a try and report back.

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

More
15 May 2021 04:53 #208890 by eighthaxis
OK Michael I followed your instructions and received the following:

Debug file information:
Note: Using POSIX realtime
./Bostomatic.hal:173: Pin 'hm2_5i25.0.7i77.0.0.input-01' was already linked to signal 'both-y'
2669
Stopping realtime threads
Unloading hal components
RTAPI_PCI: Unmapped 65536 bytes at 0x7fb63f594000
Note: Using POSIX realtime
Attachments:

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

More
15 May 2021 10:14 - 15 May 2021 10:17 #208899 by bevins

OK Michael I followed your instructions and received the following:

./Bostomatic.hal:173: Pin 'hm2_5i25.0.7i77.0.0.input-01' was already linked to signal 'both-y'


You didnt follow his instructions.
You have:
net y-home-sw     <= hm2_5i25.0.7i77.0.0.input-01
net both-y     <=  hm2_5i25.0.7i77.0.0.input-01

You can't do that.

You have a switch on both ends. Pos limit and negative limit. So you need to share one of them with Home, but you need an input for both limit switches.So you have positive limit switch share the input with home switch and you have a negative limit switch but it needs its own input. I randomly selected input-08 for y-neg-limit, You need to select an input your not using.

Here is how you do that.
net      y-pos-home     <= hm2_5i25.0.7i77.0.0.input-01
net      y-neg-limit       <= hm2_5i25.0.7i77.0.0.input-08        

net      y-pos-home     => joint.1.home-sw-sw-in
net      y-pos-home     => joint.1.pos-lim-sw-in
net      y-neg-limit      => joint.1.neg-lim-sw-in

Do that for all your axis that has limit switch on both ends.
Last edit: 15 May 2021 10:17 by bevins.

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

More
15 May 2021 10:26 #208901 by bevins
Dont get caught up with signal naming. It doesnt really matter but what does matter is what you connect to it.
Thes two examples do the exact same thing.
Example 1:
net      y-pos-home     <= hm2_5i25.0.7i77.0.0.input-01
net      y-neg-limit       <= hm2_5i25.0.7i77.0.0.input-08        

net      y-pos-home     => joint.1.home-sw-sw-in
net      y-pos-home     => joint.1.pos-lim-sw-in
net      y-neg-limit       => joint.1.neg-lim-sw-in



Example 2:
net      my-foot-hurts     <= hm2_5i25.0.7i77.0.0.input-01
net      y-neg-limit         <= hm2_5i25.0.7i77.0.0.input-08        

net     my-foot-hurts     => joint.1.home-sw-sw-in
net     my-foot-hurts     => joint.1.pos-lim-sw-in
net      y-neg-limit        => joint.1.neg-lim-sw-in

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

More
15 May 2021 12:01 - 15 May 2021 17:04 #208905 by tommylight
net y-home-sw     <= hm2_5i25.0.7i77.0.0.input-01
net both-y     <=  hm2_5i25.0.7i77.0.0.input-01

All that should be
net both-home-y   <= hm2_5i25.0.7i77.0.0.input-01
Last edit: 15 May 2021 17:04 by tommylight.

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

More
15 May 2021 12:55 - 15 May 2021 12:57 #208909 by bevins

net y-home-sw     <= hm2_5i25.0.7i77.0.0.input-01
net both-y     <=  hm2_5i25.0.7i77.0.0.input-01


Thats what he has already. I wasnt telling him to do that.

Last edit: 15 May 2021 12:57 by bevins.

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

More
15 May 2021 14:35 #208915 by eighthaxis
To be even more clear the positive and negative limit switches on each axis are connected to the same physical input for that axis.
So even though there are 8 limit switches ( 2 each on axis XYZ) and 1 for each rotary axis they are only using a total of 5 inputs on the Mesa Card.

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

Time to create page: 0.097 seconds
Powered by Kunena Forum