Need Help with Router Jumping X-Y Axis and PID <resolved, cncsnw tuning advice>

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

Moderator: cnckeith

Post Reply
pamsauto
Posts: 9
Joined: Tue Oct 20, 2020 8:50 am
Acorn CNC Controller: No
Allin1DC CNC Controller: Yes
Oak CNC controller: No
MPU11 & GPIO4D -w/ 3rd Party Drives: No
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
CNC Control System Serial Number: A900912, C159540

Need Help with Router Jumping X-Y Axis and PID <resolved, cncsnw tuning advice>

Post by pamsauto »

I have a wood router that I am updating to AllIn1DC. The unit has Baldor 13 amp DC Servos on the X and Y with a ball screw drive. I have changed the encoders to the 40K per rev count ones from Centroid. The motor is setup belt drive with 2:1 reduction and .8 inch per ball screw revolution (.4 per motor rev). The issue I am having is when I run an auto tune on the X or Y axis the machine just jumps really bad.

I did the procedure in this Tech Bulletin https://www.centroidcnc.com/dealersuppo ... ds/260.pdf and got the Kp, Kd, and Ki adjusted about 10% lower then when the machine was oscillating. Then I ran auto tune again. It seems if the machine travels more then about 3/4 inch it wants to jump.

The X and Y axis turn easy to me via hand, so I don't feel like there is any wear issue or excessive friction. I have attached a pic of the PID settings (ignore the Y axis as I haven't really tried anything with it as its the same as the X for mechanical and motor).

PID Image Link https://photos.app.goo.gl/tkP3GAHs58RUYzJb8

I also have a video of it running so you can see what I mean by jumping.

Video Link https://photos.app.goo.gl/DEPNBYU1hcEXfkHWA

What am is doing wrong? Thanks in advance for any help!
cncsnw
Posts: 2793
Joined: Wed Mar 24, 2010 5:48 pm

Re: Need Help with Router Jumping X-Y Axis and PID

Post by cncsnw »

How does it run if you use:
Kp = 0.6
Ki = 0.001
Kd = 1.2
?
pamsauto
Posts: 9
Joined: Tue Oct 20, 2020 8:50 am
Acorn CNC Controller: No
Allin1DC CNC Controller: Yes
Oak CNC controller: No
MPU11 & GPIO4D -w/ 3rd Party Drives: No
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
CNC Control System Serial Number: A900912, C159540

Re: Need Help with Router Jumping X-Y Axis and PID

Post by pamsauto »

Its seems to run very similar with those settings. I first tried just to set the three values you gave and left the autotune values alone. This is the graph of what it did.
PXL_20220907_215508678.jpg
I then cleared the autotune and set to all zeros and this is what it looked like.
PXL_20220907_215543315.jpg
When running the autotune or just jogging the X axis it still jumps like it did before and at a similar rate.
cncsnw
Posts: 2793
Joined: Wed Mar 24, 2010 5:48 pm

Re: Need Help with Router Jumping X-Y Axis and PID

Post by cncsnw »

How did those same test moves look when you had Kp=5.4, Ki=0.005, Kd=4.6?
cncsnw
Posts: 2793
Joined: Wed Mar 24, 2010 5:48 pm

Re: Need Help with Router Jumping X-Y Axis and PID

Post by cncsnw »

Have you tried editing the test sequence ("PID_collection_modes.txt" to better represent the kind of moves that are giving you trouble?

The tuning screen you had on your google photos page looked pretty reasonable, with error peaks below 50 counts on a 10K-line encoder. If it is not buzzing or whining unacceptably, then maybe all you need to do to avoid shuddering on long-distance, high-speed moves is to cut back on Ki.
pamsauto
Posts: 9
Joined: Tue Oct 20, 2020 8:50 am
Acorn CNC Controller: No
Allin1DC CNC Controller: Yes
Oak CNC controller: No
MPU11 & GPIO4D -w/ 3rd Party Drives: No
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
CNC Control System Serial Number: A900912, C159540

Re: Need Help with Router Jumping X-Y Axis and PID

Post by pamsauto »

Thanks for the help so far!

I changed the program to move an inch in X at 20% feedrate. It was .3 inch at 100%. I played with Kp, Ki,and Kd alot. I never got it to stop jumping, it was just slower to jump. I ranged Kp from .5 to 5.0, Ki from 0 to .01, and Kd from 1 to 5.

I then changed the feedrate back to 100% for these screenshots.

Here is the least jumpy screenshot.
16626023945966529796209406542346.jpg
Here is what the majority of them look like.
PXL_20220908_015039576.jpg
After editing the program, as I run it the X axis creeps negative. In fact at on point it only moved negative and advanced about 30 inches in 30 program cycles.

I reused the servo encoder wiring in this machine. They are not shielded. If that was introducing an error, would that show anywhere? The Z axis works great and that cable runs the longest of all, about 20ft. The X axis is only 4 ft long.

What else can I try?
cncsnw
Posts: 2793
Joined: Wed Mar 24, 2010 5:48 pm

Re: Need Help with Router Jumping X-Y Axis and PID

Post by cncsnw »

The creeping could indicate either encoder signal errors (loss of A/B counts), or mechanical slippage. Mechanical slippage is more likely.

That might be the root of your problems in the first place. Check under the back cap of the motor to see whether the encoder disc (hub) is securely clamped to the motor back shaft.

Also, just after homing, verify that the index pulse asterisk * is showing on the PID Configuration status display and the Abs Pos count is at zero; then mark your motor shaft orientation. After you have run some cycles and observed position drift, send it to home again (e.g. "M91/X" or "M92/X" at the MDI prompt), then check the Abs Pos count and your motor shaft marks again.
pamsauto
Posts: 9
Joined: Tue Oct 20, 2020 8:50 am
Acorn CNC Controller: No
Allin1DC CNC Controller: Yes
Oak CNC controller: No
MPU11 & GPIO4D -w/ 3rd Party Drives: No
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
CNC Control System Serial Number: A900912, C159540

Re: Need Help with Router Jumping X-Y Axis and PID

Post by pamsauto »

Thanks for all your help cncsnw! I checked the encoders on the X and Y axis and they were slipping when the servo was accelerating or decelerating. Fixed the issue and now everything works as expected.
Post Reply