Usage of 2 switches for homing

More
09 Oct 2020 17:24 - 09 Oct 2020 18:06 #185497 by mydani
Hi guys,

in a simple open loop stepper driven cnc machine w/o encoders on the axis,I want to home in the following manner:
* run in one direction until switch 1 is active (that's a mechanical switch)
* run slowly in the other direction until switch 2 is active (that's a high precision sensor reacting on a pin in the drive gear)

With encoder I would simply set home_use_index and be done...

But what can I do w/o encoder, especially on the HAL side of things?
Is it possible to have a 2-step homing, one macro for a rough homing (move until switch is active) and then manually start the "real" homing using the signals from the drive gear? Or maybe some fake encoder reset to 0 so home_use_index is possible?

This is similar to this thread:
forum.linuxcnc.org/49-basic-configuratio...is-when-homed#184723

But as I do not have any encoders I cannot fall back to the solution of this thread.

Best regards,
Daniel
Last edit: 09 Oct 2020 18:06 by mydani.

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

More
09 Oct 2020 20:26 #185504 by mydani
I found a solution for this, a little comp was all it needed.
Sorry to bother :)

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

More
09 Oct 2020 21:32 #185509 by tommylight
A bit more info on the solution would be nice for the next guy who might need this.
The following user(s) said Thank You: podarok

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

More
09 Oct 2020 21:35 #185512 by mydani
Hi Tommy,

I will upload the comp to this thread tomorrow, after I cleaned up my code a bit. :side:
The following user(s) said Thank You: Mike_Eitel, tommylight

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

More
09 Oct 2020 21:38 #185513 by tommylight
That would be great, thank you.

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

More
10 Oct 2020 10:27 #185586 by mydani
There you go, here's the home_index_stepdirlink to the comp . While I was at it, also added my changer components, and an oiler component which oils based on the way the guides have made (e.g. after 20 meters start the oiling cycle).

Regards,
Daniel
The following user(s) said Thank You: Mike_Eitel, tommylight, Aciera

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

Time to create page: 0.120 seconds
Powered by Kunena Forum