Spindle encoder configuration (with G76 threading command and Mesa 7i96s)
- slowpoke
- Away
- Elite Member
-
Less
More
- Posts: 221
- Thank you received: 28
05 Apr 2026 12:35 - 05 Apr 2026 12:37 #345197
by slowpoke
Spindle encoder configuration (with G76 threading command and Mesa 7i96s) was created by slowpoke
I have a 600PPR quadrature encoder linked to my spindle with a 3:1 ratio, so 7200 PPR @ mesa spindle encoder input. A & B quadrature signals only, no 1PPR signal, but I don't think I need the 1PPR signal.
In Halshow
- spindle.0.revs counts up as expected
- spindle.0.speed-in appears correct
- spindle.0.index-enable is disabled
in my SM-10.hal file I have:
net spindle-index-enable <=> spindle.0.index-enable
IF I comment out this line, I can then enable spindle.0.index-enable manually in Halshow
Regardless when I try to open my 2 line G76 program I get the following error:
"Chosen spindle(0) not turning in G76"
I'm not sure if this is a HAL configuration issue or perhaps I need to do something in the gcode prior to the G76 command, not sure?
I have attached files for clarity.
Thanks,
Jeff
In Halshow
- spindle.0.revs counts up as expected
- spindle.0.speed-in appears correct
- spindle.0.index-enable is disabled
in my SM-10.hal file I have:
net spindle-index-enable <=> spindle.0.index-enable
IF I comment out this line, I can then enable spindle.0.index-enable manually in Halshow
Regardless when I try to open my 2 line G76 program I get the following error:
"Chosen spindle(0) not turning in G76"
I'm not sure if this is a HAL configuration issue or perhaps I need to do something in the gcode prior to the G76 command, not sure?
I have attached files for clarity.
Thanks,
Jeff
Last edit: 05 Apr 2026 12:37 by slowpoke.
Please Log in or Create an account to join the conversation.
- PCW
-
- Away
- Moderator
-
Less
More
- Posts: 17826
- Thank you received: 5217
05 Apr 2026 14:53 #345200
by PCW
Replied by PCW on topic Spindle encoder configuration (with G76 threading command and Mesa 7i96s)
For threading, you need a 1PPR signal (index) from the spindle.
Please Log in or Create an account to join the conversation.
- slowpoke
- Away
- Elite Member
-
Less
More
- Posts: 221
- Thank you received: 28
05 Apr 2026 18:24 #345204
by slowpoke
Replied by slowpoke on topic Spindle encoder configuration (with G76 threading command and Mesa 7i96s)
Before I swap out my present encoder that only has A & B 600 PPR quadrature signals with another one I have that has the A & B, as well as a 1 PPR signal. Is there any trickery in HAL I can do to use spindle,0,revs, that presently counts up 1 every spindle revolution, noting that spindle,0,revs is a float type value, so it slowly ramps up incrementally each revolution before it flips it's integer type digit.For threading, you need a 1PPR signal (index) from the spindle.
Please Log in or Create an account to join the conversation.
- PCW
-
- Away
- Moderator
-
Less
More
- Posts: 17826
- Thank you received: 5217
05 Apr 2026 18:44 #345205
by PCW
Replied by PCW on topic Spindle encoder configuration (with G76 threading command and Mesa 7i96s)
Is the encoder on the spindle?
if not, the encoder index is not directly usable.
A single proximity/Hall switch on the spindle
could be added if this is the situation
It may be possible to use the spindle position
and some hal logic to simulate index operation
but it would not work well at higher speeds.
and would forget position between LinuxCNC
runs,
if not, the encoder index is not directly usable.
A single proximity/Hall switch on the spindle
could be added if this is the situation
It may be possible to use the spindle position
and some hal logic to simulate index operation
but it would not work well at higher speeds.
and would forget position between LinuxCNC
runs,
The following user(s) said Thank You: slowpoke
Please Log in or Create an account to join the conversation.
- slowpoke
- Away
- Elite Member
-
Less
More
- Posts: 221
- Thank you received: 28
05 Apr 2026 18:51 - 05 Apr 2026 18:57 #345206
by slowpoke
I'm swapping in my other encoder, that has a 1 pulse per rev signal. The encoder is linked to the spindle with a timing belt, however there is a 3:1 ratio in the timing gears. So I will get 3 pulses per rev, is there a way to divide the Z count by 3 in Hal?
If necessary, I can fit an additional sensor for actual 1PPR
Replied by slowpoke on topic Spindle encoder configuration (with G76 threading command and Mesa 7i96s)
Is the encoder on the spindle?
if not, the encoder index is not directly usable.
A single proximity/Hall switch on the spindle
could be added if this is the situation
It may be possible to use the spindle position
and some hal logic to simulate index operation
but it would not work well at higher speeds.
and would forget position between LinuxCNC
runs,
I'm swapping in my other encoder, that has a 1 pulse per rev signal. The encoder is linked to the spindle with a timing belt, however there is a 3:1 ratio in the timing gears. So I will get 3 pulses per rev, is there a way to divide the Z count by 3 in Hal?
If necessary, I can fit an additional sensor for actual 1PPR
Last edit: 05 Apr 2026 18:57 by slowpoke.
Please Log in or Create an account to join the conversation.
- PCW
-
- Away
- Moderator
-
Less
More
- Posts: 17826
- Thank you received: 5217
05 Apr 2026 19:18 #345208
by PCW
Replied by PCW on topic Spindle encoder configuration (with G76 threading command and Mesa 7i96s)
Its possible but awkward and complex
(because you need to hijack the index detection/enable hardware to count the (very short) index pulses)
Easiest thing would be to add would be to add a 1PPR sensor on the spindle for index
Even better would be to add a 1 PPR sensor with a wide enough pulse that you could use
it as index mask (retaining the high precision of the encoder index)
(because you need to hijack the index detection/enable hardware to count the (very short) index pulses)
Easiest thing would be to add would be to add a 1PPR sensor on the spindle for index
Even better would be to add a 1 PPR sensor with a wide enough pulse that you could use
it as index mask (retaining the high precision of the encoder index)
The following user(s) said Thank You: slowpoke
Please Log in or Create an account to join the conversation.
- slowpoke
- Away
- Elite Member
-
Less
More
- Posts: 221
- Thank you received: 28
05 Apr 2026 19:39 #345209
by slowpoke
Replied by slowpoke on topic Spindle encoder configuration (with G76 threading command and Mesa 7i96s)
Okay, I'm printing a mount for a 1PPR right at the spindle. Please elaborate on the length required for the masking you describe. I could possibly stretch the short pulse .Its possible but awkward and complex
(because you need to hijack the index detection/enable hardware to count the (very short) index pulses)
Easiest thing would be to add would be to add a 1PPR sensor on the spindle for index
Even better would be to add a 1 PPR sensor with a wide enough pulse that you could use
it as index mask (retaining the high precision of the encoder index)
Please Log in or Create an account to join the conversation.
- PCW
-
- Away
- Moderator
-
Less
More
- Posts: 17826
- Thank you received: 5217
05 Apr 2026 20:02 #345210
by PCW
Replied by PCW on topic Spindle encoder configuration (with G76 threading command and Mesa 7i96s)
If you use a hall sensor as index mask, it will likely be wide enough as is,
but the wider (in degrees) , the easier to setup (because the
encoder index must happen within the 1 PPR signal)
If the 1PPR sensor is used for index directly, its width does not
matter.
but the wider (in degrees) , the easier to setup (because the
encoder index must happen within the 1 PPR signal)
If the 1PPR sensor is used for index directly, its width does not
matter.
The following user(s) said Thank You: slowpoke
Please Log in or Create an account to join the conversation.
Time to create page: 0.203 seconds