OAK Encoders reading backwards <<Answered>>

_______________________________________________________














LOGIN below to POST your questions and comments on AjaxCNC products.

Moderator: cnckeith

Post Reply
tblough
Posts: 115
Joined: Tue Mar 22, 2016 10:03 am
Acorn CNC Controller: No
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
MPU11 & GPIO4D -w/ 3rd Party Drives: Yes
DC3IOB: No
CNC11: Yes
CPU10 or CPU7: No
System Serial Number: 100505
100327
102696
Location: Boston, MA
Contact:

OAK Encoders reading backwards <<Answered>>

Post by tblough » Thu Dec 21, 2017 10:03 pm

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.
Attachments
report_0207170333_2017-12-21_19-49-50.zip
(212.63 KiB) Downloaded 4 times
Last edited by tblough on Thu Jan 04, 2018 5:48 pm, edited 2 times in total.
Cheers,

Tom
Confidence is the feeling you have before you fully understand the situation.

cnckeith
Posts: 520
Joined: Wed Mar 03, 2010 4:23 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
MPU11 & GPIO4D -w/ 3rd Party Drives: Yes
DC3IOB: Yes
CNC11: Yes
CPU10 or CPU7: Yes
System Serial Number: none
Contact:

Re: OAK Encoders reading backwards

Post by cnckeith » Fri Dec 22, 2017 12:25 am

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

diycncscott
Posts: 634
Joined: Thu Mar 04, 2010 4:03 pm

Re: OAK Encoders reading backwards

Post by diycncscott » Fri Dec 22, 2017 8:51 am

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.

tblough
Posts: 115
Joined: Tue Mar 22, 2016 10:03 am
Acorn CNC Controller: No
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
MPU11 & GPIO4D -w/ 3rd Party Drives: Yes
DC3IOB: No
CNC11: Yes
CPU10 or CPU7: No
System Serial Number: 100505
100327
102696
Location: Boston, MA
Contact:

Re: OAK Encoders reading backwards

Post by tblough » Fri Dec 22, 2017 11:50 am

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
Cheers,

Tom
Confidence is the feeling you have before you fully understand the situation.

cncsnw
Posts: 342
Joined: Wed Mar 24, 2010 5:48 pm

Re: OAK Encoders reading backwards

Post by cncsnw » Fri Dec 22, 2017 7:55 pm

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?

tblough
Posts: 115
Joined: Tue Mar 22, 2016 10:03 am
Acorn CNC Controller: No
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
MPU11 & GPIO4D -w/ 3rd Party Drives: Yes
DC3IOB: No
CNC11: Yes
CPU10 or CPU7: No
System Serial Number: 100505
100327
102696
Location: Boston, MA
Contact:

Re: OAK Encoders reading backwards

Post by tblough » Fri Dec 22, 2017 10:44 pm

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
Cheers,

Tom
Confidence is the feeling you have before you fully understand the situation.

cncsnw
Posts: 342
Joined: Wed Mar 24, 2010 5:48 pm

Re: OAK Encoders reading backwards

Post by cncsnw » Sun Dec 24, 2017 8:47 pm

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.

tblough
Posts: 115
Joined: Tue Mar 22, 2016 10:03 am
Acorn CNC Controller: No
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
MPU11 & GPIO4D -w/ 3rd Party Drives: Yes
DC3IOB: No
CNC11: Yes
CPU10 or CPU7: No
System Serial Number: 100505
100327
102696
Location: Boston, MA
Contact:

Re: OAK Encoders reading backwards

Post by tblough » Mon Dec 25, 2017 1:09 am

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!
Cheers,

Tom
Confidence is the feeling you have before you fully understand the situation.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests