Z Homing

  • notJamesLee
  • Away
  • Senior Member
  • Senior Member
More
07 Feb 2025 04:00 #320878 by notJamesLee
Z Homing was created by notJamesLee
Hi Friends,

 I am pulling my hair out with the Z portion of the homing sequence and could use some help. Currently i have my limit switch as the 'max-limit' for the Z axis. Prior to pressing Home All i am able to Jog the z axis and it works as expected (- is down, is up). 0 is max and -4 is min (this might be the root of my headache)When i press home all, it searches up and makes contact, backs off, and seems to continue through the switch in the positive direction. Per the homing configuration (linuxcnc.org/docs/2.7/html/config/ini-homing.html ) this shouldn't be happening because my search and latch vel are the same sign.

I should expect it to:
1- search up in the positive direction
2- make contact with the switch
3- back off in the negative direction
4- do the final touch of the switch at latch vel in the positive direction
5- the proceed down in the negative direction to the home location.

Instead what is happening is:
1- search up in the positive direction
2- make contact with the switch
3- unsure if its even backing off
4- goes in the positive direction past the limit switch and would crash the axis 

note in these ini/hal the home offset is set to 0 but it had been at -0.5 with the same behavior.   

File Attachment:

File Name: Cutter1_20...2-06.hal
File Size:14 KB
 

File Attachment:

File Name: Cutter1_20...2-06.ini
File Size:6 KB
Attachments:

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

More
07 Feb 2025 05:03 #320882 by PCW
Replied by PCW on topic Z Homing
At least at first glance, the hal/ini files seem OK

A halscope plot of Z position and home switch state
when homing would be helpful  for debugging.

(Perhaps triggered by the home switch state)

 

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

  • notJamesLee
  • Away
  • Senior Member
  • Senior Member
More
07 Feb 2025 05:07 #320883 by notJamesLee
Replied by notJamesLee on topic Z Homing
I had tried flipping the 'final vel' as a last ditch effort, with out reading that it would result in an error and it didn't change anything nor throw an error.

I didn't even realize that was possible. Let me see if I can figure out how to do that and post it here.

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

  • notJamesLee
  • Away
  • Senior Member
  • Senior Member
More
07 Feb 2025 06:03 #320887 by notJamesLee
Replied by notJamesLee on topic Z Homing
Okay, left to my own devices, late at night with little to no research this is the best i could do. 

I realized that i believe i can see it back off in the correct direction then for some reason just starts going into the positive direction (which is wrong)

This homing process started from -0.5"  
Attachments:

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

  • rodw
  • rodw's Avatar
  • Away
  • Platinum Member
  • Platinum Member
More
07 Feb 2025 08:56 #320895 by rodw
Replied by rodw on topic Z Homing
Here is an example from a recent config I did.
HOME_OFFSET = 8
HOME_SEARCH_VEL = 10
HOME_LATCH_VEL =  10
HOME_FINAL_VEL =  5
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1

Back to your points, 3 & 4 happen very quickly as it only backs up far enough to clear the switch so it is probably working fine
If you are going the wrong way at the end, invert the sign of FINAL_VEL
HOME_OFFSET defines the final position, in this case 8mm from the switch to give a safe margin. Sometimes I will use 0.5mm or similar if travel is limited.
The following user(s) said Thank You: notJamesLee

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

  • notJamesLee
  • Away
  • Senior Member
  • Senior Member
More
07 Feb 2025 15:48 #320917 by notJamesLee
Replied by notJamesLee on topic Z Homing
Thank you.

It all does happen fast, you'll see i had to move X (joint 0) way out so I could observe Z (joint 3) which errors out at 0.114

I swore i tried inverting that sign because i had the same idea. However, it didn't change the z motor going in the wrong direction after. I will try again here in an hour or so and update. 

Also reading 6.3 here (linuxcnc.org/docs/2.7/html/config/ini-homing.html) that value must be positive. Even though it didn't throw an error when i tried. I imagine it just take the absolute value of that number? It seems like i have to invert almost everything.

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

  • notJamesLee
  • Away
  • Senior Member
  • Senior Member
More
07 Feb 2025 20:47 #320936 by notJamesLee
Replied by notJamesLee on topic Z Homing
I've tried a bunch of more things. 

I noticed it could possibly be a wiring issue but that just flipped the directions so you'll notice that the scale now has a different sign. I thought maybe i was getting confused by the min/max and it largely operating in the negative domain so I just changed it to operate from 0 ->4 and the max is 4.

I also messed around with the 'home offset' alot. trying 0, 0.1, -0.1, 3.9, -3.9 and no dice, so its now at 0.The last thing i changed was 'home' in the section above as a last ditch effort. I changed it to 4. The logic is when it hits the switch it considers max that it should do its final approach thing, back off then consider that home and set the DRO to 4. This isn't what happens.

 I noticed that when Z is homing, as soon as it hits the switch the DRO changes to zero and not 4. This is the opposite of what we'd expect but clear I've fat fingered something. Attached is the latest .hal and .ini . 

side note: these motors give a lot of vibration and noise at slow speeds but it seems really nice and smooth at higher speeds (over 28 in/min) I'm not homing at these speeds but i don't know if this is just resonance and rattling as i still haven't anchored the machine yet or maybe settings i could look into. 
Attachments:

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

  • notJamesLee
  • Away
  • Senior Member
  • Senior Member
More
14 Feb 2025 17:18 #321566 by notJamesLee
Replied by notJamesLee on topic Z Homing
Hi Friends,

Circling back here.

I got my Z to home and jog the correct direction. I don't know what I had wrong but I tried a combination that worked and i am not going to touch it HAHA.

Thanks for your help.

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

Time to create page: 0.083 seconds
Powered by Kunena Forum