How to diagnose encoder issue?

All things related to Centroid Oak, Allin1DC, MPU11 and Legacy products

Moderator: cnckeith

Post Reply
ashesman
Posts: 395
Joined: Thu Dec 03, 2020 4:54 am
Acorn CNC Controller: No
Allin1DC CNC Controller: No
Oak CNC controller: Yes
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

How to diagnose encoder issue?

Post by ashesman »

Tonight I was having a play with trying to get my spindle encoder working on the oak. The encoder is ok, it is still installed and wired on the machine with its original controller, I just unplugged it and connected it to the oak as a test. The first thing to suspect is obviously my wiring. I have rechecked it about five times and I am sure it is ok. I think I have configured everything correctly but I am just starting to learn this controller.

When I turn the spindle manually the spindle speed on the screen flickers between + and - 0 quickly. On the PID encoder screen the absolute position toggles back and forth between 14 and 15.

On the old controller I can go into a screen and see the real time logic state of all the encoder signals. Can I do that on the oak?

Tomorrow I will bring home my oscilloscope from work and check the signals.

I plan to start a build log thread for this machine soon once I really get into it...
cncsnw
Posts: 3764
Joined: Wed Mar 24, 2010 5:48 pm

Re: How to diagnose encoder issue?

Post by cncsnw »

What kind of controller is the "old controller"? If it was not a Centroid, then you need to change the connector plug.

Even if the old control happened to use a male 9-pin D-subminiature connector for its encoders, there is no reason to believe that the pinout is the same as what Centroid uses.

It sounds like you have the A and B channel signals miswired.

For one method of testing differential encoder signals, see http://www.cncsnw.com/EncoderTest.htm
ashesman
Posts: 395
Joined: Thu Dec 03, 2020 4:54 am
Acorn CNC Controller: No
Allin1DC CNC Controller: No
Oak CNC controller: Yes
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: How to diagnose encoder issue?

Post by ashesman »

The machine currently has the original Mazak controller still running. I have an adapter pcb that allows plugging the oak into the encoder cable. So I didn’t have to butcher the cables, I made an adapter pcb. I am about to break out the scope and see what is going on. Most likely I have not configured the oak correctly!
ashesman
Posts: 395
Joined: Thu Dec 03, 2020 4:54 am
Acorn CNC Controller: No
Allin1DC CNC Controller: No
Oak CNC controller: Yes
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: How to diagnose encoder issue?

Post by ashesman »

This is now resolved. I turned it on to try diagnose it tonight and it just worked! I suspect the problem was that I didnt power cycle the oak after changing the encoder settings. Or maybe I cycled the power too fast. I know I restarted the pc software but probably didnt power cycle the oak. Who knows it was really late!

Anyways, for reference, you can at least see the state of the index signal in the centroid pid encoder screen. A little * appears by the axis name when the index signal is active. I couldnt see any way to see the state of the a and b signals but.

Attached is a scope picture of the A an B signals in case anyone wants to use it for comparison in the future. From top to bottom, signals are A, #A, B, #B.
Attachments
20210129_202013.jpg
martyscncgarage
Posts: 9912
Joined: Tue Mar 28, 2017 12:01 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: Yes
CPU10 or CPU7: Yes
Location: Mesa, AZ

Re: How to diagnose encoder issue?

Post by martyscncgarage »

Would have been nice if you posted the make and model of the encoder and whether or not YOU installed the DB9 connector. A link to the encoder manual would have good.
Glad you got it working. Let's see if it will rigid tap now....
Reminder, for support please follow this post: viewtopic.php?f=20&t=383
We can't "SEE" what you see...
Mesa, AZ
ashesman
Posts: 395
Joined: Thu Dec 03, 2020 4:54 am
Acorn CNC Controller: No
Allin1DC CNC Controller: No
Oak CNC controller: Yes
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: How to diagnose encoder issue?

Post by ashesman »

The encoder is built into my spindle motor, a panasonic MSM152A AC servo. As mentioned, I built an adapter PCB so yes, I connected the DB9. I will post derials on the adapter when I start my build log thread.

I am a long way off rigid tapping as the machine is still 100% complete on its original controller. I have just been doing a test setup to make sure some of the unknowns are resolved.
martyscncgarage
Posts: 9912
Joined: Tue Mar 28, 2017 12:01 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: Yes
CPU10 or CPU7: Yes
Location: Mesa, AZ

Re: How to diagnose encoder issue?

Post by martyscncgarage »

ashesman wrote: Fri Jan 29, 2021 3:43 pm The encoder is built into my spindle motor, a panasonic MSM152A AC servo. As mentioned, I built an adapter PCB so yes, I connected the DB9. I will post derials on the adapter when I start my build log thread.

I am a long way off rigid tapping as the machine is still 100% complete on its original controller. I have just been doing a test setup to make sure some of the unknowns are resolved.
You see, you left out that part about using the encoder from a Servo. So you made an adapter board to change the signals to differential?
Can't leave out details like that....sounds like you know what you are doing....

Marty
Reminder, for support please follow this post: viewtopic.php?f=20&t=383
We can't "SEE" what you see...
Mesa, AZ
ashesman
Posts: 395
Joined: Thu Dec 03, 2020 4:54 am
Acorn CNC Controller: No
Allin1DC CNC Controller: No
Oak CNC controller: Yes
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: How to diagnose encoder issue?

Post by ashesman »

The servo has a standard 2500 pulse differential quadrature encoder with index pulse. So wires straight into the oak. I didnt want to cut up the OEM encoder cables so made and adapter PCB. The PCB also allows the other encoders to plug into the DMM encoder adapters. And it breaks out the over temperature switches in the motors so they can be wired into the oak.

Although the original intention of this post was about how to diagnose any encoder on the oak. The OEM controller from the 90s allows you to see all the signals from each encoder wire on the screen so you can very quickly diagnose connection issues. Just rotate the encoder and check all the signals are changing and the count number is working. The oak seems to have very little diagnostics available or maybe I just havent found it yet!
Attachments
20210120_074338.jpg
ashesman
Posts: 395
Joined: Thu Dec 03, 2020 4:54 am
Acorn CNC Controller: No
Allin1DC CNC Controller: No
Oak CNC controller: Yes
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: How to diagnose encoder issue?

Post by ashesman »

The servo has a standard 2500 pulse differential quadrature encoder with index pulse. So wires straight into the oak. I didnt want to cut up the OEM encoder cables so made and adapter PCB. The PCB also allows the other encoders to plug into the DMM encoder adapters. And it breaks out the over temperature switches in the motors so they can be wired into the oak.

Although the original intention of this post was about how to diagnose any encoder on the oak. The OEM controller from the 90s allows you to see all the signals from each encoder wire on the screen so you can very quickly diagnose connection issues. Just rotate the encoder and check all the signals are changing and the count number is working. The oak seems to have very little diagnostics available or maybe I just havent found it yet!
cncsnw
Posts: 3764
Joined: Wed Mar 24, 2010 5:48 pm

Re: How to diagnose encoder issue?

Post by cncsnw »

The only diagnostic display on the Centroid system is the Encoder screen under PID Configuration (F1/Setup -> F3/Config -> "137" -> F4/PID -> F3/Encoder).

That will tell you the current count; whether the index pulse is present; and whether the Oak hardware has reported either differential errors or quadrature errors. It will not tell you the high/low state of each wire. That is why I keep a couple different breakout devices available for when I have to work with undocumented or suspect encoders.
ashesman wrote:When I turn the spindle manually the spindle speed on the screen flickers between + and - 0 quickly. On the PID encoder screen the absolute position toggles back and forth between 14 and 15.
This is very characteristic of getting counts on one channel (A or B) but not on the other. Since the second channel never changes state, quadrature decode tells us (apparently) that the encoder is just moving back and forth over the same boundary on the channel that does change.

If the PID -> Encoder screen at that point showed a differential error, then you probably had one or more wires out of place. If it did not show a differential error, and if perhaps the absolute position advanced a count or two in every full revolution, it is likely that you had the index channel swapped with either A or B.

But ultimately, it is simplest to just look at all the wires with a scope or a meter.
Post Reply