Setting direction of encoder

More
11 Jan 2020 13:56 #154606 by Stigoe
Hi, all.

I've replaced the mounting of the spindle encoder on my lathe and now the encoder spins in the opposite direction of my spindle. How can I change the direction in LinuxCNC/PathPilot? Or doesn't it matter? None of the the explanations or examples mention direction of the encoder, just the spindle direction. When I go to Status, the encoder count is showing negative numbers right now.

Br,
Stig

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

More
11 Jan 2020 14:18 #154612 by Todd Zuercher
There are many ways. If the encoder signal wires are double ended you can invert either one of the A or B signals by swapping the A+ and A- wires. For single ended signals swap the A and B wires. Another solution is to leave the wiring alone and make the encoder scale negative.
The following user(s) said Thank You: Stigoe

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

More
11 Jan 2020 19:14 #154632 by Stigoe
Replied by Stigoe on topic Setting direction of encoder
Thank you.

I don't want to swap the wires, as that will probably only cause confusion later.
I thought about if I could set something, like scale, negative or inverted, but I didn't find any information about it in my searches. I'll set scale to negative as I think that is the best solution.

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

More
11 Jan 2020 19:34 #154633 by smgvbest
I would agree with @Todd Zuercher and swap the A/B wires.

if you now have the need to to change the scale to negative the wires must have been swapped accidentally as you now have B->A instead A->B (that's B leading A instead of A leading B) on the input. if you change the config then in the future you go to wire your encoder with normal A-> you'll have to remove the inversion in the config again.

fixing hardware issue is IMHO always preferred to hiding it in software.

it is your machine so of course do what you want. just stating my opinion

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

More
11 Jan 2020 20:58 #154640 by smgvbest
The other thing that could happen is the orientation of the encoder change so it’s spinning the opposite direction

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

More
12 Jan 2020 06:23 #154665 by Stigoe
Replied by Stigoe on topic Setting direction of encoder
Hi, smgvbest.

No, no wires were swapped for the encoder and A is wired to A and B is wired to B.

Previously, a gear on the encoder meshed with an intermediate gear which meshed with the gear on the spindle, and this made a lot of noise. I have now redone the installation so that the gear on the spindle meshes with an intermediate gear which has a toothed pulley going to a toothed pulley on the encoder, so while previously the encoder rotated in the same direction as the spindle, it is now rotating in the opposite direction of the spindle. Hence the need to change the direction of the encoder in PP, and for this I believe changing the sign of Scale is the correct way to go.

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

Moderators: cncbasher
Time to create page: 0.102 seconds
Powered by Kunena Forum