After homing move off of limit switch
- Dave2024
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 55
- Thank you received: 10
23 Dec 2024 23:34 #317246
by Dave2024
After homing move off of limit switch was created by Dave2024
How’s it going. So, I'm trying to make my mill use only one limit switch for both the minimum and maximum travel of the table. Every time the machine is homed the table moves to the minimum hits the switch it then does a second shorter slower home cycle but then parks with the switch engaged. How do I make it so after the last short slow home cycle it then parks so the switch is not engaged? I need to have it parked off the switch so I can configure it to also serve as my max travel limit switch. If I’m configured for the same limit switch to also be the max I can never move the table after it has been homed.
Which setting or file do I need to modify to make this functionality so lates say immediately after homed move slowly till the switch is disengaged?
Which setting or file do I need to modify to make this functionality so lates say immediately after homed move slowly till the switch is disengaged?
Attachments:
Please Log in or Create an account to join the conversation.
- PCW
- Away
- Moderator
Less
More
- Posts: 17994
- Thank you received: 4838
24 Dec 2024 00:10 #317247
by PCW
Replied by PCW on topic After homing move off of limit switch
This is controlled by the homing parameter settings in the ini file:
linuxcnc.org/docs/html/config/ini-homing.html
linuxcnc.org/docs/html/config/ini-homing.html
Please Log in or Create an account to join the conversation.
- Dave2024
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 55
- Thank you received: 10
24 Dec 2024 00:42 #317251
by Dave2024
Replied by Dave2024 on topic After homing move off of limit switch
Ok great that worked perfect. I set HOME_OFFSET = -.07 and that makes it come perfectly a smidge back off of the switch after homing.
Another quick question though. Should I be adding these changes to the custom.hal file so if I ever run PNCconf again its going to keep my changes and not overwrite them? Or just never open PNCconf again and be sure to always make a backup copy of the Config.ini?
Another quick question though. Should I be adding these changes to the custom.hal file so if I ever run PNCconf again its going to keep my changes and not overwrite them? Or just never open PNCconf again and be sure to always make a backup copy of the Config.ini?
Please Log in or Create an account to join the conversation.
- PCW
- Away
- Moderator
Less
More
- Posts: 17994
- Thank you received: 4838
24 Dec 2024 00:54 - 24 Dec 2024 01:11 #317252
by PCW
Replied by PCW on topic After homing move off of limit switch
The settings are in the ini file, not a hal file so custom.hal won't help here,
but pncconf remembers your homing settings so you can re-edit them later
with pncconf. To do this, select "Modify a configuration already created by this program"
when starting pncconf. Note that if you edited your ini file or hal files outside of pncconf,
you will lose those edits.
I would backup the ini and hal files anyway once you have a working system
but pncconf remembers your homing settings so you can re-edit them later
with pncconf. To do this, select "Modify a configuration already created by this program"
when starting pncconf. Note that if you edited your ini file or hal files outside of pncconf,
you will lose those edits.
I would backup the ini and hal files anyway once you have a working system
Last edit: 24 Dec 2024 01:11 by PCW.
Please Log in or Create an account to join the conversation.
- Dave2024
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 55
- Thank you received: 10
24 Dec 2024 01:57 - 24 Dec 2024 02:50 #317256
by Dave2024
Replied by Dave2024 on topic After homing move off of limit switch
Hey sorry but im back. So after I figured out how to get the table to move slightly forward and no longer on the limit switch after homing I went into my hal file and edited it so like so:
# --- HOME-X ---
net home-x <= [HMOT](CARD0).inm.00.input-02-not
# --- MAX-X ---
net max-x <= [HMOT](CARD0).inm.00.input-02-not
Now both home-x and max-x are pointed to the same pin with the one limit switch but when I goto run I get the error:
./BadassLinuxCNCmill.hal:49: Pin 'hm2_7i96s.0.inm.00.input-02-not' was already linked to signal 'home-x'
Does this mean that LinuxCNC will only allow you to assign one unique pin to each input signal? So like would I need to instead assign max-x to a different unused pin and then run a jumper wire across to it?
Also thanks with all the help with this
# --- HOME-X ---
net home-x <= [HMOT](CARD0).inm.00.input-02-not
# --- MAX-X ---
net max-x <= [HMOT](CARD0).inm.00.input-02-not
Now both home-x and max-x are pointed to the same pin with the one limit switch but when I goto run I get the error:
./BadassLinuxCNCmill.hal:49: Pin 'hm2_7i96s.0.inm.00.input-02-not' was already linked to signal 'home-x'
Does this mean that LinuxCNC will only allow you to assign one unique pin to each input signal? So like would I need to instead assign max-x to a different unused pin and then run a jumper wire across to it?
Also thanks with all the help with this
Last edit: 24 Dec 2024 02:50 by Dave2024.
Please Log in or Create an account to join the conversation.
- PCW
- Away
- Moderator
Less
More
- Posts: 17994
- Thank you received: 4838
24 Dec 2024 02:56 #317257
by PCW
Replied by PCW on topic After homing move off of limit switch
Attachments:
Please Log in or Create an account to join the conversation.
- Dave2024
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 55
- Thank you received: 10
24 Dec 2024 04:27 - 24 Dec 2024 04:41 #317263
by Dave2024
Replied by Dave2024 on topic After homing move off of limit switch
Well I’m not able to go into pncconf and have it load all the settings it only loads defaults. I think it’s because when I switched PC’s all I did was copied the .ini and the .hal file into a quickly generated pncconf machine folder and never actually set it up on this PC. I tried to set it up using your suggested procedure then copying the new lines and pasting them into my hal file but even with the new line:
# --- MAX-HOME-X ---
net max-home-x <= [HMOT](CARD0).inm.00.input-02-not
Its still homing correctly but then when jogging the table it goes to the max and engages the switch again but its not stopping and will proceed to crash. I did however set MAX_LIMIT in the ini file and it wont crash but it would also be nice to have the limit switch also stop the table.
I think im going to give up for now. Thanks for the help though. Maybe ill try again in a few weeks when I find a serious reason to have to have the same limit switch stop the table. What I have works for now
*Edit: Wait never mind, I just found my origonal .xml setup file. I see if i can get the files in the correct locations to load the pncconf data from the first time I set it all up on the first PC. I let you know how it all goes. Anyways thanks again for all the help*
# --- MAX-HOME-X ---
net max-home-x <= [HMOT](CARD0).inm.00.input-02-not
Its still homing correctly but then when jogging the table it goes to the max and engages the switch again but its not stopping and will proceed to crash. I did however set MAX_LIMIT in the ini file and it wont crash but it would also be nice to have the limit switch also stop the table.
I think im going to give up for now. Thanks for the help though. Maybe ill try again in a few weeks when I find a serious reason to have to have the same limit switch stop the table. What I have works for now
*Edit: Wait never mind, I just found my origonal .xml setup file. I see if i can get the files in the correct locations to load the pncconf data from the first time I set it all up on the first PC. I let you know how it all goes. Anyways thanks again for all the help*
Last edit: 24 Dec 2024 04:41 by Dave2024.
Please Log in or Create an account to join the conversation.
Time to create page: 0.110 seconds