Homing using index

More
2 years 5 months ago #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.
Code:
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
2 years 5 months ago #300401 by tommylight
Replied by tommylight on topic Homing using index

This is how I configured the ini and hal files.
Code:
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
2 years 5 months ago #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
2 years 5 months ago #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
2 years 5 months ago #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
2 years 5 months ago - 2 years 5 months ago #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: 2 years 5 months ago by Ehsan_R.

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

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