Homing using index

More
10 May 2024 23:45 - 10 May 2024 23:47 #300359 by PCW
Replied by PCW on topic Homing using index
Have you tried:

HOME_INDEX_NO_ENCODER_RESET = YES

in your ini file?
Last edit: 10 May 2024 23:47 by PCW.

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

More
11 May 2024 06:33 #300369 by Ehsan_R
Replied by Ehsan_R on topic Homing using index
Yes, I tested this before, but it did not make a difference in the result

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

More
11 May 2024 21:05 #300399 by Ehsan_R
Replied by Ehsan_R on topic Homing using index

Hello
I just connected the z pulse signal from the encoder and I want to use it for homing.
(A, B are not connected) Open loop system
This is how I configured the ini and hal files.
net home-x => joint.n.home-sw-in
net x-index-enable    joint.n.index-enable     encoder.n.index-enable

And

[code]HOME_OFFSET = 0
HOME_SEARCH_VEL = 1
HOME_LATCH_VEL = -0.1
HOME_USE_INDEX = Yes
HOME = 0
HOME_SEQUENCE = 0

But when the homing command is sent, the joint moves until it reaches the homing switch (for example, position x=20), then the axis value immediately becomes zero and moves in the opposite direction until it reaches the index pulse, and when the index pulse is received, the axis value is set to 20 and moves at maximum speed until it reaches zero.
What should I do if I want the joint to stop immediately upon receiving the index pulse and consider that point as the origin?
Is not connecting the encoder the reason for this last movement?
 
[/code]

Does anyone have any ideas or suggestions to solve this problem?

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

More
11 May 2024 21:27 #300401 by tommylight
Replied by tommylight on topic Homing using index

This is how I configured the ini and hal files.
net home-x => joint.n.home-sw-in
net x-index-enable    joint.n.index-enable     encoder.n.index-enable

And

[code]HOME_OFFSET = 0
HOME_SEARCH_VEL = 1
HOME_LATCH_VEL = -0.1
HOME_USE_INDEX = Yes
HOME = 0
HOME_SEQUENCE = 0


1. the hal part will not work as you posted it here, the "n" must be a number, not N, it is there to denote that must be the joint number, so 0, 1, 2, 3.... in your case probably 0 as it is axis X
2. the ini part, what is the HOME set to?
I would assume from your reply at 20, set it to 0 if that is the case.

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

More
11 May 2024 21:45 #300405 by PCW
Replied by PCW on topic Homing using index

Yes, I tested this before, but it did not make a difference in the result
 

There may be other issues, but you must have
HOME_INDEX_NO_ENCODER_RESET = YES
if the feedback position is not cleared on index

(AFAIK The stepgen knows nothing about the encoder index)

With hostmot2 firmware you can use the stepgen with an index
(That clears the stepgen feedback position in the expected way)
but you then connect the stepgen index enable hal pin to the
joint index enable pin. I have no idea if LitexCNC has a similar
feature.

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

More
11 May 2024 22:01 #300407 by tommylight
Replied by tommylight on topic Homing using index
I do not recall "homing to index" ever mentioned on the LiteX topic.

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

More
12 May 2024 08:48 #300423 by Ehsan_R
Replied by Ehsan_R on topic Homing using index
What I observed is that:
When the homing switch signal is received, the axis value becomes zero, but the encoder position value does not become zero.
Then, when the index pulse is received, the position value of the encoder becomes zero.
It seems that this difference in resetting the axis value and encoder position causes an additional movement during homing.
Can anyone tell me how I can find out how the homig algorithm of LinuxCNC works?

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

More
12 May 2024 09:05 - 12 May 2024 09:07 #300426 by Ehsan_R
Replied by Ehsan_R on topic Homing using index
Thank you very much for your reply
Yes I had set hal as you said
Actually I want the axis to stop immediately after receiving the index pulse and then set that position as the device origin
Last edit: 12 May 2024 09:07 by Ehsan_R.

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

More
13 May 2024 06:37 #300490 by Ehsan_R
Replied by Ehsan_R on topic Homing using index
Can someone tell me where the problem could be with the explanations I gave and what should I check?

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

More
13 May 2024 09:07 #300496 by andypugh
Replied by andypugh on topic Homing using index
I don't know if home-to-index can ever work if you are not actually driving the encoder A and B phases. (though I suppose index-enable still operates as a latch, but this seems wasteful of CPU resources, if the encoder counter has nothing to count)

There are diagrams here that try to explain the sequence: linuxcnc.org/docs/stable/html/config/ini-homing.html

But if you want the real details about what is happening in the code, then the homing state machine is fairly comprehensible: github.com/LinuxCNC/linuxcnc/blob/master...motion/homing.c#L329
The following user(s) said Thank You: tommylight, besriworld, Aciera

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

Moderators: cmorley
Time to create page: 0.121 seconds
Powered by Kunena Forum