Page 1 of 2

CONFIRM ENCODER COMMUNICATION

Posted: Fri Aug 12, 2022 9:45 am
by Talyrond
Hi,

Oak with DYN4 drives, cables purchased from DMM on a new setup.

I’m performing the CONFIRM ENCODER COMMUNICATION section 6.2 on page 47 of the Oak Install Manual.
It says: Confirm that the absolute position increases while rotating the shaft counter clockwise as shown below in Figure 6.2.1
Well my position decreases. I’m not sure if they are just saying make sure it changes, or is it important that it really does increase, rather than decrease, when rotated in a counter clockwise direction as per the image? If so how do I change that?
I tried changing the motor direction under F1 Setup → F3 Config. Password 137. Press F2 Mach → F2 Motor, but no change.

I’m chasing a quadrature error on all axes, so just want to check the above and I’ll start a new thread on that if needed. I’m kind of hoping the direction is pertinent to this issue.

Thanks

Julian

Re: CONFIRM ENCODER COMMUNICATION

Posted: Fri Aug 12, 2022 9:56 am
by eng199
Quadrature error and count reversal both indicate encoder wiring problems. Check A, /A, B, /B, and GND from drive to Oak.

Re: CONFIRM ENCODER COMMUNICATION

Posted: Fri Aug 12, 2022 10:52 am
by tblough
To change the encoder direction, you would swap the A and B wires and the /A and the /B wires on the encoder - not by reversing the motor direction.

However, as pointed out above by Centroid engineering, if you have quadrature errors, you have wiring problems that need to be corrected first.

Re: CONFIRM ENCODER COMMUNICATION

Posted: Fri Aug 12, 2022 11:23 am
by Talyrond
Thanks guys, I checked the drive cables I purchased from DMM and they match the drawings supplied, see attached.

Bottom line are we saying I need to reverse the encoder direction (by swapping wires as eng199 mentioned) despite purchasing the drivers and motor kit from DMM for the Oak?

tblough - do you think I have other wiring errors apart from potentially swapping wires as per eng199

Thanks

Julian

Re: CONFIRM ENCODER COMMUNICATION

Posted: Fri Aug 12, 2022 1:13 pm
by tblough
If you have quadrature errors, you have wiring errors or bad encoders. Just having the encoder phases reversed will not cause quadrature errors.

Re: CONFIRM ENCODER COMMUNICATION

Posted: Sat Aug 27, 2022 6:31 pm
by ruirosa
Hi
I am also instaling 3 DYN4-DMM servos with a OAK board.
During the benchtest I was having the same problem (encoder quadrature error) in all 3 axis.
Back then Centroid helped and we realised that the board was not receiving the 24 VDC needed.
A few days ago I was able to have some work done on my mill, mount the servos, mount the electrical
cabinet etc.
Now I am having the same error in all 3 axis again. It is not a cable problem since the benchtest was
ended with no errors and the cables are new and were delivery by DMM.
I spoke with DMM back then and they said that the cables that conect the oak board to the
DYN4 drives are made by Centroid.
There is a Marthys video where is possible to see the comlete DMM DYN4 drives configuration and OAK board.

I will revise the servos configuration and see if solves the problem and post the results.
Regards
Rui

Re: CONFIRM ENCODER COMMUNICATION

Posted: Mon Aug 29, 2022 3:34 am
by ashesman
First, test the DMM servos stand alone. For example with their self tuning software. If they are able to control themselves properly, then that confirms the drives are working and the encoders to the drives are working correctly. You may need to force your safety relay on during this test to prevent the Oak from shutting them off when it thinks there is an error.

Next confirm that when you increase the position in the Oak, the motors (table) move in the correct direction, and by the amount you think they should. So, If you say move 0.1 (mm or inch), it should move by 0.1 units (measured with a dial gauge). If the direction is not correct, uses the "Dir Rev" setting on the motor setup screen to correct. If it doesn't move by the correct distance, then that indicates that the Encoder Counts/Rev (motor setup screen) is wrong, or that there is an A/B signal wiring problem to the drive. Note that centroid use total pulses per revolution, and the drives (from memory) use individual pulses per signal. So the Oak number is 4 x higher than the DMM number. Also from memory, the numbers on the wiring diagram setup sheet are incorrect (maybe they are fixed now?).

Finally check the encoder feedback from the DMM drives to Oak. You can look at the PID screen to see the encoder counts to make sure the numbers are increasing/decreasing consistently. And that the Z signal is found (look for a * by the axis name). In one revolution, the encoder count must change by the same number of counts as you have set the Encoder Counts/Rev setting to (Motor setup screen). So, find the Z signal (* appears), write down the count, rotate the motor one turn until Z found again, then see the new count number. Subtract the new number from the old number. It should be within a few counts or your pulses per revolution setting. Also be wary that some drives use a number like 8191 to represent 8192, so you will be out by 4 counts per revolution. Rotating the motor 10 revolutions should result in exactly 10 x Encoder Counts/Rev counts.

The gear num and line num settings in the DMM drives are confusing. There is also special maths you have to use on them if you go to a higher pulses per revolution count. It didn't used to be detailed in the manual! I have run them at different values from 8192 to 32768 pulses per revolution from the Oak and they work fine. I have also used the pre-made cables without issue, the wiring diagram is correct.

If there is a wiring issue, then the encoder signals will not be changing in phase which will result in an incorrect count. If you have access to an oscilloscope, you can look at the signals and make sure they are both toggling, and at 90 deg phase shift to each other. Check both the outgoing and feedback signals. A multi meter can also be used. Measure between A and A\ and very very slowly rotate the motor. You should be able to get toggling between +3V or -3V level, it will be finicky though. Same for B and B\.

Re: CONFIRM ENCODER COMMUNICATION

Posted: Mon Aug 29, 2022 3:48 am
by ashesman
Just for future reference, here is why the DMM LINE_NUM is 4095:

The manual says:
"Pulse output per revolution = LINE_NUM * 4"

But actually for higher output frequencies, the equation is:
unnamed (1).png
So 4095, gives Encoder Line Number = 8192 A (or B) pulses per revolution, which is 32768 (x4) Oak pulses per revolution.

Also note that 32768 pulses from the Oak limits you to about 2100 RPM, so if you are looking for higher speed, you need to lower pulses per revolution.

But, anyways, this is all probably irrelevant, check the wiring first as it sounds like there is a signal error.

Re: CONFIRM ENCODER COMMUNICATION

Posted: Fri Sep 02, 2022 10:07 am
by Talyrond
@ruirosa, have you found a solution yet?

Since I last posted I have been working with DMM, they are being very helpful but we are running out of ideas. This is a noise issue for me I think. I have had the motor run for about an hour at the most, sometimes it errors straight away. Very erratic.

Make sure your machine carcase is well grounded.

I have tried SO many things, seems possibly earth/ground related, but will start another post I think...

Julian

Re: CONFIRM ENCODER COMMUNICATION

Posted: Fri Sep 02, 2022 1:55 pm
by cncsnw
Have you tried powering the DMM drives with 120VAC single-phase, instead of with 240VAC single or three phase?

It seems like some of the earlier experiences reported in this forum were that the drives were significantly noisier when running on 240V power.

Of course, if you are in Europe, 120V power may be hard to come by....