New Lathe build encoder index pulse stopped working
- Danimal74
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 1
05 Sep 2019 03:27 #144189
by Danimal74
New Lathe build encoder index pulse stopped working was created 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.
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.
- pl7i92
- Offline
- Platinum Member
Less
More
- Posts: 1875
- Thank you received: 354
05 Sep 2019 06:06 #144206
by pl7i92
Replied by pl7i92 on topic New Lathe build encoder index pulse stopped working
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
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.
- Danimal74
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 1
05 Sep 2019 14:37 #144240
by Danimal74
Replied by Danimal74 on topic New Lathe build encoder index pulse stopped working
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.
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.
- Dinuka_Shehan
- Offline
- Platinum Member
Less
More
- Posts: 333
- Thank you received: 26
05 Sep 2019 16:59 - 05 Sep 2019 18:37 #144251
by Dinuka_Shehan
Replied by Dinuka_Shehan on topic New Lathe build encoder index pulse stopped working
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.
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.
- Dinuka_Shehan
- Offline
- Platinum Member
Less
More
- Posts: 333
- Thank you received: 26
05 Sep 2019 17:04 #144252
by Dinuka_Shehan
Replied by Dinuka_Shehan on topic New Lathe build encoder index pulse stopped working
Please Log in or Create an account to join the conversation.
- Hakan
- Offline
- Platinum Member
Less
More
- Posts: 505
- Thank you received: 158
05 Sep 2019 20:01 #144268
by Hakan
Replied by Hakan on topic New Lathe build encoder index pulse stopped working
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.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23178
- Thank you received: 4864
05 Sep 2019 23:38 #144293
by andypugh
Replied by andypugh on topic New Lathe build encoder index pulse stopped working
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.
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.
- Hakan
- Offline
- Platinum Member
Less
More
- Posts: 505
- Thank you received: 158
06 Sep 2019 06:54 - 06 Sep 2019 06:58 #144329
by Hakan
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).
Replied by Hakan on topic New Lathe build encoder index pulse stopped working
if abs(encoder.count mod encoder.position-scale) <1 index-Z = 1
Last edit: 06 Sep 2019 06:58 by Hakan.
Please Log in or Create an account to join the conversation.
- Danimal74
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 1
08 Sep 2019 23:48 #144556
by Danimal74
Replied by Danimal74 on topic New Lathe build encoder index pulse stopped working
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.
- Dinuka_Shehan
- Offline
- Platinum Member
Less
More
- Posts: 333
- Thank you received: 26
09 Sep 2019 11:59 #144594
by Dinuka_Shehan
Replied by Dinuka_Shehan on topic New Lathe build encoder index pulse stopped working
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.080 seconds