- Posts: 80
- Thank you received: 12
EtherCAT servo homing
2 years 9 months ago - 2 years 9 months ago #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: 2 years 9 months ago by eduard.
Please Log in or Create an account to join the conversation.
2 years 9 months ago #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.
2 years 9 months ago #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.
2 years 9 months ago #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.
2 years 9 months ago - 2 years 9 months ago #290955
by TimP
Replied by TimP on topic EtherCAT servo homing
in cia402.comp there is this code responsible for home status
Edit: well never mind it should be 12
so as soon as `Target is reached` 10bit and `Operation limit active` 12bit (according to Rtelligent user manual) it will be homed
but in Rtelligent manual i have also found `Home find` bit15.
So is this bit15 just Rtelligent extra or it present in other drivers as well?
Now as soon as i set `index-enable` and start homing it triggers error for joint.
taskintf.cc 976: Error on join 3, command number 123
More interesting is how to turn off saving position-offset
Code:
//home states
if (opmode_homing) {
stat_homed = ((statusword >> 10) & 1) && ((statusword >> 12) & 1);
stat_homing = !stat_homed && !((statusword >> 10) & 1);
}
Edit: well never mind it should be 12
so as soon as `Target is reached` 10bit and `Operation limit active` 12bit (according to Rtelligent user manual) it will be homed
but in Rtelligent manual i have also found `Home find` bit15.
So is this bit15 just Rtelligent extra or it present in other drivers as well?
Now as soon as i set `index-enable` and start homing it triggers error for joint.
taskintf.cc 976: Error on join 3, command number 123
More interesting is how to turn off saving position-offset
Last edit: 2 years 9 months ago by TimP.
Please Log in or Create an account to join the conversation.
2 years 9 months ago #291030
by TimP
Replied by TimP on topic EtherCAT servo homing
answering my own question about motor-offset.
To not have it i just need to remove
POSITION_FILE = filename
from ini file, and now finally i don't have this offset added to true motor position each time when i reload linuxcnc.
i don't need it because i have absolute encoders
To not have it i just need to remove
POSITION_FILE = filename
from ini file, and now finally i don't have this offset added to true motor position each time when i reload linuxcnc.
i don't need it because i have absolute encoders
The following user(s) said Thank You: TangentAudio
Please Log in or Create an account to join the conversation.
Time to create page: 0.180 seconds