- Posts: 80
- Thank you received: 0
Help Needed: Cracking the Code on LinuxCNC Servo Homing Setup!
2 years 4 months ago #303161
by eduard
Replied by eduard on topic Help Needed: Cracking the Code on LinuxCNC Servo Homing Setup!
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.
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 to join the conversation.
2 years 4 months ago #303165
by Aciera
Replied by Aciera on topic Help Needed: Cracking the Code on LinuxCNC Servo Homing Setup!
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.
Usually though one limit switch doubles as home switch and the home position is offset using 'home_offset' values.
Please Log in to join the conversation.
- tommylight
-
- Offline
- Administrator
-
Less
More
- Posts: 22010
- Thank you received: 3
2 years 4 months ago #303167
by tommylight
Replied by tommylight on topic Help Needed: Cracking the Code on LinuxCNC Servo Homing Setup!
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.
When set up properly, there is no possibility of moving the machine outside any limits, be it soft or hard.
Please Log in to join the conversation.
2 years 4 months ago #303169
by Aciera
Replied by Aciera on topic Help Needed: Cracking the Code on LinuxCNC Servo Homing Setup!
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):
The CUSTOM homing procedure expects the following hal connections:
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.
Not sure what signal you want to use to call DEFAULT or CUSTOM homing (see question in my post above):
Code:
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:
Code:
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
Attachment not found
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.
Please Log in to join the conversation.
2 years 4 months ago #303181
by eduard
Replied by eduard on topic Help Needed: Cracking the Code on LinuxCNC Servo Homing Setup!
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.
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.
Please Log in to join the conversation.
2 years 4 months ago #303183
by Aciera
Replied by Aciera on topic Help Needed: Cracking the Code on LinuxCNC Servo Homing Setup!
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:
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):
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:
in the [EMCMOD] sectio of your ini file:
Code:
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):
Attachment not found
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):
Code:
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:
Code:
Waiting for joint 0 to confirm custom homing ...
Please Log in to join the conversation.
2 years 4 months ago #303184
by Aciera
Replied by Aciera on topic Help Needed: Cracking the Code on LinuxCNC Servo Homing Setup!
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:
Attachment not found
Please Log in to join the conversation.
2 years 4 months ago #303186
by Aciera
Replied by Aciera on topic Help Needed: Cracking the Code on LinuxCNC Servo Homing Setup!
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.
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.
Please Log in to join the conversation.
2 years 4 months ago #303189
by Aciera
Replied by Aciera on topic Help Needed: Cracking the Code on LinuxCNC Servo Homing Setup!
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.
This should make debugging a bit more straight forward.
Please Log in to join the conversation.
2 years 4 months ago #303256
by rodw
Replied by rodw on topic Help Needed: Cracking the Code on LinuxCNC Servo Homing Setup!
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!
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!
Please Log in to join the conversation.
Time to create page: 0.892 seconds
