Limit Switches and One Way Jogging

21 Sep 2021 16:19 #221276 by gmr
Hi All,

I have a setup of an XY milling table to which I've attached stepper motors and position encoders.

I have fitted limit sensors at the extreme end of the travel for each axis, but rather than disabling the motor drivers when they are active, I want to configure it so that I can use the jog wheels to move out of the extreme position and back into normal mode. However, I don't want the table to be able to travel further in the direction that has reached the limit, i.e. I want the jogging to become uni-directional when the limit sensor is active.

It seems that soft limits might be a way to do this, but I don't have room to add home switches and the encoders are all incremental with no index pulse.

Thanks (and thanks to all the historic posters, I have learned much from studying this forum).



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

21 Sep 2021 18:07 #221282 by tommylight
No need for home switches, LinuxCNC can work with limits and use one side as a home also.
Pretty sure everything you require is already there, just needs to be set up in HAL.
Attaching the config files might help...

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

22 Sep 2021 13:24 #221341 by gmr
Thanks, my apologies, I misunderstood the excellent documentation, which is here for the next person:

I setup the joint section of the INI file like this:

# machine units are mm
HOME = 0

And the relevant bit of my HAL file looks like this:

# inputs from the Hall effect sensors
net x-limit-min <= hm2_7c81.0.gpio.038.in_not
net x-limit-max <= hm2_7c81.0.gpio.039.in_not

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

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

Time to create page: 0.058 seconds
Powered by Kunena Forum