Please help me get this Homing Sequence Right

More
5 years 5 months ago #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 to join the conversation.

More
5 years 5 months ago #208872 by bevins
Use home ignore limits that will ignore the limit switch that is shared with home switch while homing.

INI FILE:
Code:
HOME_OFFSET=.5 HOME_IGNORE_LIMITS = YES

HAL File:
Code:
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

Please Log in to join the conversation.

More
5 years 5 months ago #208874 by Michael

eighthaxis wrote: 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.

Please Log in to join the conversation.

More
5 years 5 months ago #208886 by eighthaxis
Thanks for your guidance I will give it a try and report back.

Please Log in to join the conversation.

More
5 years 5 months ago #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

Please Log in to join the conversation.

More
5 years 5 months ago #208899 by bevins

eighthaxis wrote: 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:
Code:
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.
Code:
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.

Please Log in to join the conversation.

More
5 years 5 months ago #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.
Code:
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 to join the conversation.

More
5 years 5 months ago #208905 by tommylight
Code:
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
Code:
net both-home-y <= hm2_5i25.0.7i77.0.0.input-01

Please Log in to join the conversation.

More
5 years 5 months ago #208909 by bevins

tommylight wrote:

bevins wrote:

Code:
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.

Please Log in to join the conversation.

More
5 years 5 months ago #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 to join the conversation.

Time to create page: 1.153 seconds
Powered by Kunena Forum