1231
Galil / Re: Galil + Mach3 slowly losing position
« on: December 01, 2013, 07:02:22 PM »
At best, it sounds like your PID may need a bit of tweaking. IF there are no mechanical issues.
The encoder is on the motor, right? Well what if the shaft is slipping in the gear/coupler a bit? That will lead to a table/position mismatch. So the first thing I would do is verify the mechanical parts. I took apart a machine (not a mill, but a second op special purpose machine) from work that was having position problems that no one seemed to be able to find. Every time they started the machine up, they would have to change an offset value in the program to make it work. They just accepted it as that was the way it is and dealt with it. Eventually, they decommissioned the machine and I bought it for scrap price. I wanted the servos and ball screws for my mill project at home. As I took the machine apart, I found the problem. Way deep inside the guts in a location that was very inaccessible, there was a shaft coupler that was designed to be used with a key way. Well... someone neglected to put the key in! So all that was holding the shaft was the friction of the coupler. It would slip just a bit every now and then and this caused the offset issue. It was insidious because just looking at the shaft coupler, you would never find it. Lesson learned!
Your rounding "lip" problem smells distinctly like the stench of mechanical problems. It is very possible to slip in only one direction. I would advise taking the X axis apart and looking at everything. Just turning things by hand measuring might not immediately show where the problem lies.
If all is well mechanically, tighten up the PID so that commanding the servo to a position makes it hit the numbers. If you get into a situation where you say G01 X1 and your encoders don't read 1.0000 (assuming your encoder resolution will actually let you read to the tenth), then you need a bit more gain (or less dampening) in the PID. This sounds like the problem you described in your first paragraph. If you find yourself over shooting, then you need more dampening/less gain. There is also sticktion. If the gain and dampening are generally good but on very slow moves to the target you find yourself not hitting the numbers, you may want to throw just a tiny bit of KI in there. Be careful with adding too much I because it will cause the system to get unstable! Your KP and KD parameters need to be pretty much on target before you go messing with KI.
Also, check for noise issues. This might make the encoder "count" even if it is not moving! It is best if the encoder signals are differential and not single ended. And it is also best if the encoder cables are not run along a path that take them near any noise sources. VFDs, power supplies, etc...
Steve
The encoder is on the motor, right? Well what if the shaft is slipping in the gear/coupler a bit? That will lead to a table/position mismatch. So the first thing I would do is verify the mechanical parts. I took apart a machine (not a mill, but a second op special purpose machine) from work that was having position problems that no one seemed to be able to find. Every time they started the machine up, they would have to change an offset value in the program to make it work. They just accepted it as that was the way it is and dealt with it. Eventually, they decommissioned the machine and I bought it for scrap price. I wanted the servos and ball screws for my mill project at home. As I took the machine apart, I found the problem. Way deep inside the guts in a location that was very inaccessible, there was a shaft coupler that was designed to be used with a key way. Well... someone neglected to put the key in! So all that was holding the shaft was the friction of the coupler. It would slip just a bit every now and then and this caused the offset issue. It was insidious because just looking at the shaft coupler, you would never find it. Lesson learned!
Your rounding "lip" problem smells distinctly like the stench of mechanical problems. It is very possible to slip in only one direction. I would advise taking the X axis apart and looking at everything. Just turning things by hand measuring might not immediately show where the problem lies.
If all is well mechanically, tighten up the PID so that commanding the servo to a position makes it hit the numbers. If you get into a situation where you say G01 X1 and your encoders don't read 1.0000 (assuming your encoder resolution will actually let you read to the tenth), then you need a bit more gain (or less dampening) in the PID. This sounds like the problem you described in your first paragraph. If you find yourself over shooting, then you need more dampening/less gain. There is also sticktion. If the gain and dampening are generally good but on very slow moves to the target you find yourself not hitting the numbers, you may want to throw just a tiny bit of KI in there. Be careful with adding too much I because it will cause the system to get unstable! Your KP and KD parameters need to be pretty much on target before you go messing with KI.
Also, check for noise issues. This might make the encoder "count" even if it is not moving! It is best if the encoder signals are differential and not single ended. And it is also best if the encoder cables are not run along a path that take them near any noise sources. VFDs, power supplies, etc...
Steve