Page 1 of 1

OAK Encoders reading backwards <<Answered>>

Posted: Thu Dec 21, 2017 10:03 pm
by tblough
I'm finally making progress on my lathe startup but I've reached another snag. In section 6.2 of the Oak Install Manual, step four says to confirm that absolute position increases when rotating the shaft CCW. My count decreases. How do I change this? I could not find any parameters anywhere that affect this, and I am not allowed to enter a negative encoder counts/rev in the motor setup.

I'm pretty sure this is related to the problem I am having. If I set my X motor direction to match my jog key layout (parameter 1=1) and set my limit switch (input 4) as +X limit, the machine attempts to home by moving in X-.
IMG_20171221_205035.jpg
What am I missing? I'm assuming I will have the same problem with Z homing in the wrong direction due to the reversed encoder direction but I can't verify that until I get X homing correctly.

Re: OAK Encoders reading backwards

Posted: Fri Dec 22, 2017 12:25 am
by cnckeith
if your encoders are backwards the servo motor won't run at all. so that's not your issue.

if you want the axis to move in opposite direction, simple use the direction reverse selection for that axis.

F1 setup, F3 config, F2 machine, F2 motor, Change "Dir Rev" setting to opposite of what it is currently set to, you have two selections. Yes or NO. Press F10 to save.. now go jog that axis, it will be moving the other way.

and homing direction is determined by the home program. simple edit the program to change the homing direction of any axis.
http://www.centroidcnc.com/dealersuppor ... ads/22.pdf

Re: OAK Encoders reading backwards

Posted: Fri Dec 22, 2017 8:51 am
by diycncscott
If you can currently motors move under control but commanded motion is in the opposite direction to what you expect, then use direction reversal as Keith directs.

If you motors just jump and you get a position error, then you will need to swap the polarity of the analog speed reference at your drive.

FWIW When determining axis direction, always use a commanded move from MDI, never use jogging as the jog keys are completely configurable and therefore not a reliable indicator of axis direction. Once you have your commanded motion configured correctly, you can then configure your jog keys to match.

Re: OAK Encoders reading backwards

Posted: Fri Dec 22, 2017 11:50 am
by tblough
Thanks Guys! I'm getting very close! Following Scott's directions I verified motor direction using MDI moves and now have them moving in the correct directions. Homing is now working correctly and I've got my soft limits set. Two small issues with movement remain.

1) X axis movement is opposite of my jog keys. Switching Parameter #1 between 1 and 3 does not seem to make a difference on the jog key direction and I did restart between the change just in case.

2) My handwheel for Z (connected to the encoder inputs on Axis 3) is reversed and I can't seem to find a place to reverse the movement. I cannot enter a negative value for counts/rev in Parameter 350, and changing movement direction for axis 3 in motor setup does not make a difference.

Tom

Re: OAK Encoders reading backwards

Posted: Fri Dec 22, 2017 7:55 pm
by cncsnw
Are your tools in the front, or in the back?

Do you have the X direction configured so that negative X movement (e.g. in MDI) moves a typical tool closer to centerline, and positive X movement moves a typical tool farther away from spindle centerline?

What PLC program did you start with?

Can you find references in your PLC program to a memory bit called "InvertXJogKeys_M" (usually MEM108) and a series of program stages (usually STG15 through STG18) which related to Z and X jog key interpretation?

Re: OAK Encoders reading backwards

Posted: Fri Dec 22, 2017 10:44 pm
by tblough
CNCSW - once again you nailed it. Problem #1 ended up being in the PLC program on the inverted stage code. Corrected the code and now changing P1 between 1 & 3 now inverts the jog keys correctly.
IMG_20171222_201949.jpg
I still have problem #2 where the carriage feed wheel moves the carriage towards the tailstock when rotated CCW instead of towards the headstock. Crossslide handwheel operates correctly. The only solution I can figure out for this is to swap the A/B signal pairs coming from the carriage handwheel encoder. I hope there's a configuration setting somewhere to do that as I really would like to keep the two handwheel cables the same.

Happy Holidays!

Tom

Re: OAK Encoders reading backwards

Posted: Sun Dec 24, 2017 8:47 pm
by cncsnw
You need to swap the A and B channels.

Someday maybe Centroid will extend the software so that Parameters 350, 353 and 356 can be negative values, but as far as I know that has not been done yet.

Re: OAK Encoders reading backwards

Posted: Mon Dec 25, 2017 1:09 am
by tblough
Thanks CNCSNW. I did that yesterday for the handwheel encoder and it looks like I'll have to do it for my glass scale as well if I can get it working correctly.

Happy Holidays!