Spindle encoder configuration (with G76 threading command and Mesa 7i96s)

More
6 months 3 weeks ago #345209 by slowpoke

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)

 
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 . 

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

More
6 months 3 weeks ago #345210 by PCW
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.


 
The following user(s) said Thank You: slowpoke

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

More
6 months 3 weeks ago - 6 months 3 weeks ago #345211 by slowpoke

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.

 

I now have a 1PPR spindle index signal connected and working (using a Hall sensor). 
Seems very likely the index pulse will be long enough because there will be 7200 quadrature pulses for every index pulse so every 1/20 of a degree.

Next up figure out what I need to do in HAL to use the index pulse, so I stop getting  "Chosen spindle(0) not turning in G76"

Any help is much appreciated.
Last edit: 6 months 3 weeks ago by slowpoke.

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

More
6 months 3 weeks ago #345233 by PCW
If you have the index connected to the 7I96S index input, then a standard
pncconf or MesaCT created hal file will have the correct connections.
The following user(s) said Thank You: slowpoke

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

More
6 months 3 weeks ago - 6 months 3 weeks ago #345244 by slowpoke
I made a new configuration using pncconf and compared the spindle & encoder 0 section.

I don't see anything that's different, other than naming conventions (see attached)

I have a quadrature spindle encoder connected encoder (0) input. A & B

I now also have a 1PPR signal, connected to the encoder.0. index pin.

In Halshow
- spindle.0.revs counts up as expected when the spindle is rotated forward
- spindle.0.speed-in appears correct
- spindle.0.index-enable shows 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, that makes no difference when trying to open the file below (same error)

Regardless when I try to open the following 2 line G76 program I get the following error: "Chosen spindle(0) not turning in G76"

Program:
G0 X0.45
G76 P0.0625 Z-0.5 I -0.005 J 0.008 K 0.0503

What does the error message actually mean and/or what is Linux missing that it needs?

It has the quadrature encoder signals and it has the index pulse, that I can see toggle as the magnet passes the sensor once per rev,

The revs counter is counting up 1 per rev.
Last edit: 6 months 3 weeks ago by slowpoke.

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

More
6 months 3 weeks ago - 6 months 3 weeks ago #345245 by PCW
is spindle.0.at-speed  true?


Also does the index work?

Test by (either in halshow or with halcmd -kf)

sets spindle-index-enable true

watch  spindle-index-enable in halshow

it should go high with the sets command and then low when you rotate
the spindle past the index position.

 
Last edit: 6 months 3 weeks ago by PCW.

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

Time to create page: 0.292 seconds
Powered by Kunena Forum