New Lathe build encoder index pulse stopped working

More
05 Sep 2019 03:27 #144189 by Danimal74
I have been designing and building a lathe cnc conversion and want it primarily for threading. I bought a cheap encoder 100ppr that has phase A, phase B and suppose to have an index but it stopped working right after I wired it in and was getting the spindle to work for spindle at speed.

Right now I have encoder.N.counter−mode true and the encoder pulses are reading fine for RPM.

My question is, can I use phase B as the index and scale it like I do the encoder? I don't really need quadrature, so if I could have the 100th pulse trigger the encoder.N.index−enable bit it would prevent needing to buy and install a new one right away. I will probably just buy a new one later on, but for the time being I wanted to keep setting up and testing.

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

More
05 Sep 2019 06:06 #144206 by pl7i92
hi
yes
first use a second encoder feed it with the B-Phase counts
you can use a cooperator to reset the encoder and set the Z-phase

as counter comp will be depreced in 2.8 dont use the counter

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

More
05 Sep 2019 14:37 #144240 by Danimal74
I can set encoder.N.counter−mode false, then point the encoder phase B parallel port pin => encoder.N.index-Z, but I am not sure what you mean by use cooperator to set phase.

I am picturing that the software would think that it was at the same index starting point and it could be at any of 100 different points around the encoder.

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

More
05 Sep 2019 16:59 - 05 Sep 2019 18:37 #144251 by Dinuka_Shehan
use a hall effect sensor or magnetic proximity switch as spindle index pulse.
Simple configuration.
I may work.
Moderators may correct me if I am wrong.
Last edit: 05 Sep 2019 18:37 by Dinuka_Shehan.

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

More
More
05 Sep 2019 20:01 #144268 by Hakan
Danimal74 I think you should somehow only trigger the index-Z every <encoder-scale> pulses, should be once per revolution. There are some different ways to do that with hal components I suppose, thinking of div and mod math operators.

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

More
05 Sep 2019 23:38 #144293 by andypugh
As was suggested above, just add an extra sensor somewhere that picks up something once-per-rev. This is likely to be more reliable than triggering in HAL.
The HAL solution would get confused by the reverse in the middle of a rigid tap.

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

More
06 Sep 2019 06:54 - 06 Sep 2019 06:58 #144329 by Hakan
if abs(encoder.count mod encoder.position-scale) <1 index-Z = 1
in some kind of pseudo-code should always give a signal once every turn no matter direction. But I couldn't find a "mod" hal component, so maybe not so easy to implement after all. SHould be no problem in a user component, but the complexity rises (by some).
Last edit: 06 Sep 2019 06:58 by Hakan.

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

More
08 Sep 2019 23:48 #144556 by Danimal74
Thanks for all the reply's. I just ordered another one and it will be here in a month. I put a cheap hall effect sensor on there for tuning.
The following user(s) said Thank You: Dinuka_Shehan

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

More
09 Sep 2019 11:59 #144594 by Dinuka_Shehan
We are hoping that you can continue with new encdoder.cheers

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

Time to create page: 0.090 seconds
Powered by Kunena Forum