Homing using index

More
06 Mar 2023 05:02 #265946 by Sourabh3
Homing using index was created by Sourabh3
Greetings, I have a Deckel maho with linear encoder scales. I want to home the machine using Index in my linear encoder scale. the wires of index are connected along with their respective encoder wires on TB3. I don't know which pins I should assign for homing in PNCCONF. If I don't assign the homing pins then I am unable to edit the homing settings in PNCCONF as seen in the attached picture hence I am unable home the machine later on.
Attachments:

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

More
07 Mar 2023 00:27 #265997 by andypugh
Replied by andypugh on topic Homing using index
You need to physically connect the index to the encoder index input, and in the HAL you need to connect the encoder counter index-enable to the joint.N.index-enable pin.

Then add HOME_USE_INDEX to the relevant [JOINT] sections of the INI file.
linuxcnc.org/docs/stable/html/config/ini...t__lt_num_gt_section
The following user(s) said Thank You: Sourabh3

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

More
07 Mar 2023 11:51 #266019 by Sourabh3
Replied by Sourabh3 on topic Homing using index
Hello Andy, i am not a programmer so i can't really get through it. Can you explain it a bit more? An example would be very helpful.

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

More
07 Mar 2023 12:01 #266020 by rodw
Replied by rodw on topic Homing using index
You need to take the time to read and understand these docs. linuxcnc.org/docs/2.9/html/config/ini-homing.html
PArticularly the diagrams,
No programing required...
The following user(s) said Thank You: Sourabh3

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

More
07 Mar 2023 16:02 #266030 by Sourabh3
Replied by Sourabh3 on topic Homing using index
  i read the document, but still it's not quite clear to me as what specific line i have to add. i understood the ini file lines that andy pointed out and i am able to run the homing cycle also after adding those lines. but it doesn't detect the index mark of the linear encoder scale . i am unable to understand the hal lines that andy is pointing out. a similar line is already written in the hal file, i am attaching the picture , can you point out where and what line i have to add?
Attachments:

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

More
07 Mar 2023 16:17 #266035 by PCW
Replied by PCW on topic Homing using index
If index is not detected, that may be a hardware issue.

To test,

1. Disable the drives
2. Monitor the encoder position and x-index-enable in halshow/watch
3. Set index enable true (halcmd sets x-index-enable true)
4. Hand move the axis past an index
The encoder position should be zero'ed and x-index-enable
should be set false on index detection
The following user(s) said Thank You: Sourabh3

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

More
09 Mar 2023 10:29 - 09 Mar 2023 10:55 #266194 by Sourabh3
Replied by Sourabh3 on topic Homing using index
Greetings PCW, i tried what you asked and seems like there is no hardware issue, the linux detects the index perfectly well and responded as you suggested. I guess the real problem lies in the hal file. what line should i add in the hal file so that when the machine hits the index while homing, it gets zeroed.

EDIT:
i solved the problem, thanks to you guys. you guys are the best. i copied some lines from my last time and it works now. the problem was with the HAL only. thanks a lot guys.
Last edit: 09 Mar 2023 10:55 by Sourabh3.

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

More
09 Mar 2023 10:34 #266195 by andypugh
Replied by andypugh on topic Homing using index
Does your INI file have HOME_USE_INDEX set in each [JOINT_n] section?
The following user(s) said Thank You: Sourabh3

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

More
09 Mar 2023 11:00 #266197 by Sourabh3
Replied by Sourabh3 on topic Homing using index
it wasn't adding those lines because i wasn't choosing any home switch inputs in PNCCONF but then i used some random inputs so that it generates basic lines for inputs in both hal and INI files. then i switched the HAL input lines with the encoder inputs and voila , it works now. thanks a lot guys, a big help. although i busted a radial bearing while doing all this , i need to fix that first,. thanks a lot guys.
The following user(s) said Thank You: tommylight

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

More
10 May 2024 20:42 - 10 May 2024 20:51 #300345 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
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?
 
Last edit: 10 May 2024 20:51 by Ehsan_R.

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

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