Homing with Absolute Encoders (Again)
- Sandro
- Offline
- Senior Member
Less
More
- Posts: 41
- Thank you received: 12
02 Aug 2024 10:51 - 02 Aug 2024 11:01 #306717
by Sandro
Homing with Absolute Encoders (Again) was created by Sandro
Hello everyone
I am having issues setting up my homing sequence for absolute encoders on my Ethercat servo dirves. I have read trough a few topics here on the forum but did not find the solution to my problem.
Background: I have Lichuan Ethercat servo drives with 23bit absolute encoders. From testing I have found out, that the encoder tracks 512 turns (-256 to +256) which combined with my 5 mm pitch ballscrews gives me a effective range of -1280 to +1280 mm. I need a distance of 0 to 1000 mm on my machine. On startup of LCNC, my encoder reports the correct absolute position of my axis. I have setup the homing sequence as follows:
To the issue: Let's say on startup I am at some random position e.g. 833 mm. LCNC now requires me to press the home button before I am able to switch to teleop mode or issue MDI commands. What happens now, is that the position of the axis is set to 0 and my two soft limits of 0 mm and 1000 mm are applied. This however is in my opinion not correct since the soft limits are now actually at 833 mm and 1833mm. This would lead to a crash if I were to move the axis. I need the homing sequence to keep the 833 mm absolute position value and apply the soft limits at the effective 0 mm and 1000 mm. Basically I need it to just set the "homed" flag and be done with it.
Hope I was able to describe issue somewhat clearly. Any ideas?
Thank you and greetings
I am having issues setting up my homing sequence for absolute encoders on my Ethercat servo dirves. I have read trough a few topics here on the forum but did not find the solution to my problem.
Background: I have Lichuan Ethercat servo drives with 23bit absolute encoders. From testing I have found out, that the encoder tracks 512 turns (-256 to +256) which combined with my 5 mm pitch ballscrews gives me a effective range of -1280 to +1280 mm. I need a distance of 0 to 1000 mm on my machine. On startup of LCNC, my encoder reports the correct absolute position of my axis. I have setup the homing sequence as follows:
HOME_ABSOULTE_ENCODER = 2
HOME = 0
HOME_OFFSET = 0
HOME_SEQUENCE = 0
HOME_SEARCH_VEL = 0
HOME_LATCH_VEL = 0
HOME_IGNORE_LIMITS = YES
#HOME_USE_INDEX = NO
To the issue: Let's say on startup I am at some random position e.g. 833 mm. LCNC now requires me to press the home button before I am able to switch to teleop mode or issue MDI commands. What happens now, is that the position of the axis is set to 0 and my two soft limits of 0 mm and 1000 mm are applied. This however is in my opinion not correct since the soft limits are now actually at 833 mm and 1833mm. This would lead to a crash if I were to move the axis. I need the homing sequence to keep the 833 mm absolute position value and apply the soft limits at the effective 0 mm and 1000 mm. Basically I need it to just set the "homed" flag and be done with it.
Hope I was able to describe issue somewhat clearly. Any ideas?
Thank you and greetings
Last edit: 02 Aug 2024 11:01 by Sandro.
Please Log in or Create an account to join the conversation.
- Aciera
- Offline
- Administrator
Less
More
- Posts: 3947
- Thank you received: 1705
02 Aug 2024 11:31 - 02 Aug 2024 14:51 #306722
by Aciera
Maybe immediate homing works for you, see section 6.14:
linuxcnc.org/docs/html/config/ini-homing.html#_immediate_homing
[edit]
Actually I think the above will still zero your position so not what you are looking for. Your solution is likely a custom homing procedure.
linuxcnc.org/docs/devel/html/man/man9/homecomp.9.html
[edit]
All nonsense see below.
Replied by Aciera on topic Homing with Absolute Encoders (Again)
linuxcnc.org/docs/html/config/ini-homing.html#_immediate_homing
[edit]
Actually I think the above will still zero your position so not what you are looking for. Your solution is likely a custom homing procedure.
linuxcnc.org/docs/devel/html/man/man9/homecomp.9.html
[edit]
All nonsense see below.
Last edit: 02 Aug 2024 14:51 by Aciera.
The following user(s) said Thank You: Sandro
Please Log in or Create an account to join the conversation.
- Sandro
- Offline
- Senior Member
Less
More
- Posts: 41
- Thank you received: 12
02 Aug 2024 14:14 - 02 Aug 2024 14:34 #306740
by Sandro
Replied by Sandro on topic Homing with Absolute Encoders (Again)
Thank you Aciera!
I just changed the settings to these random values:
Now it works as intended and my absolute position persists through the homing process (not set to zero anymore). But no idea why...
[edit]
Alright I have found it. It was a simple spelling mistake in the HOME_ABSOLUTE_ENCODER = 2 line. This led to the setting not beeing applied. Nothing to do with the other lines. In fact I can delete anything about homing besides the absolute encoder setting = 2. Feel really stupid now
I just changed the settings to these random values:
HOME_OFFSET = 0
HOME = 0
HOME_SEARCH_VEL = 30
HOME_LATCH_VEL = -5
HOME_FINAL_VEL = 10
HOME_USE_INDEX = YES
HOME_SEQUENCE = 0
HOME_IGNORE_LIMITS = YES
HOME_ABSOLUTE_ENCODER = 2
Now it works as intended and my absolute position persists through the homing process (not set to zero anymore). But no idea why...
[edit]
Alright I have found it. It was a simple spelling mistake in the HOME_ABSOLUTE_ENCODER = 2 line. This led to the setting not beeing applied. Nothing to do with the other lines. In fact I can delete anything about homing besides the absolute encoder setting = 2. Feel really stupid now
Last edit: 02 Aug 2024 14:34 by Sandro.
The following user(s) said Thank You: Aciera
Please Log in or Create an account to join the conversation.
- Aciera
- Offline
- Administrator
Less
More
- Posts: 3947
- Thank you received: 1705
02 Aug 2024 14:45 - 02 Aug 2024 21:26 #306744
by Aciera
Replied by Aciera on topic Homing with Absolute Encoders (Again)
Oh my, totally missed that one. Thanks for reporting back.
Actually, I think this may be all you need:
Actually, I think this may be all you need:
HOME_ABSOLUTE_ENCODER = 2
HOME_SEQUENCE = 0
Last edit: 02 Aug 2024 21:26 by Aciera. Reason: Fix the typo
Please Log in or Create an account to join the conversation.
- Sandro
- Offline
- Senior Member
Less
More
- Posts: 41
- Thank you received: 12
02 Aug 2024 15:28 #306750
by Sandro
Replied by Sandro on topic Homing with Absolute Encoders (Again)
Yes correct these are the only lines I have kept. I have set HOME_SEQUENCE = -1 for now so I am forced to home at startup in order to get the soft limits active. This way I will not move the axes by accident without limits in place. Later I plan to automate it so I don't need to press the button anymore.
Please Log in or Create an account to join the conversation.
- pippin88
- Offline
- Elite Member
Less
More
- Posts: 260
- Thank you received: 45
02 Aug 2024 21:12 - 02 Aug 2024 21:13 #306809
by pippin88
Replied by pippin88 on topic Homing with Absolute Encoders (Again)
For anyone copying and pasting - typo in absolute
Should be
Should be
HOME_ABSOLUTE_ENCODER = 2
HOME_SEQUENCE = 0
Last edit: 02 Aug 2024 21:13 by pippin88.
The following user(s) said Thank You: Aciera, Darium, Willemsjos
Please Log in or Create an account to join the conversation.
- TMonteiro
- Offline
- New Member
Less
More
- Posts: 1
- Thank you received: 0
18 Dec 2024 22:04 #316954
by TMonteiro
Replied by TMonteiro on topic Homing with Absolute Encoders (Again)
Hello Sandro,
would like to talk to you about your configuration of the Lichuan Servos with absolute encoder with linuxcnc.
I need feedback coz i am about to pull the trigger on some kits like that.
Thank you in advance,
Tiago Monteiro from Portugal
would like to talk to you about your configuration of the Lichuan Servos with absolute encoder with linuxcnc.
I need feedback coz i am about to pull the trigger on some kits like that.
Thank you in advance,
Tiago Monteiro from Portugal
Please Log in or Create an account to join the conversation.
Time to create page: 0.116 seconds