Limit Switches and One Way Jogging
21 Sep 2021 16:19 #221276
by gmr
Limit Switches and One Way Jogging was created 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).
Greg
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).
Greg
Please Log in or Create an account to join the conversation.
- tommylight
-
- Away
- Moderator
-
Less
More
- Posts: 18563
- Thank you received: 6220
21 Sep 2021 18:07 #221282
by tommylight
Replied by tommylight on topic Limit Switches and One Way Jogging
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...
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
Replied by gmr on topic Limit Switches and One Way Jogging
Thanks, my apologies, I misunderstood the excellent documentation, which is here for the next person:
linuxcnc.org/docs/html/config/ini-homing.html
I setup the joint section of the INI file like this:
# machine units are mm
[JOINT_0]
HOME = 0
HOME_OFFSET = 150
HOME_SEARCH_VEL = 8
HOME_LATCH_VEL = 0.25
HOME_FINAL_VEL = 8
HOME_IGNORE_LIMITS = YES
HOME_USE_INDEX = NO
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
linuxcnc.org/docs/html/config/ini-homing.html
I setup the joint section of the INI file like this:
# machine units are mm
[JOINT_0]
HOME = 0
HOME_OFFSET = 150
HOME_SEARCH_VEL = 8
HOME_LATCH_VEL = 0.25
HOME_FINAL_VEL = 8
HOME_IGNORE_LIMITS = YES
HOME_USE_INDEX = NO
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: 1.004 seconds