- Posts: 36
- Thank you received: 0
Servo Tuning
- Roland2161
- Topic Author
- Offline
- Junior Member
-
Good evening,
I seem to still be having a problem with the distances that my stepper motors move. I changed the scale to -20320 and that helped alot, but it is still moving an extra .001" or two over increments of .100". Sometimes the 0 will shift and i'll be .200 further into the part than when i started over multiple passes.
I have been reading the manual, but I am lost on how to tune the servos. If anyone could point me in the right direction that would be fantastic.
Thanks
Please Log in to join the conversation.
- Roland2161
- Topic Author
- Offline
- Junior Member
-
- Posts: 36
- Thank you received: 0
Please Log in to join the conversation.
- tommylight
-
- Offline
- Administrator
-
- Posts: 22010
- Thank you received: 3
Please Log in to join the conversation.
- Roland2161
- Topic Author
- Offline
- Junior Member
-
- Posts: 36
- Thank you received: 0
Please Log in to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
-
- Posts: 4739
- Thank you received: 2
Please Log in to join the conversation.
- Roland2161
- Topic Author
- Offline
- Junior Member
-
- Posts: 36
- Thank you received: 0
Todd Zuercher wrote: It sounds like you made an educated guess that you have a 5mm/rev screw, but in fact may have a 5rev/inch screw. Both are relatively common. Then you have a 200 step motor driven by 200 microstepping. Try setting the steps/rev to 20000 and see if you get closer results.
The machine was in 20000, and it would not move anywhere close to what it needed to go. If I moved .75 it would only move .742. The problem got better when I used -20320 but it is still not perfect. That is why I figured I needed to re set up the stepper motors from start. I just do not know what process to go through in order to tune in a motor. The calibration page just says 50 for P and 0 for I and 0 for D.
1.25 for max velocity, 37 for acceleration and 1.25 for the last field. It seems it is just a standard set up page. I would think tuning the motor would help. Movements Less than an inch repeat, but I was cutting a part that was 2.5" long and the Z 0 was traveling into the part a little at a time each pass. Till I was digging in at the shoulder I was cutting too. I made sure all mechanical connections were tight and it does not seem to be a mechanical issue.
Please Log in to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
-
- Posts: 4739
- Thank you received: 2
Also be sure that backlash isn't messing up your measurements. I would turn off any backlash compensation while setting this up. Then make two moves in the same direction and measure the 2nd move. (1st move removes the backlash.)
Once you have it moving the correct distances and you're sure you are not loosing any steps, now measure your backlash, and setup the backlash compensation (or better yet correct the mechanical issues causing it.)
Please Log in to join the conversation.
- Roland2161
- Topic Author
- Offline
- Junior Member
-
- Posts: 36
- Thank you received: 0
Todd Zuercher wrote: Step motors don't need tuning. They just need to be to have the correct minimum timings set up for the drivers, and the correct velocity and acceleration limits set so they don't loose steps. If your machine is using a hardware step generator, such as a Mesa card, that uses a PID loop there are specific instructions for setting those. Again they are not tuned, for most Mesa setups the stepgen's PID should be set to P=1000 and FF1=1 and everything else 0.
Also be sure that backlash isn't messing up your measurements. I would turn off any backlash compensation while setting this up. Then make two moves in the same direction and measure the 2nd move. (1st move removes the backlash.)
Once you have it moving the correct distances and you're sure you are not loosing any steps, now measure your backlash, and setup the backlash compensation (or better yet correct the mechanical issues causing it.)
ok this explains a lot. I will dig into it shortly. Where would I find backlash compensation ? I believe I have .0005 backlash. not sure it is compensated for.
also when I try tho adjust acceleration it seems to accelerate fast then it slows down which is also causing the problem. soi am probably losing a step on acceleration and deceleration. I will post a video of what is happening after work. thank you. very helpful
Please Log in to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
-
- Posts: 4739
- Thank you received: 2
look for a line that says BACKLASH = n. To turn off the backlash compensation simply place a # in front of that line with a text editor and save it. If your ini file does not have any BACKLASH entries or they are already commented out (with the #), then you are not using it.
Please Log in to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
-
- Posts: 4739
- Thank you received: 2
The acceleration in Linuxcnc should be linear for ordinary moves.
Please Log in to join the conversation.
