EtherCAT servo homing
31 Dec 2023 21:25 - 31 Dec 2023 21:37 #289450
by eduard
EtherCAT servo homing was created by eduard
Hello everyone!
I've been gradually navigating through LinuxCNC, trying to figure out what I need and where to find it. I stumbled upon a somewhat confusing snippet related to external homing, and I was hoping someone could assist me in deciphering it.
I encountered this information on: github.com/dbraun1981/hal-cia402
Here's the sentence in question: 'For using the servo drives internal homing procedure configure your joint homing to Home on Index Pulse only and connect the components home input to the motion index-enable Pin.
'I've grasped the English meaning behind it, but I'm struggling to understand its implementation in HAL. While exploring the MOTION manual, I found a reference that seems related: joint.N.index-enable IO BIT
Should be attached to the index-enable pin of the joint’s encoder to enable homing to index pulse.
In my case, I'm working with JOINT_0. However, I'm unsure about my IO and BIT values. Moreover, I'd appreciate guidance on how to connect it within HAL. Is using nets the correct approach?
Can I have some examples with explanation?Any help or insights would be greatly appreciated!
Thank you.
I've been gradually navigating through LinuxCNC, trying to figure out what I need and where to find it. I stumbled upon a somewhat confusing snippet related to external homing, and I was hoping someone could assist me in deciphering it.
I encountered this information on: github.com/dbraun1981/hal-cia402
Here's the sentence in question: 'For using the servo drives internal homing procedure configure your joint homing to Home on Index Pulse only and connect the components home input to the motion index-enable Pin.
'I've grasped the English meaning behind it, but I'm struggling to understand its implementation in HAL. While exploring the MOTION manual, I found a reference that seems related: joint.N.index-enable IO BIT
Should be attached to the index-enable pin of the joint’s encoder to enable homing to index pulse.
In my case, I'm working with JOINT_0. However, I'm unsure about my IO and BIT values. Moreover, I'd appreciate guidance on how to connect it within HAL. Is using nets the correct approach?
Can I have some examples with explanation?Any help or insights would be greatly appreciated!
Thank you.
Last edit: 31 Dec 2023 21:37 by eduard.
Please Log in or Create an account to join the conversation.
31 Dec 2023 21:51 #289452
by rodw
Replied by rodw on topic EtherCAT servo homing
The component is useful if you have cia402 compatible drives. It will home drives with absolute encoders but it will not home using external sensors wired to the drive. to do this a number of internal homing steps need to be overridden, This can be done in a custom homecomp homing module. One day I will write one!
ref: man homecomp
ref: man homecomp
The following user(s) said Thank You: besriworld
Please Log in or Create an account to join the conversation.
01 Jan 2024 17:50 #289486
by eduard
Replied by eduard on topic EtherCAT servo homing
Hello rodw,
I have CIA402 drives (Leadshine EL8) and they are working perfectly, but I need to solve the homing. Now they are homed to absolute 0 position, setting up in ini file.
My drive have several homing method built in, and I recently solved to change the drive state druring the LCNC start, so I can initialize the drive to HM mode first, than CNP mode.
I have to understand the process how dbraun solved the internal homing on cia402 drives.
If you have some examples how can I configure the "joint.N.index-enable IO BIT
Should be attached to the index-enable pin of the joint’s encoder to enable homing to index pulse." in hal and connecting to "motion index-enable Pin" it helps a lot.
I have CIA402 drives (Leadshine EL8) and they are working perfectly, but I need to solve the homing. Now they are homed to absolute 0 position, setting up in ini file.
My drive have several homing method built in, and I recently solved to change the drive state druring the LCNC start, so I can initialize the drive to HM mode first, than CNP mode.
I have to understand the process how dbraun solved the internal homing on cia402 drives.
If you have some examples how can I configure the "joint.N.index-enable IO BIT
Should be attached to the index-enable pin of the joint’s encoder to enable homing to index pulse." in hal and connecting to "motion index-enable Pin" it helps a lot.
Please Log in or Create an account to join the conversation.
02 Jan 2024 00:45 - 02 Jan 2024 00:47 #289519
by eduard
Replied by eduard on topic EtherCAT servo homing
If I understand corretly, I have to use the .comp file from the repo:
github.com/dbraun1981/hal-cia402/blob/main/cia402.comp
And define the net in hal like this, just when I want to home the machine:
net x-home-index <= joint.0.index-enable => cia402.0.home
But how to use the .comp file?
I read the manual, but more confusing than before. linuxcnc.org/docs/2.4/html/hal_comp.html
github.com/dbraun1981/hal-cia402/blob/main/cia402.comp
And define the net in hal like this, just when I want to home the machine:
net x-home-index <= joint.0.index-enable => cia402.0.home
But how to use the .comp file?
I read the manual, but more confusing than before. linuxcnc.org/docs/2.4/html/hal_comp.html
Last edit: 02 Jan 2024 00:47 by eduard.
Please Log in or Create an account to join the conversation.
02 Jan 2024 02:09 #289522
by eduard
Replied by eduard on topic EtherCAT servo homing
I totally forget, I did the compilation while installing the ethercat modules:
sudo halcompile --install cia402.comp
sudo halcompile --install cia402.comp
The following user(s) said Thank You: rodw
Please Log in or Create an account to join the conversation.
02 Jan 2024 07:07 #289538
by rodw
Replied by rodw on topic EtherCAT servo homing
Dominic has some example hal files in hos cia402 repository
Please Log in or Create an account to join the conversation.
02 Jan 2024 17:12 - 02 Jan 2024 17:16 #289578
by eduard
Replied by eduard on topic EtherCAT servo homing
Yes, I see the exmaple, but I can not get to work. The internal homing not starting, even I met all the criteria of the servo drive initialization. It must be something what I'm missing.
I have absolute encoders connected with matching cables, and I can read them.
I have absolute encoders connected with matching cables, and I can read them.
Last edit: 02 Jan 2024 17:16 by eduard.
Please Log in or Create an account to join the conversation.
04 Jan 2024 16:04 #289790
by TimP
Replied by TimP on topic EtherCAT servo homing
i have same situation. Using config from Dominik.
And it's not setting Driver in to HomeMode state.
So this is always 0
net x-home-index <= joint.0.index-enable => cia402.0.home
but when i manually set x-home-index to 1 it at least changes drive state to homeMode, and actually searching home limit, after few presses of limits it changes cia402.x.stat-homed to 1
but
joint.0.homed is still 0, and there is no indication on screen in LinuxCNC that it is homed
so who should drive this joint.0.index-enable?
And it's not setting Driver in to HomeMode state.
So this is always 0
net x-home-index <= joint.0.index-enable => cia402.0.home
but when i manually set x-home-index to 1 it at least changes drive state to homeMode, and actually searching home limit, after few presses of limits it changes cia402.x.stat-homed to 1
but
joint.0.homed is still 0, and there is no indication on screen in LinuxCNC that it is homed
so who should drive this joint.0.index-enable?
Please Log in or Create an account to join the conversation.
05 Jan 2024 01:04 #289818
by eduard
Replied by eduard on topic EtherCAT servo homing
Thanks for the update. It seems I have to wait for a fix inthis repo.
Meantime I found a solution to home the drive. In LCNC ini set the HOME_ABSOLUTE_ENCODER = 2 and HOME_USE_INDEX = True, and always seeking the absolute 0 position to home.
In the Motion studio, the Pr0.15 (Absolute Encoder Settings) in default is 0 (Incremental), I set to 1 (multiturn absolute). Then I go to desired home position and reset the absolute encoder to zero with Pr0.15 = 9 and reset the drive.
After this I have the new 0 position and LCNC homing to this.
It makes sense to you?
Meantime I found a solution to home the drive. In LCNC ini set the HOME_ABSOLUTE_ENCODER = 2 and HOME_USE_INDEX = True, and always seeking the absolute 0 position to home.
In the Motion studio, the Pr0.15 (Absolute Encoder Settings) in default is 0 (Incremental), I set to 1 (multiturn absolute). Then I go to desired home position and reset the absolute encoder to zero with Pr0.15 = 9 and reset the drive.
After this I have the new 0 position and LCNC homing to this.
It makes sense to you?
The following user(s) said Thank You: TangentAudio
Please Log in or Create an account to join the conversation.
06 Jan 2024 13:53 #289962
by TimP
Replied by TimP on topic EtherCAT servo homing
Sounds like everybody recommend it to do this way.
Do you have that joint.0.motor-offset is get bigger by the amount of cia402.0.pos-fb after LCNC restart?
So if i exit from LCNC and cia402.0.pos-fb was -1.5 and joint.0.motor-offset is 0 and joint.0.pos-fb is -1.5. Then after restart, offset will be 1.5, cia402.0.pos-fb is same -1.5, but joint.0.pos-fb is -3.
And now when i try to home it with LCNC with
HOME_ABSOLUTE_ENCODER = 1 and HOME_USE_INDEX = True, it will move to joint.0.pos-fb 0 so cia402.0.pos-fb will be +1.5. so it will overshoot physically since cia402.0.pos-fb is actual true physical position.
So after another LCNC restart joint.0.motor-offset is now 0, cia402.0.pos-fb +1.5 and joint.0.pos-fb is +1.5. So now actual position and what displayed on screen are same, and when i home this time it is actually return to home.
So it requires two restarts to actually return to home position. With potential with huge overshoot if you have closed LCNC at extreme and of axis.
Why it does so, why this joint.0.motor-offset is set at all? is there a way to it be always set to 0?
Do you have that joint.0.motor-offset is get bigger by the amount of cia402.0.pos-fb after LCNC restart?
So if i exit from LCNC and cia402.0.pos-fb was -1.5 and joint.0.motor-offset is 0 and joint.0.pos-fb is -1.5. Then after restart, offset will be 1.5, cia402.0.pos-fb is same -1.5, but joint.0.pos-fb is -3.
And now when i try to home it with LCNC with
HOME_ABSOLUTE_ENCODER = 1 and HOME_USE_INDEX = True, it will move to joint.0.pos-fb 0 so cia402.0.pos-fb will be +1.5. so it will overshoot physically since cia402.0.pos-fb is actual true physical position.
So after another LCNC restart joint.0.motor-offset is now 0, cia402.0.pos-fb +1.5 and joint.0.pos-fb is +1.5. So now actual position and what displayed on screen are same, and when i home this time it is actually return to home.
So it requires two restarts to actually return to home position. With potential with huge overshoot if you have closed LCNC at extreme and of axis.
Why it does so, why this joint.0.motor-offset is set at all? is there a way to it be always set to 0?
Please Log in or Create an account to join the conversation.
Time to create page: 0.126 seconds