Servo Tuning

More
20 Mar 2019 21:16 - 25 Mar 2019 13:09 #129115 by Roland2161
Servo Tuning was created by Roland2161
*stepper motors

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
Last edit: 25 Mar 2019 13:09 by Roland2161. Reason: change from servo to stepper

Please Log in or Create an account to join the conversation.

More
20 Mar 2019 22:16 #129121 by Roland2161
Replied by Roland2161 on topic Servo Tuning
I have stepper motors, not servos****

Please Log in or Create an account to join the conversation.

More
21 Mar 2019 00:19 #129126 by tommylight
Replied by tommylight on topic Servo Tuning
We need more info, like, did you create the config with stepconf wizard? what drives and microstepping? are motors driving directly the ballscrews ( if using them ) or through pulleys? what is the pulley ratio? etc etc.

Please Log in or Create an account to join the conversation.

More
21 Mar 2019 01:39 - 21 Mar 2019 01:41 #129133 by Roland2161
Replied by Roland2161 on topic Servo Tuning
The steppers are directly hooked to the ball screw. I have no idea how they are configured or what they are. They are 200 steps per rev and I needed to use -20320 for them to get close to moving the correct distance. It seems to move and extra .001 for every .100" I will get that info, I purchased the machine pre built.might take me a few too find out what they are. I still am in contact with old owner.
Last edit: 21 Mar 2019 01:41 by Roland2161.

Please Log in or Create an account to join the conversation.

More
21 Mar 2019 02:33 #129136 by Todd Zuercher
Replied by Todd Zuercher on topic Servo Tuning
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.

Please Log in or Create an account to join the conversation.

More
21 Mar 2019 13:59 #129170 by Roland2161
Replied by Roland2161 on topic Servo Tuning

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 or Create an account to join the conversation.

More
21 Mar 2019 14:19 - 21 Mar 2019 14:21 #129174 by Todd Zuercher
Replied by Todd Zuercher on topic Servo Tuning
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.)
Last edit: 21 Mar 2019 14:21 by Todd Zuercher.

Please Log in or Create an account to join the conversation.

More
22 Mar 2019 13:18 #129255 by Roland2161
Replied by Roland2161 on topic Servo Tuning

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 or Create an account to join the conversation.

More
22 Mar 2019 20:15 #129285 by Todd Zuercher
Replied by Todd Zuercher on topic Servo Tuning
Backlash compensation is set in the ini file in the sections for each axis/joint
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 or Create an account to join the conversation.

More
22 Mar 2019 20:21 #129286 by Todd Zuercher
Replied by Todd Zuercher on topic Servo Tuning
Remember the velocity and acceleration limits are specified in units/sec and units/sec^2 (inches/sec not inches/min.)

The acceleration in Linuxcnc should be linear for ordinary moves.

Please Log in or Create an account to join the conversation.

Time to create page: 0.234 seconds
Powered by Kunena Forum