Help Needed: Cracking the Code on LinuxCNC Servo Homing Setup!

More
17 Jun 2024 09:19 #303161 by eduard
Thanks for explaining that. Is a bit different approach than what I have on the other machine.
But what is not clear, how can I sent home switch outside soft limits. I tried but get the soft limit error immediately. This is what the home offset is for?
My home swithes are at the very end of travel.

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

More
17 Jun 2024 11:00 #303165 by Aciera
You could use different switches for homing and for limit with the homing switch being mounted before the limit switch. Once homing is done the homing switch has no further effect.
Usually though one limit switch doubles as home switch and the home position is offset using 'home_offset' values.

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

More
17 Jun 2024 11:35 #303167 by tommylight
I am getting the impression there is something not set up properly, so can you post some pictures of the machine and where the home switches are located in regards to machine 0.0. Might be homing from the wrong side, perhaps?
When set up properly, there is no possibility of moving the machine outside any limits, be it soft or hard.

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

More
17 Jun 2024 11:59 - 17 Jun 2024 16:36 #303169 by Aciera
Attached is a revised homing component that includes the option of choosing between DEFAULT and CUSTOM homing for each joint (I use joint '0' as an example, same goes for all other joint numbers).
Not sure what signal you want to use to call DEFAULT or CUSTOM homing (see question in my post above):
joint.0.request-custom-homing FALSE -> DEFAULT homing as set in the ini
joint.0.request-custom-homing TRUE -> CUSTOM homing


The CUSTOM homing procedure expects the following hal connections:
net x-home-request joint.0.custom-homing-is-requested => cia402.0.home
net x-homing joint.0.is-custom-homing <= cia402.0.stat-homing
net x-homed joint.0.custom-homing-finished <= cia402.0.stat-homed

 

File Attachment:

File Name: el8_homeco...06-17.gz
File Size:4 KB



The component compiles for me and switching between DEFAULT and CUSTOM homing procedures works. The CUSTOM homing procedure works for me when I manually switch the hal signals pointed out above and 'HOME_OFFSET' values are set as defined in the [JOINT_n] ini section.
Attachments:
Last edit: 17 Jun 2024 16:36 by Aciera. Reason: Fix pin names in component
The following user(s) said Thank You: tommylight, eduard

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

More
17 Jun 2024 14:23 - 17 Jun 2024 14:24 #303181 by eduard
Thank you for putting the effort in. 

My main problem with home switching is, if the #HOMEMOD=el8_homecomp remains in the ini uncommented, unless if the hal parameters are commented, the custom homing neither the default homing not working.
Last edit: 17 Jun 2024 14:24 by eduard.

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

More
17 Jun 2024 15:11 - 17 Jun 2024 16:38 #303183 by Aciera
To test my modified component you need to 'halcompile --install' the 'el8_homemod_mod.comp (sudo is needed for a package installation):

in the [EMCMOD] sectio of your ini file:
HOMEMOD=el8_homecomp_mod

then start your config and check if the homing pins have been created using the 'show hal configuration' tool (image shows pins for joint 0 but same goes for all other joint numbers):

 

Question 1: Do you see the homing pins for each joint in the 'show hal configuration' tool as shown in the image above? If the answer is no then you are not using the correct component/version.

If you do have the pins then close linuxcnc and open a terminal window. In the terminal type (note lowercase letter 'L' after the hyphen-minus to start your last config):
linuxcnc -l

At this stage if you have not connected the pin 'joint.0.request-custom-homing' in hal you can set/clear it in the 'WATCH' tab as shown above. If cleared the DEFAULT homing procedure should be executed (ie the HOME_ABSOLUTE_ENCODER = 2 you have set in the [JOINT_0] section of your ini file). If you set the pin then the CUSTOM homing procedure should be executed (ie the one the uses the hal connections to the 'cia402.0.' component).
Note the printed messages in the terminal window when CUSTOM homing is selected, similar to this:
Waiting for joint 0 to confirm custom homing ...

 
Attachments:
Last edit: 17 Jun 2024 16:38 by Aciera. Reason: Fix pin names in component
The following user(s) said Thank You: eduard

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

More
17 Jun 2024 15:34 - 17 Jun 2024 16:40 #303184 by Aciera
Just to make sure we are on the same page, you will need to open the 'WATCH' tab on the right side of the window and thenselect the homing pins from the 'joint' list on the left hand side of the 'show hal configuration' tool:  

 
Attachments:
Last edit: 17 Jun 2024 16:40 by Aciera. Reason: Fix pin names in component

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

More
17 Jun 2024 16:06 - 17 Jun 2024 16:47 #303186 by Aciera
Oops, after all of that I realize that I used underscore instead of hyphen in the homing pin names.
My appologies I'll have to fix that, or your hal entries wont work.

[edit]

Ok, I fixed the halpin names in the component posted above and also the screen shots. So make sure to download the fixed component and install it again.
Last edit: 17 Jun 2024 16:47 by Aciera.

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

More
17 Jun 2024 16:46 #303189 by Aciera
Also, you might want to test the switching of the DEFAULT/CUSTOM homing routine with 'home_offset' = 0
This should make debugging a bit more straight forward.
The following user(s) said Thank You: eduard

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

More
18 Jun 2024 12:36 #303256 by rodw
This component should now allow selection of custom or standard homing as Dewey intended
github.com/rodw-au/cia402_homecomp

I finally got around to ordering some hardware to let me set up a homing test bench.
When it turns up, I have some work to do!
The following user(s) said Thank You: cekaa

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

Time to create page: 0.188 seconds
Powered by Kunena Forum