× Forum Header

Again about HOME_INDEX in step/dir mode

  • Taichi
  • Taichi's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
14 Mar 2026 10:34 #344238 by Taichi
Hello everyone. I haven't been to the forum for a long time.
Need help and complete clarity in using HOME_INDEX = YES and STEP/DIR
When I upgraded old machines that used analog control and encoder feedback, this issue was not there. In the topic Homing index andypugh writes and gives a link to the source file homing.c. I asked chatGPT to analyze this file. And the chat says that indeed to reset the HOME_INDEX search flag you need a signal from encoder.n.index-enable. That is, linuxcnc does not support the function of searching for 0 labels in step/dir mode.
Most of the new hobby machines that I and my friends are currently assembling use servos in step/dir mode and without a closed loop. Since for a hobby, the driver <-> motor with encoder connection is enough. But home_switch gives a small but noticeable error. Therefore, such a request will appear more and more often.
On my 7i92 there are no free 9 pins for 3 x A B Z encoders. And almost all servo drivers have a simple transistor output that duplicates the 0 encoder mark.
Are there any "macros" or "tricks" to get around this problem?
Is it possible to add this functionality to the homing.c source?
Thx for help.
Attachments:

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

More
14 Mar 2026 11:38 #344244 by andrax
Replied by andrax on topic Again about HOME_INDEX in step/dir mode
If your 7i92 doesn't have a free input for the Z signal, that's too bad. I'd recommend upgrading so you have more inputs. Alternatively, you can set HOME_USE_INDEX = No, and then LinuxCNC will use the home switch for reference. However, this is less accurate.

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

  • rodw
  • rodw's Avatar
  • Away
  • Platinum Member
  • Platinum Member
More
14 Mar 2026 12:08 - 14 Mar 2026 12:08 #344246 by rodw
Replied by rodw on topic Again about HOME_INDEX in step/dir mode
Do not fight the paradigm to avoid a world of pain.
To say you have open loop is not correct. your encoder output should be fully wired in so you do have a feedback loop. Some machines have a dual feedback loop with the motor encoder configured in velocity mode inner loop and optional linear scales configured in position mode as the outer loop.

There are many closed loop stepper motors with encoders and a few also have an index signal. Usually the dual feedback system connects the motor encoder velocity feedback to the drive and the position feedback to linuxcnc.

I have never had drives with index marks but my uderstanding  is that linuxcnc can search for a home switch, then move to the nearest index pulse before completing homing. Ethercat drives that home internally are different animal altogether
Last edit: 14 Mar 2026 12:08 by rodw.

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

  • rodw
  • rodw's Avatar
  • Away
  • Platinum Member
  • Platinum Member
More
14 Mar 2026 12:14 #344250 by rodw
Replied by rodw on topic Again about HOME_INDEX in step/dir mode
forgot to mention granite devices have a good article about feedback systems and even mentions Linuxcnc
granitedevices.com/wiki/Dual-loop_feedback_position_control 

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

More
14 Mar 2026 14:37 - 14 Mar 2026 14:43 #344257 by PCW
Replied by PCW on topic Again about HOME_INDEX in step/dir mode
Mesa Hostmot2 supports homing to index on step/dir systems.
It requires firmware that supports step/dir Index (normally
such firmware has "SDI" in it's name). It also requires one free
input per step/dir channel for the index signal.

This allows homing to index  and spindle synchronized motion  on
step/dir systems without encoder feedback to LinuxCNC.
Last edit: 14 Mar 2026 14:43 by PCW.

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

  • Taichi
  • Taichi's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
14 Mar 2026 18:43 #344268 by Taichi
Replied by Taichi on topic Again about HOME_INDEX in step/dir mode
Thanks for the answers. As I understand it, the differences in the answers mean that there is no single solution in the system. Why is such a question even raised? Systems with hybrid or servo drivers already cost almost the same as stepper motors. Of course, if a person does not use Sinumerik, Fagor, Fanuc, he is looking for a way to save money. Therefore, the 7i92 + 2 x ABOB combination is simply an ideal solution for the price of quality. And to make your own hobby machine with perfect homing, and even at a low price, it is impeccable.
It is also clear that this functionality can be implemented programmatically. I will also try to find the firmware you are talking about. Does it mean that in the firmware the encoder index is untied from the counter?
I will try to implement this using the GPT chat, but I do not think that I will succeed with my little knowledge of code programming.
With respect

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

More
14 Mar 2026 18:59 - 14 Mar 2026 20:27 #344269 by PCW
Replied by PCW on topic Again about HOME_INDEX in step/dir mode
Step/Dir index support with Mesa hardware does not need any
programming, just the correct firmware and a minor hal change:
 
Replacing the encoder index  enable with the stepgen index enable.

It's likely possible to do this with programming but that has the disadvantage
of having an index detection uncertainly of a thread period.

Does your current setup have inputs available for index inputs?
Last edit: 14 Mar 2026 20:27 by PCW.

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

More
15 Mar 2026 14:24 #344312 by hmnijp
Replied by hmnijp on topic Again about HOME_INDEX in step/dir mode

 Does it mean that in the firmware the encoder index is untied from the counter?
I will try to implement this using the GPT chat


A quick note to make it easier to find:
Instead of
“hm2_board.0.encoder.1.index-enable”
Use
“hm2_board.0.stepgen.1.index-enable”

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

Time to create page: 0.087 seconds
Powered by Kunena Forum